-
Notifications
You must be signed in to change notification settings - Fork 16
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
Reset GUI #489
Merged
Merged
Reset GUI #489
Changes from 12 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
dad8904
fix_reset
superstar54 e15086e
add test for reset
superstar54 e3afbdb
reset structure
superstar54 c128843
udpate test
superstar54 a3d5c24
Merge branch 'main' into feature/reset_GUI
superstar54 c03d21c
fix test
superstar54 ef0ad60
fix reset in advaced settings
superstar54 bb3eb70
Merge branch 'main' into feature/reset_GUI
superstar54 3c4e250
fix ecutwfc_setter
superstar54 6553609
update test
superstar54 2cafdd8
fix test
superstar54 e7ad428
fix loop link
superstar54 f423d87
use viewer.structure to fix broken link
superstar54 40ac1ae
remove output "Stored in AiiDA..."
superstar54 fbee479
add docstring
superstar54 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
def test_reload_and_reset(submit_app_generator, generate_qeapp_workchain): | ||
"""Test if the GUI paramters can be reload and reset properly""" | ||
wkchain = generate_qeapp_workchain( | ||
relax_type="positions", run_bands=True, run_pdos=False, spin_type="collinear" | ||
) | ||
app = submit_app_generator() | ||
# select the pk | ||
app.work_chain_selector.value = wkchain.node.pk | ||
# check if the value are reload correctly | ||
assert app.configure_step.workchain_settings.relax_type.value == "positions" | ||
assert app.configure_step.workchain_settings.spin_type.value == "collinear" | ||
assert app.configure_step.workchain_settings.properties["bands"].run.value is True | ||
assert app.configure_step.workchain_settings.properties["pdos"].run.value is False | ||
assert ( | ||
len( | ||
app.configure_step.advanced_settings.pseudo_setter.pseudo_setting_widgets.children | ||
) | ||
> 0 | ||
) | ||
# new workflow, this will reset the GUI | ||
app.work_chain_selector.value = None | ||
# check if the value are reload correctly | ||
assert app.structure_step.manager.structure is None | ||
assert app.configure_step.workchain_settings.relax_type.value == "positions_cell" | ||
assert app.configure_step.workchain_settings.spin_type.value == "none" | ||
assert app.configure_step.workchain_settings.properties["bands"].run.value is False | ||
assert app.configure_step.workchain_settings.properties["pdos"].run.value is False | ||
assert app.configure_step.advanced_settings.pseudo_setter.ecutwfc_setter.value == 0 | ||
assert ( | ||
len( | ||
app.configure_step.advanced_settings.pseudo_setter.pseudo_setting_widgets.children | ||
) | ||
== 0 | ||
) | ||
assert app.submit_step.resources_config.num_cpus.value == 1 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Maybe you should include docstring to these reset* functions , just to keep it consistent with the rest of your changes where you added docstring