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

Disable cubeviz spectrum-viewer PNG export for now #2777

Merged
merged 6 commits into from
Apr 2, 2024

Conversation

rosteen
Copy link
Collaborator

@rosteen rosteen commented Apr 1, 2024

Adding a disabled message for this case until we can fix it.

@rosteen rosteen added bug Something isn't working cubeviz plugin Label for plugins common to multiple configurations labels Apr 1, 2024
@rosteen rosteen added this to the 3.9 milestone Apr 1, 2024
Copy link

github-actions bot commented Apr 1, 2024

There is no spoon.

(A special day message.)

@@ -187,6 +190,22 @@ def _sync_singleselect(self, event):
setattr(self, attr, '')
if attr == 'subset_selected':
self._set_subset_not_supported_msg()
elif attr == "viewer_selected" and self.config == "cubeviz":
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we swap the conditions here so all the other viz doesn't have to check for attr to begin with?

Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

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

Code looks like code. Thanks!

@pllim pllim added the no-changelog-entry-needed changelog bot directive label Apr 1, 2024
@pllim
Copy link
Contributor

pllim commented Apr 1, 2024

Gotta fix the PEP 8 though.

Comment on lines 194 to 198
if self.viewer_selected == "spectrum-viewer" and self.viewer_format_selected == "png":
msg = "Exporting the spectrum viewer as a PNG in Cubeviz is currently disabled"
else:
msg = ""
self.viewer_invalid_msg = msg
Copy link
Member

Choose a reason for hiding this comment

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

Can we just call _disable_viewer_format_combo to be consistent with the other cases?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done, good thought.

@rosteen
Copy link
Collaborator Author

rosteen commented Apr 1, 2024

Gotta fix the PEP 8 though.

I pushed a fix for that and the PR didn't pick it up 😵

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.81%. Comparing base (f1ba4a6) to head (c4f0afa).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2777      +/-   ##
==========================================
+ Coverage   88.72%   88.81%   +0.09%     
==========================================
  Files         110      110              
  Lines       16353    16407      +54     
==========================================
+ Hits        14509    14572      +63     
+ Misses       1844     1835       -9     

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

@rosteen rosteen removed the no-changelog-entry-needed changelog bot directive label Apr 1, 2024
[ci skip] [rtd skip]
@pllim pllim merged commit 77c9d44 into spacetelescope:main Apr 2, 2024
2 checks passed
@rosteen
Copy link
Collaborator Author

rosteen commented Apr 2, 2024

@pllim this only disables this through the UI, not the API. Probably not worth opening another PR just to fix the changelog though.

@kecnry
Copy link
Member

kecnry commented Apr 2, 2024

Oh, I missed that - it would be super easy to check viewer_invalid_msg and raise the error in export though if we want to do a quick follow-up PR?

@rosteen
Copy link
Collaborator Author

rosteen commented Apr 2, 2024

Oh, I missed that - it would be super easy to check viewer_invalid_msg and raise the error in export though if we want to do a quick follow-up PR?

Sure, I can do that.

@pllim
Copy link
Contributor

pllim commented Apr 2, 2024

Oops sorry, my bad w.r.t. change log section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cubeviz plugin Label for plugins common to multiple configurations Ready for final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants