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

Clean up app wrapper MVC #1009

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

edan-bainglass
Copy link
Member

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

This PR cleans up recent developments in the app wrapper classes to better fit with the overall MVC design of the app.

Modifications

  • Rename enable_toggles() to enable_controls(), as the top-level controls are no longer only toggle buttons
  • Convert guide selectors options and values to AppWrapperModel state variables and sync
  • Move observation handling to AppWrapperController
  • Use AppWrapperController._open_external_notebook as a generic means of handling such events

Note regarding _open_external_notebook

#1011 actually discards this method in favor of anchor tags to avoid pop-up blocking.

@superstar54
Copy link
Member

Could you fix the failed tests? Also please add some comments (on the github page directly, not inside the code) for the modification, this will help the review process.

@edan-bainglass edan-bainglass force-pushed the wrapper-cleanup branch 2 times, most recently from f97bbf8 to bf60746 Compare December 20, 2024 13:24
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 79.31034% with 6 lines in your changes missing coverage. Please review.

Project coverage is 69.12%. Comparing base (79b6201) to head (bf60746).

Files with missing lines Patch % Lines
src/aiidalab_qe/app/wrapper.py 79.31% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1009      +/-   ##
==========================================
+ Coverage   69.03%   69.12%   +0.09%     
==========================================
  Files         115      115              
  Lines        6388     6391       +3     
==========================================
+ Hits         4410     4418       +8     
+ Misses       1978     1973       -5     
Flag Coverage Δ
python-3.11 69.12% <79.31%> (+0.09%) ⬆️
python-3.9 69.13% <79.31%> (+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.

@edan-bainglass
Copy link
Member Author

Could you fix the failed tests? Also please add some comments (on the github page directly, not inside the code) for the modification, this will help the review process.

Okay @superstar54. There you go 🙂 Please review 🙏

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.

LGTM!

@edan-bainglass edan-bainglass merged commit eac7167 into aiidalab:main Dec 20, 2024
6 of 7 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.

2 participants