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

BUG: Home after markers no longer crash Imviz #1971

Merged
merged 2 commits into from
Jan 24, 2023

Conversation

pllim
Copy link
Contributor

@pllim pllim commented Jan 19, 2023

Description

This pull request is to prevent crashing in Imviz when Home is clicked on after markers are added.

Fixes #1964

Change log entry

  • Is a change log needed? If yes, is it added to CHANGES.rst? If you want to avoid merge conflicts,
    list the proposed change log here for review and add to CHANGES.rst before merge. If no, maintainer
    should add a no-changelog-entry-needed label.

Checklist for package maintainer(s)

This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.

  • Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the trivial label.
  • Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
  • Do the proposed changes follow the STScI Style Guides?
  • Are tests added/updated as required? If so, do they follow the STScI Style Guides?
  • Are docs added/updated as required? If so, do they follow the STScI Style Guides?
  • Did the CI pass? If not, are the failures related?
  • Is a milestone set? Set this to bugfix milestone if this is a bug fix and needs to be released ASAP; otherwise, set this to the next major release milestone.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@pllim pllim added bug Something isn't working 💤 backport-v3.2.x on-merge: backport to v3.2.x labels Jan 19, 2023
@pllim pllim added this to the 3.2.1 milestone Jan 19, 2023
@codecov
Copy link

codecov bot commented Jan 19, 2023

Codecov Report

Base: 91.93% // Head: 91.94% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (8b0ff3b) compared to base (8f8106b).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1971   +/-   ##
=======================================
  Coverage   91.93%   91.94%           
=======================================
  Files         140      140           
  Lines       15310    15311    +1     
=======================================
+ Hits        14076    14078    +2     
+ Misses       1234     1233    -1     
Impacted Files Coverage Δ
...daviz/configs/imviz/tests/test_astrowidgets_api.py 98.58% <100.00%> (+<0.01%) ⬆️
jdaviz/core/freezable_state.py 91.66% <100.00%> (+1.38%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -323,6 +323,10 @@ def test_mvp_markers(self):
# TODO: How to check imviz.app.data_collection.links is correct?
assert len(self.imviz.app.data_collection.links) == 14

# Just want to make sure nothing crashes. Zooming already testing elsewhere.
# https://github.com/spacetelescope/jdaviz/pull/1971
self.viewer.zoom_level = 'fit'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the record, I did confirm locally that this test fails on main without this patch.

@pllim pllim marked this pull request as ready for review January 20, 2023 11:31
@pllim pllim requested a review from camipacifici January 20, 2023 11:31
Copy link
Contributor

@camipacifici camipacifici left a comment

Choose a reason for hiding this comment

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

Works! Thank you!

Copy link
Member

@kecnry kecnry left a comment

Choose a reason for hiding this comment

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

Elegant fix, thanks!

(Failure seems unrelated, but I started the failed job to try to get CI green)

@pllim
Copy link
Contributor Author

pllim commented Jan 24, 2023

The dev failure is unrelated. I thought numpy-dev fixed that __code__ stuff already, but not our problem regardless.

Thanks for the reviews!

@pllim pllim merged commit 74c7655 into spacetelescope:main Jan 24, 2023
@pllim pllim deleted the marker-phone-home branch January 24, 2023 19:50
meeseeksmachine pushed a commit to meeseeksmachine/jdaviz that referenced this pull request Jan 24, 2023
pllim added a commit that referenced this pull request Jan 24, 2023
…1-on-v3.2.x

Backport PR #1971 on branch v3.2.x (BUG: Home after markers no longer crash Imviz)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Ready for final review 💤 backport-v3.2.x on-merge: backport to v3.2.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Imviz: hitting home when markers present returns traceback
3 participants