-
-
Notifications
You must be signed in to change notification settings - Fork 66
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 for HighLevelWCS attribute error #349
Conversation
Codecov Report
@@ Coverage Diff @@
## main #349 +/- ##
==========================================
- Coverage 92.44% 92.36% -0.09%
==========================================
Files 24 24
Lines 821 825 +4
==========================================
+ Hits 759 762 +3
- Misses 62 63 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I think the best fix might be to actually make it so that |
I'm happy with that approach, I just wasn't sure it was intended. I'd already prepped a version that worked like that; I'll push it shortly |
Ah, the weird thing is, what |
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 overall but just a couple of comments!
My spammed changes will need to be squashed of course |
@astrofrog I'm going to revert the change you suggested; it is invalid. If we use |
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 now! Just a small comment below, and otherwise just need to fix the code style and squash commits. Thanks!
fix typo fix bugs might've fixed it? try to add a test (it doesn't test what I want, but it adds _some_ coverage) and add a hack-fix _actually_ expand test coverage; forgot to pass args on previously black black
in modding has_celestial implement Tom's suggestions fix fix^2 the recursive approach might allow for infinite loops fix the unbound local error remove unnecessary test
If this test code is injected at the start of reproject_single_block, the error will occur print(has_celestial(HighLevelWCSWrapper(SlicedLowLevelWCS(wcs_out, slices=slices)))) style fixes style black
2bc6146
to
60baa56
Compare
One outstanding issue: the So... I'm going to remove that unnecessary code. |
This fixes #348, which is caused by a HighLevelWCSWrapper being passed where a LowLevelWCS object is expected.
@astrofrog I don't understand how this happens, as it's something created in a tall dask command tree by spectral-cube. I can't come up with a minimal example that reproduces this error.
I added test coverage, but none of these tests reproduce the error. They do, however, do add coverage by testing the
_reproject_blocked
code, which afaict was not covered at all (though I could easily have missed it)