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

Don't try to update viewer state if it was deleted #2541

Merged
merged 6 commits into from
Nov 1, 2023

Conversation

rosteen
Copy link
Collaborator

@rosteen rosteen commented Oct 30, 2023

Closes #2521 , turned out to be very simple once I tracked it down. This was previously causing an error if the viewer was deleted, since None has no state.

@rosteen rosteen added bug Something isn't working plugin Label for plugins common to multiple configurations labels Oct 30, 2023
@rosteen rosteen added this to the 3.7.2 milestone Oct 30, 2023
@pllim pllim added the 💤 backport-v3.7.x on-merge: backport to v3.7.x label Oct 30, 2023
@pllim
Copy link
Contributor

pllim commented Oct 30, 2023

Add a test? 😉

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
...nfigs/default/plugins/plot_options/plot_options.py 91.22% <100.00%> (-0.78%) ⬇️
jdaviz/configs/imviz/tests/test_viewers.py 100.00% <100.00%> (ø)

📢 Thoughts on this report? Let us know!.

@rosteen
Copy link
Collaborator Author

rosteen commented Oct 31, 2023

Add a test? 😉

No.

...ok, fiiine 😆

Add test

Fix codestyle

codestyle
@rosteen rosteen force-pushed the let-it-go-plot-options branch from b09a311 to 933650d Compare November 1, 2023 13:22
@rosteen
Copy link
Collaborator Author

rosteen commented Nov 1, 2023

I'm having trouble writing a test that fails on main. The code from the test I added here results in an error traceback on main if run in a notebook context, but passes as a test. Not sure what's missing from the test to get it to fail...

Edit: wait, I lied, in the notebook I was using real images linked by WCS rather than the numpy arrays. If I load the numpy arrays in the notebook it doesn't error 🤔.

@rosteen
Copy link
Collaborator Author

rosteen commented Nov 1, 2023

As discussed offline, going to merge this rather than spending a bunch more time figuring out a test that fails on main. Codecov also seems to be giving a wonky result.

@rosteen rosteen merged commit 309b76b into spacetelescope:main Nov 1, 2023
14 of 15 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/jdaviz that referenced this pull request Nov 1, 2023
pllim added a commit that referenced this pull request Nov 1, 2023
…1-on-v3.7.x

Backport PR #2541 on branch v3.7.x (Don't try to update viewer state if it was deleted)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working plugin Label for plugins common to multiple configurations 💤 backport-v3.7.x on-merge: backport to v3.7.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plot Option breaks when viewer deleted while selected
3 participants