Skip to content

Commit c6f6a31

Browse files
authored
Merge branch 'main' into feature/scatter
2 parents af90220 + 0d31234 commit c6f6a31

File tree

180 files changed

+4174
-1677
lines changed

Some content is hidden

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

180 files changed

+4174
-1677
lines changed

.github/ISSUE_TEMPLATE/4-release_checklist.md

+9-13
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

+1-1
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

-1
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

+2-7
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 }}
@@ -87,7 +82,7 @@ jobs:
8782

8883
# Run the benchmark tests
8984
- name: Run benchmarks
90-
uses: CodSpeedHQ/action@v3.2.0
85+
uses: CodSpeedHQ/action@v3.4.0
9186
with:
9287
# 'bash -el -c' is needed to use the custom shell.
9388
# See https://github.com/CodSpeedHQ/action/issues/65.

.github/workflows/cache_data.yaml

+2-6
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
@@ -76,7 +72,7 @@ jobs:
7672

7773
# Upload the downloaded files as artifacts to GitHub
7874
- name: Upload artifacts to GitHub
79-
uses: actions/upload-artifact@v4.4.3
75+
uses: actions/upload-artifact@v4.6.1
8076
with:
8177
name: gmt-cache
8278
include-hidden-files: true

.github/workflows/check-links.yml

+1-1
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

+42-11
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 }}
@@ -108,6 +103,7 @@ jobs:
108103
make
109104
pip
110105
python-build
106+
geodatasets
111107
myst-nb
112108
panel
113109
sphinx>=6.2
@@ -116,6 +112,9 @@ jobs:
116112
sphinx-design
117113
sphinx-gallery
118114
sphinx_rtd_theme<3.0
115+
cairosvg
116+
sphinxcontrib-svg2pdfconverter
117+
tectonic
119118
120119
# Download cached remote files (artifacts) from GitHub
121120
- name: Download remote data from GitHub
@@ -134,9 +133,36 @@ jobs:
134133
python -m build --sdist
135134
python -m pip install dist/*
136135
137-
# Build the documentation
138-
- name: Build the documentation
139-
run: make -C doc clean all
136+
- name: Build the HTML documentation
137+
run: make -C doc clean html
138+
139+
- name: Build the PDF documentation
140+
run: make -C doc pdf
141+
142+
- name: Create the HTML ZIP archive and rename the PDF file
143+
run: |
144+
cd doc/_build/
145+
cp -r html/ pygmt-docs/
146+
zip -r pygmt-docs.zip pygmt-docs/
147+
mv latex/pygmt.pdf pygmt-docs.pdf
148+
cd ../..
149+
150+
- name: Upload PDF as artifact for previewing on pull requests
151+
uses: actions/[email protected]
152+
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest'
153+
with:
154+
name: artifact-pygmt-docs-pdf
155+
path: doc/_build/pygmt-docs.pdf
156+
157+
- name: Copy the HTML ZIP archive and PDF to the html folder for dev version
158+
run: cp -v doc/_build/pygmt-docs.zip doc/_build/pygmt-docs.pdf doc/_build/html/
159+
if: github.event_name == 'push' && matrix.os == 'ubuntu-latest'
160+
161+
- name: Upload the HTML ZIP archive and PDF as release assets
162+
run: gh release upload ${{ github.ref_name }} doc/_build/pygmt-docs.zip doc/_build/pygmt-docs.pdf
163+
if: github.event_name == 'release' && matrix.os == 'ubuntu-latest'
164+
env:
165+
GH_TOKEN: ${{ github.token }}
140166

141167
- name: Checkout the gh-pages branch
142168
uses: actions/[email protected]
@@ -162,9 +188,14 @@ jobs:
162188
# to get the right commit hash.
163189
message="Deploy $version from $(git rev-parse --short HEAD)"
164190
cd deploy
165-
# Need to have this file so that GitHub doesn't try to run Jekyll
191+
# Create some files in the root directory.
192+
# .nojekyll: Need to have this file so that GitHub doesn't try to run Jekyll
166193
touch .nojekyll
167-
# Delete all the files and replace with our new set
194+
# CNAME: Set the custom domain name
195+
echo "www.pygmt.org" > CNAME
196+
# index.html: Redirect to the latest version
197+
echo '<meta http-equiv="Refresh" content="0;url=latest/"/>' > index.html
198+
# Delete all the files and replace with our new set
168199
echo -e "\nRemoving old files from previous builds of ${version}:"
169200
rm -rvf ${version}
170201
echo -e "\nCopying HTML files to ${version}:"

.github/workflows/ci_doctests.yaml

+1-5
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

+12-17
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 }}
@@ -154,20 +151,18 @@ jobs:
154151
GH_TOKEN: ${{ github.token }}
155152

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

159158
- name: Install dvc
160159
run: |
161-
uv venv
162-
source .venv/bin/activate
163160
uv pip install dvc
164161
uv pip list
165162
166163
# Pull baseline image data from dvc remote (DAGsHub)
167164
- name: Pull baseline image data from dvc remote
168-
run: |
169-
source .venv/bin/activate
170-
uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
165+
run: uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
171166

172167
# Install the package that we want to test
173168
- name: Install the package
@@ -179,15 +174,15 @@ jobs:
179174

180175
# Upload diff images on test failure
181176
- name: Upload diff images if any test fails
182-
uses: actions/upload-artifact@v4.4.3
177+
uses: actions/upload-artifact@v4.6.1
183178
if: failure()
184179
with:
185-
name: artifact-${{ runner.os }}-${{ matrix.python-version }}
180+
name: artifact-${{ matrix.os }}-${{ matrix.python-version }}
186181
path: tmp-test-dir-with-unique-name
187182

188183
# Upload coverage to Codecov
189184
- name: Upload coverage to Codecov
190-
uses: codecov/codecov-action@v5.1.1
185+
uses: codecov/codecov-action@v5.3.1
191186
if: success() || failure()
192187
with:
193188
use_oidc: true

.github/workflows/ci_tests_dev.yaml

+4-9
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.1
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

+2-6
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

+2-2
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].6
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)