-
Notifications
You must be signed in to change notification settings - Fork 19
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 most warnings during tests #157
Conversation
utcnow is deprecated in Python 3.12
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #157 +/- ##
==========================================
- Coverage 91.60% 91.57% -0.03%
==========================================
Files 12 12
Lines 4004 4014 +10
==========================================
+ Hits 3668 3676 +8
- Misses 336 338 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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!
I added the area defs for writer tests in Satpy. If I get bored, I could start adding them also on Trollimage tests. |
I got a little nervous changing the tests because I know Martin modified some in his PR and didn't want to cause too many conflicts. Let me see how many there are...33 test failures. |
# Conflicts: # trollimage/tests/test_image.py
In an effort to catch issues sooner, this PR configures pytest to error on any warnings. This is configured in pyproject.toml. This PR also includes a fix for the weber fechner stretching method where data was not clipped to what should be considered the minimum input stimuli (s0).
The 2 errors that are globally ignored by pytest are:
The first one is to ignore all the times our test save to a geotiff but don't include an AreaDefinition so no geotransform information is set. This happens in so many spots I didn't want to try to fix them all in this PR and I'm not sure it is worth the time and effort.
The second, as mentioned in the comment, should be fixed when #149 gets merged.
git diff origin/master **/*py | flake8 --diff
(remove if you did not edit any Python files)