Skip to content
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

Implement consistent step blocker system #1171

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

edan-bainglass
Copy link
Member

@edan-bainglass edan-bainglass commented Feb 18, 2025

This PR includes the following:

  • Wizard-related widgets/models are moved to common/wizard.py
  • QeWizardStep and corresponding model are extended by a confirmable and dependent (and both) flavors
  • A new HasBlockers mixin is provided to encapsulate the relevant traits and functionality
  • The confirmable wizard step flavor takes a confirmable wizard step model with the Confirmable and HasBlockers mixins
  • Steps 1-3 are now confirmable steps
  • Steps 2-4 remain dependent steps
  • Steps 2-3 inherit both sets of functionality
  • The SSSP installation widget is moved to step 1 and is blocking (see below)
  • The QE install / code setup widget remains in step 3 and is blocking (see below)
  • HasBlockers mixin is added to SettingsModel (panels in steps 2 and 3 can now block)

The design is flexible, modular, and extensible. Following the already-implemented use case of step 1, blockers could by introduced in step 2 covering invalid parameter combinations. Similarly in step 3, in addition to the QE setup blockers, additional blockers could be introduced covering invalid resource selection.

Thank you to @superstar54 and @mikibonacci for feedback and input 🙏

Resolves #1151
Resolves #1152


image


image

Copy link

codecov bot commented Feb 18, 2025

Codecov Report

Attention: Patch coverage is 85.06224% with 36 lines in your changes missing coverage. Please review.

Project coverage is 73.09%. Comparing base (6228414) to head (a429779).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/aiidalab_qe/common/wizard.py 84.42% 19 Missing ⚠️
src/aiidalab_qe/app/structure/__init__.py 75.86% 7 Missing ⚠️
src/aiidalab_qe/common/mixins.py 65.00% 7 Missing ⚠️
src/aiidalab_qe/common/panel.py 75.00% 2 Missing ⚠️
src/aiidalab_qe/app/main.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1171      +/-   ##
==========================================
+ Coverage   72.99%   73.09%   +0.09%     
==========================================
  Files          94       95       +1     
  Lines        6532     6578      +46     
==========================================
+ Hits         4768     4808      +40     
- Misses       1764     1770       +6     
Flag Coverage Δ
python-3.11 73.09% <85.06%> (+0.09%) ⬆️
python-3.9 73.09% <85.06%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@edan-bainglass
Copy link
Member Author

edan-bainglass commented Feb 18, 2025

@cpignedoli this should hopefully resolve the issue you and I ran into. It should also improve UX quite a bit by allowing us to more easily prevent invalid runs. There is also the issue of @superstar54 (#1148) that will further improve UX!

Copy link
Member

@mikibonacci mikibonacci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @edan-bainglass, LGTM! the only additonal comment that you asked to write here is about triggering a refresh resources once the qe installation is finished (otherwise there is the risk to not see the new code, in step 3)

Thanks!

@edan-bainglass
Copy link
Member Author

@mikibonacci can you check once more, see that indeed code selectors are refreshed and enabled on completed setup? 🙏

Copy link
Member

@mikibonacci mikibonacci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@edan-bainglass edan-bainglass merged commit 5d9618e into aiidalab:main Feb 19, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug report: Application crashed with NotExistent Bug report: Application crashed with NotExistent
2 participants