-
Notifications
You must be signed in to change notification settings - Fork 416
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
Improve testing framework and infrastructure #1454
Conversation
9b51abc
to
aa1e64d
Compare
This pull request introduces 2 alerts when merging aa1e64d into 3569494 - view on LGTM.com new alerts:
|
This pull request introduces 2 alerts when merging d3b10af into 345ddd0 - view on LGTM.com new alerts:
|
d3b10af
to
e6ca470
Compare
This pull request introduces 2 alerts when merging e6ca470 into 345ddd0 - view on LGTM.com new alerts:
|
39f740b
to
11f7e75
Compare
#1455 may make this comment defunct, but would you be able to make the |
11f7e75
to
ecb4976
Compare
Ok, so now we have a function for importing import cartopy.crs as ccrs with ccrs = import_cartopy() If no Doing this and restoring |
This pull request introduces 1 alert when merging ecb4976 into 9acac60 - view on LGTM.com new alerts:
|
This looks good to me, thanks for doing those updates! I might start playing around with #1455 based off of this branch. |
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.
Everything else looks good!
ecb4976
to
76ccbd2
Compare
Just check for Prerelease. This simplifies the matrix configuration and eliminates duplicate state to maintain.
At a minimum, seeding the random number generator needs to be within the fixture, otherwise tests become order-dependent. Since none of the tests are using the values, just use zeros.
Instead, provide the Geodetic CRS as an attribute on CFProjection.
This allows us to run the test suite without CartoPy. This adds two global fixtures that allow tests that need either cartopy.crs or cartopy.feature to have fixture paramters that provide it rather than import the library--the tests are skipped if the import fails. There's also a `needs_cartopy` decorator used to mark tests that need cartopy to function (usually because of `parse_cf`).
Add a function that handles importing cartopy.crs. If this is not importable, a stub will be returned that will emit a useful error message--but only when something is actually used from CartoPy.
This allows us to run the tests without installing PyProj. It adds a decorator for test functions/fixtures that will skip if importing pyproj fails.
76ccbd2
to
2c77a74
Compare
This pull request introduces 1 alert when merging 2c77a74 into 931c114 - view on LGTM.com new alerts:
|
Description Of Changes
While it's nice to be able to have people run the tests with our so-called minimum dependencies, more importantly this allows us to have a CI configuration that proves to us that this is the case. This is not theoretical, at various points we've accidentally had a top-level import of pyproj (even though it's supposed to be "optional"), and before this PR on master we could not import MetPy without CartoPy installed.
This also makes it clear how much of our functionality relies on "optional" dependencies, which is a discussion for another issue...
Checklist