-
Notifications
You must be signed in to change notification settings - Fork 76
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 reference data for WCS to Pixels to WCS #2751
Conversation
Is this going in circles? jdaviz/jdaviz/configs/imviz/plugins/orientation/orientation.py Lines 410 to 413 in deda388
triggers Line 546 in deda388
that is being listened back in jdaviz/jdaviz/configs/imviz/plugins/orientation/orientation.py Lines 122 to 123 in deda388
that calls this
that would trigger this again? jdaviz/jdaviz/configs/imviz/plugins/orientation/orientation.py Lines 410 to 413 in deda388
|
2b9e9b5
to
22d6eb4
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2751 +/- ##
==========================================
+ Coverage 88.70% 88.72% +0.01%
==========================================
Files 108 110 +2
Lines 16305 16353 +48
==========================================
+ Hits 14464 14509 +45
- Misses 1841 1844 +3 ☔ View full report in Codecov by Sentry. |
I think it could potentially get called one extra time, but the second time |
Theoretically Orientation is the only plugin that is allowed to change the ref data, right? There is no reason for it to listen to its own message? |
You can also change the ref data through the viewer data menu, so the Orientation plugin needs to see those events to stay in synch. |
Right... 😒 Thanks for the reminder! |
Drats, I thought there was a good chance that this also fixed the bug I was trying to fix on Friday, but it didn't. I did confirm that it fixes the intended use case though. I'll take a look at the actual code before approving. |
Sorry for the messy diff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I tested a couple more edge cases. I left one comment about an error message but other than that the code looks fine.
Code suggestion accepted. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this out in ImvizDitheredExample and it works well for me.
There was one instance when I was messing around with it that when you did some combination of linking, adding and removing viewers, etc, that after that it because very laggy (particularly with subset creation, they were taking 5+ seconds to appear after drawing), but I can't seem to recreate that same scenario.
Would it be possible to add additional test coverage? A lot of the lines are not covered
OK looks like the lines are some safeguards that didn't get triggered by test suite. I can look into that as part of this PR but I should probably rebase first. 🤞 UPDATE: Never mind. The uncovered lines are basically impossible to reach via plugin safeguards but does not hurt to keep them. I just marked them as uncovered for now. |
b60f9e5
to
2b77353
Compare
@@ -130,6 +130,7 @@ def test_markers_cubeviz(cubeviz_helper, spectrum1d_cube): | |||
|
|||
# appears as option in export plugin and exports successfully | |||
assert "Markers:table" in exp.table.choices | |||
exp.filename = str(tmp_path / "cubeviz_export.ecsv") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xref #2755
Change log failure is unrelated but something I need to fix anyway: scientific-python/action-check-changelogfile#13 |
Co-authored-by: Ricky O'Steen <39831871+rosteen@users.noreply.github.com>
and fix import after rebase
because these are for really unlikely edge cases that cannot be reached via the plugin GUI anyway
2a3a0c2
to
f1ba4a6
Compare
Clare verbally approved the PR at tag up this morning, so I am just going to merge when CI is green. |
haha yes i retroactively approve :) |
Description
I corrected the test first. Will push commit(s) out later when I can figure out how to fix it properly.
Fixes #2724
Change log entry
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, maintainershould 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.
trivial
label.