-
Notifications
You must be signed in to change notification settings - Fork 94
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 AreaDefinition array index methods mishandling outer edge values #596
Conversation
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.
Just need to restart the CI jobs that were cancelled.
I merged with |
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'm surprised there is no test accompanying the change? That would make me understand the problem better I suppose :)
Are you telling me you expect me to finish my PRs before you review them? And why don't you remember every conversation you've ever had? Yes...I didn't realize how incomplete this PR was. I just remember we didn't decide on how it should work. I'll see if I can finish it today. |
@mraspaud Tests refactored and added. The bottom line is that you (the user) are not guaranteed values outside of the area that are masked are valid underneath the mask. This is the main question. For other similar methods like |
Unnecessary for unstable testing
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #596 +/- ##
==========================================
- Coverage 94.01% 93.97% -0.04%
==========================================
Files 92 86 -6
Lines 13836 13753 -83
==========================================
- Hits 13008 12925 -83
Misses 828 828
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
All right, I think this looks reasonable. I assuming the existing test cover other user cases, and since tests pass, feel free to merge!
Right. The only test that didn't pass was the one changed in this PR where it specifically checked that values under the mask (where |
An attempt to fix ssec/polar2grid#691
Basically, current bounding operations via
get_area_slices
have trouble when the resulting lon/lat extents match almost exactly with the source area definition. This PR should fix a couple important bugs in the array index retrieval methods of the AreaDefinition:Locally I see one failure where my particular approach has changed the underlying value for elements that are masked and this test specifically checks that that doesn't happen (they stay unchanged).
git diff origin/main **/*py | flake8 --diff