Repository navigation
Conversation
djhoese
left a comment
There was a problem hiding this comment.
Nice catch. Thanks for the fix. If you're using an AI could you replace the test class with a pytest test function that uses parametrize over all these cases? If not using an AI, don't worry about it.
|
Done, it's one parametrized test function now. The two 0 degree cases still fail without the fix. |
| class LongitudeMaskingCompositor(SingleBandCompositor): | ||
| """Masks areas outside defined longitudes.""" | ||
|
|
||
| def __init__(self, name, lon_min=None, lon_max=None, **kwargs): # noqa: D417 |
There was a problem hiding this comment.
Should we just make the defaults -180.0 and 180.0? Then the if condition below can check for those values rather than None. You could also remove the float type definition in the docstring and specify it as a type annotation in the method definition (ex. name: str, lon_min: float = None, lat_min: float = None). Thoughts?
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3536 +/- ##
==========================================
+ Coverage 96.44% 96.47% +0.02%
==========================================
Files 474 475 +1
Lines 61377 61436 +59
==========================================
+ Hits 59194 59268 +74
+ Misses 2183 2168 -15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LongitudeMaskingCompositor replaced lon_min=0 with -180 and lon_max=0 with 180 because the defaults were set with
if not ..., so a 0 to 90E box kept everything from 180W to 90E. Now only None gets the default. Added 0 degree cases to the existing masking test.AUTHORS.mdif not there already