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

Fix updating coordinate displaying when blinking via click #1470

Merged
merged 2 commits into from
Jul 11, 2022

Conversation

kecnry
Copy link
Member

@kecnry kecnry commented Jul 8, 2022

Description

This pull request fixes the coordinate display (in imviz or cubeviz) to update when blinking via clicking (the "b" hotkey worked already).

This is failing coverage checks - but we never had coverage on the click event and don't have a good way to simulate that afaik.

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 change log needed? If yes, is it added to CHANGES.rst?
  • Is a milestone set?
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@kecnry kecnry added bug Something isn't working trivial Only needs one approval instead of two labels Jul 8, 2022
@kecnry kecnry added this to the 2.8 milestone Jul 8, 2022
@github-actions github-actions bot added the imviz label Jul 8, 2022
@kecnry kecnry mentioned this pull request Jul 8, 2022
24 tasks
@kecnry kecnry marked this pull request as ready for review July 8, 2022 19:52
@codecov
Copy link

codecov bot commented Jul 8, 2022

Codecov Report

Merging #1470 (f9783c5) into main (aec90f1) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1470      +/-   ##
==========================================
+ Coverage   85.38%   85.40%   +0.02%     
==========================================
  Files          91       91              
  Lines        8476     8478       +2     
==========================================
+ Hits         7237     7241       +4     
+ Misses       1239     1237       -2     
Impacted Files Coverage Δ
jdaviz/configs/imviz/plugins/tools.py 84.49% <100.00%> (+1.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aec90f1...f9783c5. Read the comment docs.

@@ -111,9 +111,13 @@ def activate(self):
def deactivate(self):
self.viewer.remove_event_callback(self.on_click)

def on_click(self, *args):
def on_click(self, data):
Copy link
Contributor

@pllim pllim Jul 8, 2022

Choose a reason for hiding this comment

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

If you really want to test this, you can write a test that is not unlike what is being done in https://github.com/spacetelescope/jdaviz/blob/main/jdaviz/configs/imviz/tests/test_linking.py 😉

Copy link
Member Author

Choose a reason for hiding this comment

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

Since that test already uses the "b" key twice, I just changed one of them to make use of the click (so that we have coverage for both cases).

Copy link
Collaborator

@rosteen rosteen left a comment

Choose a reason for hiding this comment

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

Works as expected, looks good to me.

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.

LGTM. Thanks!

@pllim pllim merged commit ebf8cc3 into spacetelescope:main Jul 11, 2022
@kecnry kecnry deleted the blink-click-update branch July 11, 2022 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working imviz trivial Only needs one approval instead of two
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants