-
Notifications
You must be signed in to change notification settings - Fork 234
WIP: Test lowest versions of all required and optional dependencies #3639
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?
Changes from 5 commits
3a5d6da
f303964
3f6909d
788fc46
4139f4e
1263075
d1fa38d
1c69406
3b7b777
6120bbe
3299229
0584459
7d542a9
4733bda
e24a6c2
52c78fa
d64087e
af01f75
3cb017c
fe0caf2
15da090
170fb09
b1e26da
b079acc
b7814ed
fe20756
2cc4ba2
f54d002
834be64
8ce0755
4540a5d
668cbe1
f5db0ad
0d8ec91
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| # Test PyGMT with GMT legacy versions on Linux/macOS/Windows | ||
| # Test PyGMT with GMT legacy versions and old Python dependencies on Linux/macOS/Windows | ||
| # | ||
| # This workflow runs regular PyGMT tests with GMT legacy versions. Due to the minor | ||
| # baseline image changes between GMT versions, the workflow only runs the tests but | ||
| # doesn't do image comparisons. | ||
| # This workflow runs regular PyGMT tests with GMT legacy versions and old versions of | ||
| # all optional Python dependencies. Due to the minor baseline image changes between GMT | ||
| # versions, the workflow only runs the tests but doesn't do image comparisons. | ||
| # | ||
| # It is scheduled to run every Tuesday on the main branch. | ||
| # | ||
|
|
@@ -12,7 +12,7 @@ on: | |
| # push: | ||
| # branches: [ main ] | ||
| # Uncomment the 'pull_request' line below to trigger the workflow in PR | ||
| # pull_request: | ||
| pull_request: | ||
| # types: [ready_for_review] | ||
| # paths: | ||
| # - 'pygmt/**' | ||
|
|
@@ -62,23 +62,6 @@ jobs: | |
| python=3.10 | ||
| gmt=${{ matrix.gmt_version }} | ||
| ghostscript<10 | ||
| numpy | ||
| pandas | ||
| xarray | ||
| netCDF4 | ||
| packaging | ||
| contextily | ||
| geopandas | ||
| ipython | ||
| pyarrow | ||
| rioxarray | ||
| sphinx-gallery | ||
| make | ||
| pip | ||
| python-build | ||
| pytest | ||
| pytest-doctestplus | ||
| pytest-mpl | ||
|
|
||
| # Download cached remote files (artifacts) from GitHub | ||
| - name: Download remote data from GitHub | ||
|
|
@@ -95,10 +78,18 @@ jobs: | |
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
|
|
||
| # Install uv package manager | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v3 | ||
|
|
||
| # Install the package that we want to test | ||
| - name: Install the package | ||
| run: make install | ||
| run: | | ||
| uv run --with pip==23 --resolution lowest-direct --all-extras --dev make install | ||
| uv pip list | ||
|
|
||
| # Run the tests but skip images | ||
| - name: Run tests | ||
| run: make test_no_images PYTEST_EXTRA="-r P" | ||
| run: uv run --with pytest==8 --resolution lowest-direct --all-extras --dev make test_no_images PYTEST_EXTRA="-r P" | ||
| env: | ||
| GMT_LIBRARY_PATH: $CONDA_PREFIX/lib | ||
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,18 +33,18 @@ dependencies = [ | |
| "numpy>=1.24", | ||
| "pandas>=2.0", | ||
| "xarray>=2023.04", | ||
| "netCDF4", | ||
| "netCDF4>=1.7", | ||
|
||
| "packaging", | ||
| ] | ||
| dynamic = ["version"] | ||
|
|
||
| [project.optional-dependencies] | ||
| all = [ | ||
| "contextily", | ||
| "geopandas", | ||
| "IPython", # 'ipython' is not the correct module name. | ||
| "pyarrow", | ||
| "rioxarray", | ||
| "contextily>=1", | ||
| "geopandas>=0.14", | ||
| "IPython>=8", # 'ipython' is not the correct module name. | ||
| "pyarrow>=14", | ||
| "rioxarray>=0.14", | ||
|
||
| ] | ||
|
|
||
| [project.urls] | ||
|
|
||
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.
Using
--resolution lowest-directfor now, because--resolution lowestgrabs many other transitive dependencies that may be hard to install (e.g. missing wheels for newer Python versions, so requires compilation from source). We could switch to--resolution lowestonce the Python ecosystem does lower bound pins a bit more thoroughly (which may take years).