-
Notifications
You must be signed in to change notification settings - Fork 320
Remove pyspectral downloading from tests and fail if used #3260
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
base: main
Are you sure you want to change the base?
Conversation
| Needs pyorbital, skyfield, and astropy to be installed. | ||
| """ | ||
| from pyorbital.orbital import tlefile |
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.
This import was wrong and is no longer available in future versions of pyorbital. I removed it in a PR last week to avoid import-time side effects.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3260 +/- ##
=======================================
Coverage 96.29% 96.29%
=======================================
Files 463 463
Lines 58136 58163 +27
=======================================
+ Hits 55983 56010 +27
Misses 2153 2153
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
With very little effort of just comparing executing times of the unit test steps to a previous execution: CI on the ubuntu 3.12 false environment ran unit tests 50 seconds faster. |
Pull Request Test Coverage Report for Build 18452799198Details
💛 - Coveralls |
pnuu
left a comment
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.
I'm not sure I follow completely how this works, but I certainly approve of forcing the download to be disabled.
|
For hopefully a little clarification: pytest always loads any I also defined it as a session scope so it should hopefully only run at the start of testing and not be enabled/disabled/enabled/disabled/enabled and so on for every test. I think that should be fine even with our "pytest-xdist" usage where it runs tests in parallel but I should confirm that. |
|
Did a quick check and I think this should be fine. I think it is run once per worker, but is actually executed so that's fine. |
mraspaud
left a comment
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.
For reference, as I said on slack, I would like the rayleigh and calculator mocks to be outsourced to pyspectral, eg in a "testing" module. See also: pytroll/pyspectral#262
I noticed while working on other PRs that some of the CI tests were failing with HTTP hiccups trying to download pyspectral LUTs. Turns out this has been happening for years and is a major waste of resources even though it was nice to have the full processing being tested, it isn't "right" in my opinion. This PR:
autospecso Satpy's usage will always match upstream pyspectral.requestslibrary so tests fail if they make pyspectral download anything.AUTHORS.mdif not there already