Skip to content

Commit f8a7a98

Browse files
authored
Merge branch 'main' into dep/netcdf
2 parents e33b537 + 8e1200f commit f8a7a98

File tree

171 files changed

+3630
-1361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+3630
-1361
lines changed

.github/ISSUE_TEMPLATE/4-release_checklist.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: PyGMT release checklist
3-
about: Checklist for a new PyGMT release.
3+
about: Checklist for a new PyGMT release. [For project maintainers only!]
44
title: Release PyGMT vX.Y.Z
55
labels: maintenance
66
assignees: ''
@@ -19,17 +19,15 @@ assignees: ''
1919

2020
**Before release**:
2121

22-
- [ ] Check [SPEC 0](https://scientific-python.org/specs/spec-0000/) to see if we need to bump the minimum supported versions of GMT, Python and
23-
core package dependencies (NumPy, pandas, Xarray)
22+
- [ ] Check [SPEC 0](https://scientific-python.org/specs/spec-0000/) to see if we need to bump the minimum supported versions of GMT, Python and core package dependencies (NumPy, pandas, Xarray)
2423
- [ ] Review the ["PyGMT Team" page](https://www.pygmt.org/dev/team.html)
24+
- [ ] README looks good on TestPyPI. Visit [TestPyPI](https://test.pypi.org/project/pygmt/#history), click the latest pre-release, and check the homepage.
2525
- [ ] Check to ensure that:
26-
- [ ] Deprecations and related tests are removed for this version by running `grep --include="*.py" -r vX.Y.Z` from the base of the repository
26+
- [ ] Deprecated workarounds/codes/tests are removed. Run `grep "# TODO" **/*.py` to find all potential TODOs.
2727
- [ ] All tests pass in the ["GMT Legacy Tests" workflow](https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_tests_legacy.yaml)
2828
- [ ] All tests pass in the ["GMT Dev Tests" workflow](https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_tests_dev.yaml)
2929
- [ ] All tests pass in the ["Doctests" workflow](https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_doctests.yaml)
30-
- [ ] Update warnings in `pygmt/_show_versions.py` as well as notes in
31-
[Not working transparency](https://www.pygmt.org/dev/install.html#not-working-transparency)
32-
regarding GMT-Ghostscript incompatibility
30+
- [ ] Update warnings in `pygmt/_show_versions.py` as well as notes in [Not working transparency](https://www.pygmt.org/dev/install.html#not-working-transparency) regarding GMT-Ghostscript incompatibility
3331
- [ ] Reserve a DOI on [Zenodo](https://zenodo.org) by clicking on "New Version"
3432
- [ ] Finish up the "Changelog entry for v0.x.x" Pull Request (Use the previous changelog PR as a reference)
3533
- [ ] Run `make codespell` to check common misspellings. If there are any, either fix them or add them to `ignore-words-list` in `pyproject.toml`
@@ -41,18 +39,16 @@ assignees: ''
4139
- [ ] Edit the draft release notes with the finalized changelog
4240
- [ ] Set the tag version and release title to vX.Y.Z
4341
- [ ] Make a release by clicking the 'Publish Release' button, this will automatically create a tag too
44-
- [ ] Download pygmt-X.Y.Z.zip (rename to pygmt-vX.Y.Z.zip) and baseline-images.zip from
45-
the release page, and upload the two zip files to https://zenodo.org/deposit,
46-
ensure that they are filed under the correct reserved DOI
42+
- [ ] Download pygmt-X.Y.Z.zip (rename to pygmt-vX.Y.Z.zip) and baseline-images.zip from the release page, and upload the two zip files to https://zenodo.org/deposit, ensure that they are filed under the correct reserved DOI
4743

4844
**After release**:
4945

50-
- [ ] Update conda-forge [pygmt-feedstock](https://github.com/conda-forge/pygmt-feedstock)
51-
[Done automatically by conda-forge's bot. Remember to pin Python and SPEC0 versions]
46+
- [ ] Update conda-forge [pygmt-feedstock](https://github.com/conda-forge/pygmt-feedstock) [Done automatically by conda-forge's bot. Remember to pin GMT, Python and SPEC0 versions]
5247
- [ ] Bump PyGMT version on https://github.com/GenericMappingTools/try-gmt (after conda-forge update)
5348
- [ ] Announce the release on:
5449
- [ ] GMT [forum](https://forum.generic-mapping-tools.org/c/news/) (do this announcement first! Requires moderator status)
55-
- [ ] [ResearchGate](https://www.researchgate.net) (after forum announcement, add new version as research item via the **code** category, be sure to include the corresponding new Zenodo DOI)
50+
- [ ] [ResearchGate](https://www.researchgate.net) (after forum announcement; download the ZIP file of the new release from the release page and add it as research item via the **code** category, be sure to include the corresponding new Zenodo DOI)
51+
- [ ] Update release checklist template with any additional bullet points that may have arisen during the release
5652

5753
---
5854

.github/ISSUE_TEMPLATE/5-bump_gmt_checklist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Bump GMT version checklist
3-
about: Checklist for bumping the minimum required GMT version.
3+
about: Checklist for bumping the minimum required GMT version. [For project maintainers only!]
44
title: Bump to GMT X.Y.Z
55
labels: maintenance
66
assignees: ''

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Fixes #
2020
- [ ] Write detailed docstrings for all functions/methods.
2121
- [ ] If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
2222
- [ ] If adding new functionality, add an example to docstrings or tutorials.
23-
- [ ] Use underscores (not hyphens) in names of Python files and directories.
2423

2524
**Slash Commands**
2625

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,9 @@ jobs:
4545

4646
# Install Micromamba with conda-forge dependencies
4747
- name: Setup Micromamba
48-
uses: mamba-org/[email protected].3
48+
uses: mamba-org/[email protected].4
4949
with:
5050
environment-name: pygmt
51-
condarc: |
52-
channels:
53-
- conda-forge
54-
- nodefaults
55-
cache-downloads: false
5651
cache-environment: true
5752
# environment cache is persistent for one week.
5853
cache-environment-key: micromamba-environment-${{ steps.date.outputs.date }}

.github/workflows/cache_data.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,9 @@ jobs:
4343

4444
# Install Micromamba with conda-forge dependencies
4545
- name: Setup Micromamba
46-
uses: mamba-org/[email protected].3
46+
uses: mamba-org/[email protected].4
4747
with:
4848
environment-name: pygmt
49-
condarc: |
50-
channels:
51-
- conda-forge
52-
- nodefaults
5349
create-args: >-
5450
python=3.13
5551
gmt=6.5.0
@@ -75,7 +71,7 @@ jobs:
7571

7672
# Upload the downloaded files as artifacts to GitHub
7773
- name: Upload artifacts to GitHub
78-
uses: actions/upload-artifact@v4.4.3
74+
uses: actions/upload-artifact@v4.6.0
7975
with:
8076
name: gmt-cache
8177
include-hidden-files: true

.github/workflows/check-links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
- name: Link Checker
3737
id: lychee
38-
uses: lycheeverse/lychee-action@v2.1.0
38+
uses: lycheeverse/lychee-action@v2.3.0
3939
with:
4040
fail: false # Don't fail action on broken links
4141
output: /tmp/lychee-out.md

.github/workflows/ci_docs.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,9 @@ jobs:
8080

8181
# Install Micromamba with conda-forge dependencies
8282
- name: Setup Micromamba
83-
uses: mamba-org/[email protected].3
83+
uses: mamba-org/[email protected].4
8484
with:
8585
environment-name: pygmt
86-
condarc: |
87-
channels:
88-
- conda-forge
89-
- nodefaults
90-
cache-downloads: false
9186
cache-environment: true
9287
# environment cache is persistent for one week.
9388
cache-environment-key: micromamba-environment-${{ steps.date.outputs.date }}
@@ -107,6 +102,7 @@ jobs:
107102
make
108103
pip
109104
python-build
105+
geodatasets
110106
myst-nb
111107
panel
112108
sphinx>=6.2
@@ -115,6 +111,9 @@ jobs:
115111
sphinx-design
116112
sphinx-gallery
117113
sphinx_rtd_theme<3.0
114+
cairosvg
115+
sphinxcontrib-svg2pdfconverter
116+
tectonic
118117
119118
# Download cached remote files (artifacts) from GitHub
120119
- name: Download remote data from GitHub
@@ -133,9 +132,29 @@ jobs:
133132
python -m build --sdist
134133
python -m pip install dist/*
135134
136-
# Build the documentation
137-
- name: Build the documentation
138-
run: make -C doc clean all
135+
- name: Build the HTML documentation
136+
run: make -C doc clean html
137+
138+
- name: Build the PDF documentation
139+
run: make -C doc pdf
140+
141+
- name: Create the HTML ZIP archive and rename the PDF file
142+
run: |
143+
cd doc/_build/
144+
cp -r html/ pygmt-docs/
145+
zip -r pygmt-docs.zip pygmt-docs/
146+
mv latex/pygmt.pdf pygmt-docs.pdf
147+
cd ../..
148+
149+
- name: Copy the HTML ZIP archive and PDF to the html folder for dev version
150+
run: cp -v doc/_build/pygmt-docs.zip doc/_build/pygmt-docs.pdf doc/_build/html/
151+
if: github.event_name == 'push' && matrix.os == 'ubuntu-latest'
152+
153+
- name: Upload the HTML ZIP archive and PDF as release assets
154+
run: gh release upload ${{ github.ref_name }} doc/_build/pygmt-docs.zip doc/_build/pygmt-docs.pdf
155+
if: github.event_name == 'release' && matrix.os == 'ubuntu-latest'
156+
env:
157+
GH_TOKEN: ${{ github.token }}
139158

140159
- name: Checkout the gh-pages branch
141160
uses: actions/[email protected]
@@ -161,9 +180,14 @@ jobs:
161180
# to get the right commit hash.
162181
message="Deploy $version from $(git rev-parse --short HEAD)"
163182
cd deploy
164-
# Need to have this file so that GitHub doesn't try to run Jekyll
183+
# Create some files in the root directory.
184+
# .nojekyll: Need to have this file so that GitHub doesn't try to run Jekyll
165185
touch .nojekyll
166-
# Delete all the files and replace with our new set
186+
# CNAME: Set the custom domain name
187+
echo "www.pygmt.org" > CNAME
188+
# index.html: Redirect to the latest version
189+
echo '<meta http-equiv="Refresh" content="0;url=latest/"/>' > index.html
190+
# Delete all the files and replace with our new set
167191
echo -e "\nRemoving old files from previous builds of ${version}:"
168192
rm -rvf ${version}
169193
echo -e "\nCopying HTML files to ${version}:"

.github/workflows/ci_doctests.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,9 @@ jobs:
4242

4343
# Install Micromamba with conda-forge dependencies
4444
- name: Setup Micromamba
45-
uses: mamba-org/[email protected].3
45+
uses: mamba-org/[email protected].4
4646
with:
4747
environment-name: pygmt
48-
condarc: |
49-
channels:
50-
- conda-forge
51-
- nodefaults
5248
create-args: >-
5349
python=3.13
5450
gmt=6.5.0

.github/workflows/ci_tests.yaml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ jobs:
5757
fail-fast: false
5858
matrix:
5959
python-version: ['3.11', '3.13']
60-
os: [ubuntu-latest, macos-latest, windows-latest]
60+
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
6161
# Is it a draft Pull Request (true or false)?
6262
isDraft:
6363
- ${{ github.event.pull_request.draft }}
64-
# Only run three jobs on Ubuntu for draft PRs
64+
# Only run jobs on Ubuntu for draft PRs
6565
exclude:
66+
- os: ubuntu-24.04-arm
67+
isDraft: true
6668
- os: macos-latest
6769
isDraft: true
6870
- os: windows-latest
@@ -113,14 +115,9 @@ jobs:
113115

114116
# Install Micromamba with conda-forge dependencies
115117
- name: Setup Micromamba
116-
uses: mamba-org/[email protected].3
118+
uses: mamba-org/[email protected].4
117119
with:
118120
environment-name: pygmt
119-
condarc: |
120-
channels:
121-
- conda-forge
122-
- nodefaults
123-
cache-downloads: false
124121
cache-environment: true
125122
# environment cache is persistent for one week.
126123
cache-environment-key: micromamba-environment-${{ steps.date.outputs.date }}
@@ -153,20 +150,18 @@ jobs:
153150
GH_TOKEN: ${{ github.token }}
154151

155152
- name: Install uv
156-
uses: astral-sh/[email protected]
153+
uses: astral-sh/[email protected]
154+
with:
155+
python-version: ${{ matrix.python-version }}
157156

158157
- name: Install dvc
159158
run: |
160-
uv venv
161-
source .venv/bin/activate
162159
uv pip install dvc
163160
uv pip list
164161
165162
# Pull baseline image data from dvc remote (DAGsHub)
166163
- name: Pull baseline image data from dvc remote
167-
run: |
168-
source .venv/bin/activate
169-
uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
164+
run: uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
170165

171166
# Install the package that we want to test
172167
- name: Install the package
@@ -178,15 +173,15 @@ jobs:
178173

179174
# Upload diff images on test failure
180175
- name: Upload diff images if any test fails
181-
uses: actions/upload-artifact@v4.4.3
176+
uses: actions/upload-artifact@v4.6.0
182177
if: failure()
183178
with:
184-
name: artifact-${{ runner.os }}-${{ matrix.python-version }}
179+
name: artifact-${{ matrix.os }}-${{ matrix.python-version }}
185180
path: tmp-test-dir-with-unique-name
186181

187182
# Upload coverage to Codecov
188183
- name: Upload coverage to Codecov
189-
uses: codecov/codecov-action@v5.1.1
184+
uses: codecov/codecov-action@v5.3.1
190185
if: success() || failure()
191186
with:
192187
use_oidc: true

.github/workflows/ci_tests_dev.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
os: [ubuntu-24.04, macos-15, windows-2022]
39+
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, windows-2025]
4040
gmt_git_ref: [master]
4141
timeout-minutes: 30
4242
defaults:
@@ -57,14 +57,9 @@ jobs:
5757

5858
# Install Micromamba with conda-forge dependencies
5959
- name: Setup Micromamba
60-
uses: mamba-org/[email protected].3
60+
uses: mamba-org/[email protected].4
6161
with:
6262
environment-name: pygmt
63-
condarc: |
64-
channels:
65-
- conda-forge
66-
- nodefaults
67-
cache-downloads: false
6863
cache-environment: true
6964
# environment cache is persistent for one week.
7065
cache-environment-key: micromamba-environment-${{ steps.date.outputs.date }}
@@ -187,8 +182,8 @@ jobs:
187182

188183
# Upload diff images on test failure
189184
- name: Upload diff images if any test fails
190-
uses: actions/upload-artifact@v4.4.3
185+
uses: actions/upload-artifact@v4.6.0
191186
if: ${{ failure() }}
192187
with:
193-
name: artifact-GMT-${{ matrix.gmt_git_ref }}-${{ runner.os }}
188+
name: artifact-${{ matrix.os }}-GMT-${{ matrix.gmt_git_ref }}
194189
path: tmp-test-dir-with-unique-name

.github/workflows/ci_tests_legacy.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
strategy:
3535
fail-fast: false
3636
matrix:
37-
os: [ubuntu-20.04, macos-13, windows-2019]
37+
os: [ubuntu-22.04, ubuntu-22.04-arm, macos-13, windows-2019]
3838
gmt_version: ['6.4']
3939
timeout-minutes: 30
4040
defaults:
@@ -51,13 +51,9 @@ jobs:
5151

5252
# Install Micromamba with conda-forge dependencies
5353
- name: Setup Micromamba
54-
uses: mamba-org/[email protected].3
54+
uses: mamba-org/[email protected].4
5555
with:
5656
environment-name: pygmt
57-
condarc: |
58-
channels:
59-
- conda-forge
60-
- nodefaults
6157
create-args: >-
6258
python=3.11
6359
gmt=${{ matrix.gmt_version }}

.github/workflows/format-command.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
# Generate token from GenericMappingTools bot
14-
- uses: actions/[email protected].0
14+
- uses: actions/[email protected].3
1515
id: generate-token
1616
with:
1717
app-id: ${{ secrets.APP_ID }}
@@ -25,7 +25,7 @@ jobs:
2525
ref: ${{ github.event.client_payload.pull_request.head.ref }}
2626

2727
# Setup Python environment
28-
- uses: actions/setup-python@v5.3.0
28+
- uses: actions/setup-python@v5.4.0
2929
with:
3030
python-version: '3.13'
3131

0 commit comments

Comments
 (0)