Skip to content

Adding a download image button for different formats#1056

Merged
AndresOrtegaGuerrero merged 5 commits into
aiidalab:mainfrom
AndresOrtegaGuerrero:new_download_image_bandspdoswidget
Jan 6, 2025
Merged

Adding a download image button for different formats#1056
AndresOrtegaGuerrero merged 5 commits into
aiidalab:mainfrom
AndresOrtegaGuerrero:new_download_image_bandspdoswidget

Conversation

@AndresOrtegaGuerrero
Copy link
Copy Markdown
Member

@AndresOrtegaGuerrero AndresOrtegaGuerrero commented Jan 5, 2025

Here we include a button for downloading the image in different formats

image

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 5, 2025

Codecov Report

Attention: Patch coverage is 55.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 67.83%. Comparing base (531339d) to head (1174f0e).
Report is 154 commits behind head on main.

Files with missing lines Patch % Lines
src/aiidalab_qe/common/bands_pdos/model.py 35.71% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1056      +/-   ##
==========================================
- Coverage   67.89%   67.83%   -0.06%     
==========================================
  Files         112      112              
  Lines        6593     6613      +20     
==========================================
+ Hits         4476     4486      +10     
- Misses       2117     2127      +10     
Flag Coverage Δ
python-3.11 67.83% <55.00%> (-0.06%) ⬇️
python-3.9 67.85% <55.00%> (-0.06%) ⬇️

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.

Copy link
Copy Markdown
Member

@edan-bainglass edan-bainglass left a comment

Choose a reason for hiding this comment

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

Overall straightforward. Before I approve, can you please respond to my comments?

Comment thread src/aiidalab_qe/common/bands_pdos/bandpdoswidget.py
Comment thread src/aiidalab_qe/common/bands_pdos/model.py
@edan-bainglass edan-bainglass self-requested a review January 6, 2025 11:55
Copy link
Copy Markdown
Member

@edan-bainglass edan-bainglass left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @AndresOrtegaGuerrero. You can proceed. If possible, could you maybe comment on Plotly's image download API? The plot comes with built-in PNG download. I'm wondering if the modebar could be modified (in a future PR) to include custom buttons for other common formats (likely still using JS).

@AndresOrtegaGuerrero
Copy link
Copy Markdown
Member Author

I used https://plotly.com/python-api-reference/plotly.io.html?highlight=io#module-plotly.io , i dont know if the other option can be modified.

@AndresOrtegaGuerrero AndresOrtegaGuerrero merged commit 1df8f54 into aiidalab:main Jan 6, 2025
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