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 missing-info warnings #1004

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

edan-bainglass
Copy link
Member

@edan-bainglass edan-bainglass commented Dec 19, 2024

This PR introduces guards on subsequent steps that inform the user if dependencies have yet to be met, i.e., previous step(s) not confirmed.

Pros

  • Reduced chances of messing up
  • Reduced development complexities (due to reduced error potential)
  • Self-guiding app

Cons

  • *Reduces user exploration

*Not exactly true. The exploration is still available, but now in a prescribed (correct) order.

@cpignedoli @giovannipizzi thoughts?

image

image

image

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 90.32258% with 3 lines in your changes missing coverage. Please review.

Project coverage is 68.92%. Comparing base (c8bb1d4) to head (e4d87d8).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/aiidalab_qe/app/main.py 75.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1004      +/-   ##
==========================================
+ Coverage   68.84%   68.92%   +0.07%     
==========================================
  Files         115      115              
  Lines        6417     6443      +26     
==========================================
+ Hits         4418     4441      +23     
- Misses       1999     2002       +3     
Flag Coverage Δ
python-3.11 68.92% <90.32%> (+0.07%) ⬆️
python-3.9 68.94% <90.32%> (+0.07%) ⬆️

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.

@giovannipizzi
Copy link
Member

Very good!

Comment on lines +156 to +149
if step is self.configure_step and not self.structure_model.confirmed:
step.show_missing_information_warning()
elif step is self.submit_step and not self.configure_model.confirmed:
step.show_missing_information_warning()
elif step is self.results_step and not self.submit_model.confirmed:
step.show_missing_information_warning()
Copy link
Member

Choose a reason for hiding this comment

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

Instead of checking it manually, I think we can do this in an automatic manner: one step depends on its previous step.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, probably. But maybe we can do that in another PR? Low on time at the moment. Let's try to get this in for the release and open an issue to revisit this.

Copy link
Member

Choose a reason for hiding this comment

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

Good to me!

@superstar54 superstar54 self-requested a review December 20, 2024 15:59
Copy link
Member

@superstar54 superstar54 left a comment

Choose a reason for hiding this comment

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

Thanks for the work! Please open an issue after merging the PR.

@edan-bainglass edan-bainglass merged commit 6d5a1d3 into aiidalab:main Dec 23, 2024
7 of 8 checks passed
edan-bainglass added a commit that referenced this pull request Dec 24, 2024
…1032)

This PR resolves issues with #1004 (incorrect handling of step-to-step switching/rendering) by treating the app steps more uniformly. It also introduces a simple locking mechanism on submission that disconnects all observations of step confirmation, thus rendering the app in a "locked" state by permanently disabling confirm/submit buttons.
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.

3 participants