-
Notifications
You must be signed in to change notification settings - Fork 283
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
Create proof of concept: Iris tests fail if any warnings raised #5465
Comments
Linking relevant comment #5463 (comment) |
FutureWarnings can be supressed with a single line in pytest init - same with UserWarnings, although not sure this is the best approach. By raw numbers of warnings raised the biggest culprit is.
Which is fixable by updating iris to Cartopy 0.22 - since this uses Shapely 2.0. See this issue in cartopy confirming resolved in 0.22. Running this test in default_next (which has cartopy 0.22) does fix this. |
Types of warning in pytest outputThis is a breakdown of the different warnings remaining after you filter out FutureWarnings/Userwarnings, and update your environment with the latest iris lockfiles and cartopy 0.22 (which is not in the latest iris lockfiles but is in default-next and required to fix the above warnings) Not Our problem/external warningsWhile these don't have any path to the Iris team fixing them, they are something we should look at supressing, as it's warnings user receives which they cannot act on.
Requires Pyproj to fix - having a look at their codebase they seem to have a workaround for future numpy in place but not something handling the warning for older versions.
Problem is the _quantile function in numpy causing these warnings, so no code we wrote,. Can't see any issues in numpy github about this, Things we can fix
Fix by migrating to new API. Issue already raised at #5491 for the sake of documentation
Probably a one-line fix, but because I don't understand the intended casting behaviour written up a separate issue at #5492
Issue here feeding large arrays as indexes for slicing, which numpy currently supports but won't soon. Spent an hour or two trying to fix and got nowhere, so leaving be
This is a single line in some tests causing this warning, rather than the user-facing codebase. I'm not entirely sure what's triggering it but couldn't fix it with a simple
So, the intent on these tests was to check that cubes data was being properly casted to ndarray from other numpy ndarray subtypes, but looking at the numpy documentation they are moving away from allowing those entirely? These tests might not even be relevant anymore, and even if not when they are deprecated so is the thing they intend to test, so left be. Runtime warningsI haven't looked into these like the DeprecatationWarnings, so leaving them without comments. Not many of them, though.
|
Also there's a np.product -> np.prod find/replace PR at #5493 as part of this |
All warnings brought up in this issue now have their own issues, I consider this issue resolved. |
Steps
DeprecationWarnings
below that do not have their own issues.And the
RunTimeWarnings
?The text was updated successfully, but these errors were encountered: