-
Notifications
You must be signed in to change notification settings - Fork 295
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
Cleanup various warnings encountered during tests #2625
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2625 +/- ##
==========================================
+ Coverage 95.18% 95.20% +0.02%
==========================================
Files 354 354
Lines 51316 51368 +52
==========================================
+ Hits 48846 48906 +60
+ Misses 2470 2462 -8
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Pull Request Test Coverage Report for Build 6816253255
💛 - Coveralls |
This doesn't fix all, but fixes a large chunk of the warnings in the stable environments and the errors in the unstable. There is a patch that isn't released for h5py that will fix the errors about byte order. The skyfield package is not numpy 2 compatible yet and I'm not sure if/what the timeline is there, but even fixing it locally for the error we're seeing I'm seeing strange errors afterward about pandas/xarray trying to interpret our Most of the ones I fixed seemed to be related to numpy warnings being filtered by dask or xarray and hiding the new numpy dtype casting errors that numpy 2.0 is throwing at us. We apparently do a lot of |
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 one question
Ok I think this is as close as we're going to get to numpy 2.0 compatibility for now. We're waiting on:
Note: With numpy 2.0 we are going to very likely be upcasting a lot of arrays by accident. Much of this is due to an xarray "bug". See pydata/xarray#8402 for more details. |
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 a lot for tackling all those issues!
Based on some comments by @gerritholl on slack, I added some xfails for the specific cases where we expect the tests to fail. Those being:
Let's see how CI goes... |
Something in a recent change makes xarray or numpy allow for `str + DataArray` returning a DataArray and this makes `datetime.strptime` mad.
Tests used a 16-bit signed integer, but real world data is unsigned. Using signed results in not being able to mask with expected quality flags
Numpy 2.0 complains about 1000 not fitting in a uint8, but I also cast other large numbers to be a little safe.
01443a2
to
c8e7464
Compare
Ok I'm pretty sure this PR is ready now. As mentioned above, the known numpy 2 related failures are marked as xfail for only the UNSTABLE environment and only with specific versions or specific known incompatibilities. Once those are fixed or new releases come out then the tests should be expected to pass. |
@mraspaud could you re-review this since I've done a lot more work since your original approval. |
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, thanks a lot for the hard work! I just have two minor things inline, but no show-stopper
Ok, with your two comment threads being resolved and your review being approval I think I'll merge this today. It's a little late for European comment, but if anyone else wants to provide feedback let me know what you think. |
I did one more commit to make codebeat happier. Edit: Haha codebeat now says that |
Fixes various warnings in regular CI and some that have turned into errors in unstable CI.
Let's see how many I can get in a single go...
AUTHORS.md
if not there already