Open djhoese opened 2 months ago
I merged with main
to trigger the tests, there were no "re-run failed jobs" available anymore.
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 get_lonlat_from_array_indices
, no masking is done no matter what. You can request coordinates outside of the AreaDefinition. The special thing about the method in question here is that it is returning array indices, not coordinates. There's get_array_coordinates_from_lonlat
for that case. So...what are we allowed to do with masked values?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 93.97%. Comparing base (
56f4506
) to head (8feba45
). Report is 5 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
An attempt to fix https://github.com/ssec/polar2grid/issues/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