Skip to content

Save and load result panel state - #1343

Merged
superstar54 merged 7 commits into
aiidalab:mainfrom
superstar54:save_load_result_panel_state
Jul 24, 2025
Merged

Save and load result panel state#1343
superstar54 merged 7 commits into
aiidalab:mainfrom
superstar54:save_load_result_panel_state

Conversation

@superstar54

@superstar54 superstar54 commented Jul 17, 2025

Copy link
Copy Markdown
Member

Implement the feature to save and load the result panel state.

  • Add save and load state button for the result panel
  • The state parameters are saved as "result" in the node.base.extras.

Take the electronic structure as an example (only a draft)

@edan-bainglass edan-bainglass left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The approach is a bit unclear. Let's discuss.

Comment thread src/aiidalab_qe/common/panel.py
Comment thread src/aiidalab_qe/common/panel.py
Comment thread src/aiidalab_qe/plugins/electronic_structure/result/model.py
@superstar54

Copy link
Copy Markdown
Member Author

Hi @edan-bainglass , thanks for the comments!

steps 2 and 3, we do have calculation settings and resource settings, respectively. So it is fair to also extend this to step 4.

This is what I thought when I added this feature: it makes the app consistent throughout the steps. However, we can discuss and refactor to make this more clear.

- Include horizontal_width_percentage and bands_width_percentage
- note, color_picker and trace are not added because their state can be combined dynamically, thus not useful to reload the state
@codecov

codecov Bot commented Jul 24, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.50000% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.20%. Comparing base (36bca1a) to head (4d80075).
⚠️ Report is 32 commits behind head on main.

Files with missing lines Patch % Lines
src/aiidalab_qe/common/panel.py 50.00% 10 Missing ⚠️
...ab_qe/plugins/electronic_structure/result/model.py 66.66% 6 Missing ⚠️
...qe/app/result/components/viewer/structure/model.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1343      +/-   ##
==========================================
- Coverage   72.28%   72.20%   -0.08%     
==========================================
  Files          99       99              
  Lines        6894     6940      +46     
==========================================
+ Hits         4983     5011      +28     
- Misses       1911     1929      +18     
Flag Coverage Δ
python-3.11 72.20% <62.50%> (-0.08%) ⬇️
python-3.9 72.23% <62.50%> (-0.08%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@edan-bainglass
edan-bainglass self-requested a review July 24, 2025 10:46

@edan-bainglass edan-bainglass left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@superstar54
superstar54 merged commit 294dbef into aiidalab:main Jul 24, 2025
9 checks passed
@superstar54
superstar54 deleted the save_load_result_panel_state branch July 24, 2025 13:23
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