Skip to content

Commit 21a3d53

Browse files
Merge branch 'main' into add-gallery-legend-spec
2 parents 63e5b29 + 540bba1 commit 21a3d53

Some content is hidden

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

69 files changed

+613
-401
lines changed

.github/ISSUE_TEMPLATE/4-release_checklist.md

+7-11
Original file line numberDiff line numberDiff line change
@@ -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:
2626
- [ ] 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/workflows/benchmarks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ 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
5151
condarc: |

.github/workflows/cache_data.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ 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
4949
condarc: |
@@ -76,7 +76,7 @@ jobs:
7676

7777
# Upload the downloaded files as artifacts to GitHub
7878
- name: Upload artifacts to GitHub
79-
uses: actions/upload-artifact@v4.5.0
79+
uses: actions/upload-artifact@v4.6.0
8080
with:
8181
name: gmt-cache
8282
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.2.0
3939
with:
4040
fail: false # Don't fail action on broken links
4141
output: /tmp/lychee-out.md

.github/workflows/ci_docs.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ 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
8686
condarc: |
@@ -163,9 +163,14 @@ jobs:
163163
# to get the right commit hash.
164164
message="Deploy $version from $(git rev-parse --short HEAD)"
165165
cd deploy
166-
# Need to have this file so that GitHub doesn't try to run Jekyll
166+
# Create some files in the root directory.
167+
# .nojekyll: Need to have this file so that GitHub doesn't try to run Jekyll
167168
touch .nojekyll
168-
# Delete all the files and replace with our new set
169+
# CNAME: Set the custom domain name
170+
echo "www.pygmt.org" > CNAME
171+
# index.html: Redirect to the latest version
172+
echo '<meta http-equiv="Refresh" content="0;url=latest/"/>' > index.html
173+
# Delete all the files and replace with our new set
169174
echo -e "\nRemoving old files from previous builds of ${version}:"
170175
rm -rvf ${version}
171176
echo -e "\nCopying HTML files to ${version}:"

.github/workflows/ci_doctests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ 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
4848
condarc: |

.github/workflows/ci_tests.yaml

+6-8
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113

114114
# Install Micromamba with conda-forge dependencies
115115
- name: Setup Micromamba
116-
uses: mamba-org/[email protected].3
116+
uses: mamba-org/[email protected].4
117117
with:
118118
environment-name: pygmt
119119
condarc: |
@@ -154,20 +154,18 @@ jobs:
154154
GH_TOKEN: ${{ github.token }}
155155

156156
- name: Install uv
157-
uses: astral-sh/[email protected]
157+
uses: astral-sh/[email protected]
158+
with:
159+
python-version: ${{ matrix.python-version }}
158160

159161
- name: Install dvc
160162
run: |
161-
uv venv
162-
source .venv/bin/activate
163163
uv pip install dvc
164164
uv pip list
165165
166166
# Pull baseline image data from dvc remote (DAGsHub)
167167
- 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/
168+
run: uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
171169

172170
# Install the package that we want to test
173171
- name: Install the package
@@ -179,7 +177,7 @@ jobs:
179177

180178
# Upload diff images on test failure
181179
- name: Upload diff images if any test fails
182-
uses: actions/upload-artifact@v4.5.0
180+
uses: actions/upload-artifact@v4.6.0
183181
if: failure()
184182
with:
185183
name: artifact-${{ runner.os }}-${{ matrix.python-version }}

.github/workflows/ci_tests_dev.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ 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
6363
condarc: |
@@ -187,7 +187,7 @@ jobs:
187187

188188
# Upload diff images on test failure
189189
- name: Upload diff images if any test fails
190-
uses: actions/upload-artifact@v4.5.0
190+
uses: actions/upload-artifact@v4.6.0
191191
if: ${{ failure() }}
192192
with:
193193
name: artifact-GMT-${{ matrix.gmt_git_ref }}-${{ runner.os }}

.github/workflows/ci_tests_legacy.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ 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
5757
condarc: |

.github/workflows/publish-to-pypi.yml

+49-9
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,17 @@ on:
3535
# - main
3636

3737
jobs:
38-
publish-pypi:
39-
name: Publish to PyPI
38+
build:
39+
name: Build distribution 📦
4040
runs-on: ubuntu-latest
41-
permissions:
42-
# This permission is mandatory for OIDC publishing
43-
id-token: write
44-
if: github.repository == 'GenericMappingTools/pygmt'
4541

4642
steps:
4743
- name: Checkout
4844
uses: actions/[email protected]
4945
with:
5046
# fetch all history so that setuptools-scm works
5147
fetch-depth: 0
48+
persist-credentials: false
5249

5350
- name: Set up Python
5451
uses: actions/[email protected]
@@ -74,11 +71,54 @@ jobs:
7471
echo "Generated files:"
7572
ls -lh dist/
7673
77-
- name: Publish to Test PyPI
74+
- name: Store the distribution packages
75+
uses: actions/[email protected]
76+
with:
77+
name: python-package-distributions
78+
path: dist/
79+
80+
publish-to-testpypi:
81+
name: Publish Python 🐍 distribution 📦 to TestPyPI
82+
if: github.repository == 'GenericMappingTools/pygmt'
83+
needs:
84+
- build
85+
runs-on: ubuntu-latest
86+
environment:
87+
name: testpypi
88+
url: https://test.pypi.org/project/pygmt
89+
permissions:
90+
id-token: write # IMPORTANT: mandatory for trusted OIDC publishing
91+
92+
steps:
93+
- name: Download all the dists
94+
uses: actions/[email protected]
95+
with:
96+
name: python-package-distributions
97+
path: dist/
98+
99+
- name: Publish distribution 📦 to TestPyPI
78100
uses: pypa/[email protected]
79101
with:
80102
repository-url: https://test.pypi.org/legacy/
81103

82-
- name: Publish to PyPI
83-
if: startsWith(github.ref, 'refs/tags')
104+
publish-pypi:
105+
name: Publish Python 🐍 distribution 📦 to PyPI
106+
if: github.repository == 'GenericMappingTools/pygmt' && startsWith(github.ref, 'refs/tags/')
107+
needs:
108+
- build
109+
runs-on: ubuntu-latest
110+
environment:
111+
name: pypi
112+
url: https://pypi.org/project/pygmt/
113+
permissions:
114+
id-token: write # IMPORTANT: mandatory for trusted OIDC publishing
115+
116+
steps:
117+
- name: Download all the dists
118+
uses: actions/[email protected]
119+
with:
120+
name: python-package-distributions
121+
path: dist/
122+
123+
- name: Publish distribution 📦 to PyPI
84124
uses: pypa/[email protected]

LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017-2024 The PyGMT Developers
1+
Copyright (c) 2017-2025 The PyGMT Developers
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

0 commit comments

Comments
 (0)