-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into pytest/random
- Loading branch information
Showing
221 changed files
with
3,718 additions
and
2,122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ jobs: | |
steps: | ||
# Checkout current git repository | ||
- name: Checkout | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].7 | ||
with: | ||
# fetch all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
@@ -45,7 +45,7 @@ jobs: | |
|
||
# Install Micromamba with conda-forge dependencies | ||
- name: Setup Micromamba | ||
uses: mamba-org/setup-micromamba@v1.8.1 | ||
uses: mamba-org/setup-micromamba@v1.9.0 | ||
with: | ||
environment-name: pygmt | ||
condarc: | | ||
|
@@ -69,9 +69,7 @@ jobs: | |
pytest | ||
pytest-codspeed | ||
pytest-mpl | ||
pytest-rerunfailures | ||
pytest-xdist | ||
# Download cached remote files (artifacts) from GitHub | ||
- name: Download remote data from GitHub | ||
run: | | ||
|
@@ -89,7 +87,7 @@ jobs: | |
|
||
# Run the benchmark tests | ||
- name: Run benchmarks | ||
uses: CodSpeedHQ/action@v2.4.1 | ||
uses: CodSpeedHQ/action@v3.0.0 | ||
with: | ||
# 'bash -el -c' is needed to use the custom shell. | ||
# See https://github.com/CodSpeedHQ/action/issues/65. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,14 +36,14 @@ jobs: | |
steps: | ||
# Checkout current git repository | ||
- name: Checkout | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].7 | ||
with: | ||
# fetch all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
||
# Install Micromamba with conda-forge dependencies | ||
- name: Setup Micromamba | ||
uses: mamba-org/setup-micromamba@v1.8.1 | ||
uses: mamba-org/setup-micromamba@v1.9.0 | ||
with: | ||
environment-name: pygmt | ||
condarc: | | ||
|
@@ -58,7 +58,7 @@ jobs: | |
xarray | ||
netCDF4 | ||
packaging | ||
build | ||
python-build | ||
# Install the package that we want to test | ||
- name: Install the package | ||
|
@@ -76,9 +76,10 @@ jobs: | |
|
||
# Upload the downloaded files as artifacts to GitHub | ||
- name: Upload artifacts to GitHub | ||
uses: actions/upload-artifact@v4 | ||
uses: actions/upload-artifact@v4.4.0 | ||
with: | ||
name: gmt-cache | ||
include-hidden-files: true | ||
path: | | ||
~/.gmt/cache | ||
~/.gmt/server | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,12 +23,12 @@ jobs: | |
|
||
steps: | ||
- name: Checkout the repository | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].7 | ||
with: | ||
path: repository | ||
|
||
- name: Checkout the documentation | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].7 | ||
with: | ||
ref: gh-pages | ||
path: documentation | ||
|
@@ -37,18 +37,23 @@ jobs: | |
id: lychee | ||
uses: lycheeverse/[email protected] | ||
with: | ||
output: /tmp/lychee-out.md | ||
# 429: Too many requests | ||
args: > | ||
--accept 429 | ||
--exclude-mail | ||
--exclude "^https://doi.org/10.5281/zenodo$" | ||
--exclude "^https://zenodo.org/badge/DOI/$" | ||
--exclude "^https://zenodo.org/badge/DOI/10.5281/zenodo$" | ||
--exclude "^https://github.com/GenericMappingTools/pygmt/pull/[0-9]*$" | ||
--exclude "^https://github.com/GenericMappingTools/pygmt/issues/[0-9]*$" | ||
--exclude "^https://github.com/GenericMappingTools/gmt/releases/tag/X.Y.Z$" | ||
--exclude "^https://github.com/GenericMappingTools/pygmt/edit" | ||
--exclude "^https://github.com/GenericMappingTools/pygmt/issues/new" | ||
--exclude "^https://github.com/GenericMappingTools/pygmt/releases/tag/%7B%7Bpath%7D%7D" | ||
--exclude "^https://www.pygmt.org/%7B%7Bpath%7D%7D" | ||
--exclude "^git" | ||
--exclude "^file://" | ||
--exclude "https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf" | ||
--exclude "^https://docs.generic-mapping-tools.org/6.5/%s$" | ||
--exclude "^https://docs.generic-mapping-tools.org/6.5/%3Cmodule-name%3E.html$" | ||
--exclude "^https://www.generic-mapping-tools.org/remote-datasets/%s$" | ||
|
@@ -69,7 +74,8 @@ jobs: | |
- name: Create Issue From File | ||
if: env.lychee_exit_code != 0 | ||
run: | | ||
cd repository/ | ||
title="Link Checker Report on ${{ steps.date.outputs.date }}" | ||
gh issue create --title "$title" --body-file ./lychee/out.md | ||
gh issue create --title "$title" --body-file /tmp/lychee-out.md | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,7 +69,7 @@ jobs: | |
steps: | ||
# Checkout current git repository | ||
- name: Checkout | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].7 | ||
with: | ||
# fetch all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
@@ -80,7 +80,7 @@ jobs: | |
|
||
# Install Micromamba with conda-forge dependencies | ||
- name: Setup Micromamba | ||
uses: mamba-org/setup-micromamba@v1.8.1 | ||
uses: mamba-org/setup-micromamba@v1.9.0 | ||
with: | ||
environment-name: pygmt | ||
condarc: | | ||
|
@@ -94,20 +94,20 @@ jobs: | |
create-args: >- | ||
python=3.12 | ||
gmt=6.5.0 | ||
ghostscript=10.03.0 | ||
ghostscript=10.04.0 | ||
numpy | ||
pandas | ||
xarray | ||
netCDF4 | ||
packaging | ||
contextily | ||
geopandas | ||
geopandas<1.0 | ||
ipython | ||
rioxarray | ||
build | ||
make | ||
pip | ||
myst-parser | ||
python-build | ||
myst-nb | ||
panel | ||
sphinx | ||
sphinx-autodoc-typehints | ||
|
@@ -138,7 +138,7 @@ jobs: | |
run: make -C doc clean all | ||
|
||
- name: Checkout the gh-pages branch | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].7 | ||
with: | ||
ref: gh-pages | ||
# Checkout to this folder instead of the current one | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,14 +35,14 @@ jobs: | |
steps: | ||
# Checkout current git repository | ||
- name: Checkout | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].7 | ||
with: | ||
# fetch all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
||
# Install Micromamba with conda-forge dependencies | ||
- name: Setup Micromamba | ||
uses: mamba-org/setup-micromamba@v1.8.1 | ||
uses: mamba-org/setup-micromamba@v1.9.0 | ||
with: | ||
environment-name: pygmt | ||
condarc: | | ||
|
@@ -62,9 +62,9 @@ jobs: | |
ipython | ||
pyarrow | ||
rioxarray | ||
build | ||
make | ||
pip | ||
python-build | ||
pytest | ||
pytest-doctestplus | ||
pytest-mpl | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,15 +70,24 @@ jobs: | |
# Only install optional packages on Python 3.12 | ||
include: | ||
- python-version: '3.10' | ||
numpy-version: '1.23' | ||
numpy-version: '1.24' | ||
pandas-version: '=1.5' | ||
xarray-version: '=2022.06' | ||
xarray-version: '=2022.09' | ||
optional-packages: '' | ||
- python-version: '3.12' | ||
numpy-version: '1.26' | ||
numpy-version: '2.1' | ||
pandas-version: '' | ||
xarray-version: '' | ||
optional-packages: ' contextily geopandas ipython pyarrow rioxarray sphinx-gallery' | ||
# The job below is for testing geopandas v0.x on Ubuntu. | ||
# The python-version here can't be the versions in the matrix.python-version | ||
# defined above. Otherwise, other jobs will be overridden by this one. | ||
- os: 'ubuntu-latest' | ||
python-version: '3.11' # Can't be 3.10 or 3.12. | ||
numpy-version: '1.24' | ||
pandas-version: '' | ||
xarray-version: '' | ||
optional-packages: ' geopandas<1' | ||
|
||
timeout-minutes: 30 | ||
defaults: | ||
|
@@ -94,7 +103,7 @@ jobs: | |
steps: | ||
# Checkout current git repository | ||
- name: Checkout | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].7 | ||
with: | ||
# fetch all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
@@ -105,7 +114,7 @@ jobs: | |
|
||
# Install Micromamba with conda-forge dependencies | ||
- name: Setup Micromamba | ||
uses: mamba-org/setup-micromamba@v1.8.1 | ||
uses: mamba-org/setup-micromamba@v1.9.0 | ||
with: | ||
environment-name: pygmt | ||
condarc: | | ||
|
@@ -119,16 +128,16 @@ jobs: | |
create-args: >- | ||
python=${{ matrix.python-version }}${{ matrix.optional-packages }} | ||
gmt=6.5.0 | ||
ghostscript=10.03.0 | ||
ghostscript=10.04.0 | ||
numpy=${{ matrix.numpy-version }} | ||
pandas${{ matrix.pandas-version }} | ||
xarray${{ matrix.xarray-version }} | ||
netCDF4 | ||
packaging | ||
build | ||
dvc | ||
make | ||
pip | ||
python-build | ||
pytest | ||
pytest-cov | ||
pytest-doctestplus | ||
|
@@ -150,27 +159,27 @@ jobs: | |
|
||
# Pull baseline image data from dvc remote (DAGsHub) | ||
- name: Pull baseline image data from dvc remote | ||
run: dvc pull --verbose && ls -lhR pygmt/tests/baseline/ | ||
run: dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/ | ||
|
||
# Install the package that we want to test | ||
- name: Install the package | ||
run: make install | ||
|
||
# Run the regular tests | ||
- name: Run tests | ||
run: make test PYTEST_EXTRA="-r P" | ||
run: make test PYTEST_EXTRA="-r P -n auto --reruns 2" | ||
|
||
# Upload diff images on test failure | ||
- name: Upload diff images if any test fails | ||
uses: actions/upload-artifact@v4 | ||
uses: actions/upload-artifact@v4.4.0 | ||
if: failure() | ||
with: | ||
name: artifact-${{ runner.os }}-${{ matrix.python-version }} | ||
path: tmp-test-dir-with-unique-name | ||
|
||
# Upload coverage to Codecov | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4.4.0 | ||
uses: codecov/codecov-action@v4.5.0 | ||
if: success() || failure() | ||
with: | ||
use_oidc: true | ||
|
Oops, something went wrong.