-
Notifications
You must be signed in to change notification settings - Fork 48
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
Ignore the bounding box ordering warning when reading files #526
Ignore the bounding box ordering warning when reading files #526
Conversation
976dafd
to
2a1fc83
Compare
@pllim can you confirm this prevents the warnings from files you found in your test suites? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #526 +/- ##
==========================================
+ Coverage 87.42% 87.46% +0.03%
==========================================
Files 22 22
Lines 3874 3886 +12
==========================================
+ Hits 3387 3399 +12
Misses 487 487 ☔ View full report in Codecov by Sentry. |
Somehow this broke |
|
||
# Check that no warning is issued for the bounding box of this WCS object | ||
with warnings.catch_warnings(): | ||
warnings.simplefilter("error") |
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.
This filter is probably unnecessary if you already turn all warnings in pytest into exception but probably also does not hurt.
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.
This comment was marked as resolved.
This comment was marked as resolved.
510b4fb
to
3361532
Compare
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.
Downstream PRs are happy. Thanks!
3361532
to
b8e242c
Compare
Any reason why this still unmerged? Once this is merged, I can undo the downstream hackeries. Thanks! |
Old files in the MAST archive have ambiguous encodings for the bounding box which triggers this warning spuriously. Thus this warning should be ignored for written files. The warning exists for dynamically created WCS objects such as those created during a unit test, not those arising from file reads.
b8e242c
to
a79d1be
Compare
because we can not ignore warnings now.
This reverts commit 170d70f. Use spacetelescope/gwcs#526
Old files in the MAST archive have ambiguous encodings for the bounding box which triggers this warning spuriously. Thus this warning should be ignored for written files. The warning exists for dynamically created WCS objects such as those created during a unit test, not those arising from file reads.
This is a compromise that @pllim convinced me would be necessary to avoid user complaints when using GWCS originating form older files they got from MAST.