-
Notifications
You must be signed in to change notification settings - Fork 292
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 data type when getting a line offset for a segmented hrit_jma #2930
base: main
Are you sure you want to change the base?
Conversation
@k3a thanks for your contribution! Do you think you can add a little test for this (to ensure that the bug doesn't come back in the future), and add your name to the Authors files? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2930 +/- ##
========================================
Coverage 96.07% 96.08%
========================================
Files 373 377 +4
Lines 54491 55067 +576
========================================
+ Hits 52352 52909 +557
- Misses 2139 2158 +19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Pull Request Test Coverage Report for Build 11416592783Details
💛 - Coveralls |
No new tests seem necessary. I have just updated the _get_mda helper function to convert into the proper numpy types according to the dtype specs. |
If the existing tests didn't fail before your fix then we need new tests that would fail and now pass unless I'm misunderstanding something. |
I don't have an up-to-date environment at hand, but I think the modified data represents more closely the actual data, so might fail without the changes in the code. I'll see if I have the time to create a new env to test with. |
I have, of course, tested that the current tests will fail without the fix. There are tests testing the case with segmented hrit but that _get_mda needs to retype args into proper np types to trigger this bug because when data is parsed it is parsed into those concrete types, not a generic python ints:
|
Fixes the following uint8 overflow when loading Himawari hrit data distributed by EumetCast: