-
Notifications
You must be signed in to change notification settings - Fork 228
CI: Add a separate CI job on Ubuntu to test geopandas v0.x #3420
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
Conversation
Co-authored-by: Yvonne Fröhlich <[email protected]>
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.
Thinking if we should generalize this to test minimum supported versions of all optional dependencies (contextily, geopandas, rioxarray, etc). uv
has this --resolution lowest-direct
flag (see here) that "will use the lowest compatible versions for all direct dependencies, while using the latest compatible versions for all other dependencies". Would be nice if mamba had something similar.
.github/workflows/ci_tests.yaml
Outdated
@@ -79,6 +79,14 @@ jobs: | |||
pandas-version: '' | |||
xarray-version: '' | |||
optional-packages: ' contextily geopandas ipython pyarrow rioxarray sphinx-gallery' | |||
# The job below is for testing geopandas v0.x on Ubuntu. Python 3.11 is used |
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 PR adds a separate CI job in which geopandas v0.x is installed. The CI job has to use Python 3.11, otherwise other Python 3.10/3.12 jobs will be override by this one. The job also only runs on Ubuntu, to avoid using too many CI resources.
Could we test geopandas v0.x in ci_tests_legacy.yaml
instead? Or do we want to test it more regularly than that?
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.
We can, but in coverage reports the geopandas v0.x would be uncovered since the Legacy workflow doesn't produce coverage reports.
it sounds a good idea, but we are approaching the 10GB size limit of GitHub caches https://github.com/GenericMappingTools/pygmt/actions/caches. |
Co-authored-by: Wei Ji <[email protected]>
We should note that we currently don't set the minimum required versions for the optional dependencies. |
The CI job with geopandas v0.x worked in previous runs (e.g., https://github.com/GenericMappingTools/pygmt/actions/runs/10694655883/job/29646773799?pr=3420) and suddenly failed now (e.g., https://github.com/GenericMappingTools/pygmt/actions/runs/10857583544/job/30146872146?pr=3420).
The most notable difference is fiona v1.9 in old runs and v1.10 in the latest runs. |
Fixed in 63f1e74. The issue also highlights the importance of testing geopandas v0.x. |
Yeah, should we come up with a policy for this? E.g. extend SPEC 0 with a recommendation like:
For reference, |
Yes, it's more maintenance burden to us. I actually prefer to not set any minimum pins for optional dependencies and rely on the package manager like |
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.
Downside with this is more maintenance effort, since we need to update the minimum pins for optional dependencies more often.
Yes, it's more maintenance burden to us. I actually prefer to not set any minimum pins for optional dependencies and rely on the package manager like
mamba
/conda
to install whatever versions that are compatible with the core dependencies.
Opened separate issue at #3456 to discuss this. Ok to merge this in now.
Description of proposed changes
In #3247, we added codes to deal with compatibility with both GeoPandas v0.x and v1.x, but our CI jobs only install GeoPandas v1.x now, leaving the codes for geopandas v0.x untested (see https://app.codecov.io/gh/GenericMappingTools/pygmt/blob/main/pygmt%2Fhelpers%2Ftempfile.py#L146).
This PR adds a separate CI job in which geopandas v0.x is installed. The CI job has to use Python 3.11, otherwise other Python 3.10/3.12 jobs will be override by this one. The job also only runs on Ubuntu, to avoid using too many CI resources.
With the new CI job, the geopandas v0.x codes are covered and the code coverage increases by 0.32%.