-
Notifications
You must be signed in to change notification settings - Fork 297
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
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.09% 96.08% -0.02%
==========================================
Files 377 377
Lines 55125 55125
==========================================
- Hits 52975 52967 -8
- Misses 2150 2158 +8
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 11632483694Details
💛 - 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:
|
Closes #2963 |
Could you merge the Pytroll And maybe next time create the PR from a new branch, I can't seem to be doing the update to your |
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.
Thanks for the fix!
Fixes the following uint8 overflow when loading Himawari hrit data distributed by EumetCast: