-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lazy loading refactoring #105
Conversation
from 8ea879c commit , i have define a template for the result panel and tabs , from here i think it might be easier to separate the work |
* Adding euphonic models * Adding model modifications. * Adding LL for euphonic. missing: download of the data, proper testing, detached app. * Putting the model and widget in the results panel * Putting back the results panel in the init. * Bug fix in the q-section reset. The problem was that the default value of a tl.List(tl.Float()) is tl.Undefined. Now we explicitely reset the default value of Q0_vec, h_vec and k_vec * Adding DownloadYamlHdf5Widget For now, I added it at the end of the main EuphonicBaseResultsWidget. It will only allow to download phonopy.yaml and fc.hdf5. The plots can be downloaded in the corresponding tabs. I added a method to the model which produce the downloadable files, and left the actual _download_data method in the widget. I think this is a proper design as the model manipulates data, the view can provide them. Still missing the download of single tabs, for now it does not work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
def on_input_structure_change(self, _=None): | ||
if not self.input_structure: | ||
self._get_default() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be self.reset() ? because otherwise we need to loop on all the traits, just calling the _get_default() will excepts.
A strange issue is that I just changed the dimensionality of the structure to 0D and confirmed, and somehow hitting this block (so it is like the self.input_structure is indeed none, but should not). I think however it is a qe app issue, and only happens for 0D (not 2D, 1D)
class VibroResourcesSettingsPanel(ResourceSettingsPanel[VibroResourceSettingsModel]): | ||
"""Panel for the resource settings for the vibroscopy calculations.""" | ||
|
||
title = "Vibronic" | ||
identifier = identifier = "vibronic" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess here in the future (near future) we can add the logic to display only subset of the defined codes, so if no dielectric is needed we don't show the pw dielectric and so on
just done via settings always `needs_euphonic_tab = False`.
Hi @AndresOrtegaGuerrero , A part the comment on |
This address Lazy loading #92