Skip to content

Commit 97ce3d7

Browse files
Merge branch 'main' into code-pygmt-logo
2 parents b352346 + cb5b15a commit 97ce3d7

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

+724
-366
lines changed

.github/workflows/benchmarks.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ jobs:
8484

8585
# Run the benchmark tests
8686
- name: Run benchmarks
87-
uses: CodSpeedHQ/action@76578c2a7ddd928664caa737f0e962e3085d4e7c # v3.8.1
87+
uses: CodSpeedHQ/action@6eeb021fd0f305388292348b775d96d95253adf4 # v4.0.0
8888
with:
89+
mode: "instrumentation"
8990
# 'bash -el -c' is needed to use the custom shell.
9091
# See https://github.com/CodSpeedHQ/action/issues/65.
9192
run: bash -el -c "python -c \"import pygmt; pygmt.show_versions()\"; PYGMT_USE_EXTERNAL_DISPLAY=false python -m pytest -r P --pyargs pygmt --codspeed --override-ini addopts='--verbose'"

.github/workflows/check-links.yml

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

4141
- name: Link Checker
4242
id: lychee
43-
uses: lycheeverse/lychee-action@5c4ee84814c983aa7164eaee476f014e53ff3963 # v2.5.0
43+
uses: lycheeverse/lychee-action@885c65f3dc543b57c898c8099f4e08c8afd178a2 # v2.6.1
4444
with:
4545
fail: false # Don't fail action on broken links
4646
output: /tmp/lychee-out.md

.github/workflows/ci_tests.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ jobs:
7373
# Python 3.11 + core packages (minimum supported versions) + optional packages (minimum supported versions if any)
7474
- python-version: '3.11'
7575
numpy-version: '1.26'
76-
pandas-version: '=2.1'
77-
xarray-version: '=2023.07'
76+
pandas-version: '=2.2'
77+
xarray-version: '=2023.10'
7878
optional-packages: ' contextily geopandas ipython pyarrow-core rioxarray netCDF4 sphinx-gallery'
7979
# Python 3.13 + core packages (latest versions) + optional packages
8080
- python-version: '3.13'
@@ -151,7 +151,7 @@ jobs:
151151
GH_TOKEN: ${{ github.token }}
152152

153153
- name: Install uv
154-
uses: astral-sh/setup-uv@557e51de59eb14aaaba2ed9621916900a91d50c6 # v6.6.1
154+
uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v6.7.0
155155
with:
156156
activate-environment: true
157157
python-version: ${{ matrix.python-version }}
@@ -163,7 +163,11 @@ jobs:
163163
164164
# Pull baseline image data from dvc remote (DAGsHub)
165165
- name: Pull baseline image data from dvc remote
166-
run: uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
166+
run: |
167+
uv run dvc remote modify upstream url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/pygmt.dvc --local
168+
uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
169+
env:
170+
DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }}
167171

168172
# Install the package that we want to test
169173
- name: Install the package
@@ -183,7 +187,7 @@ jobs:
183187

184188
# Upload coverage to Codecov
185189
- name: Upload coverage to Codecov
186-
uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
190+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
187191
if: success() || failure()
188192
with:
189193
use_oidc: true

.github/workflows/ci_tests_dev.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
strategy:
3939
fail-fast: false
4040
matrix:
41-
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, windows-2025]
41+
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-26, windows-2025]
4242
gmt_git_ref: [master]
4343
timeout-minutes: 30
4444
defaults:
@@ -161,7 +161,11 @@ jobs:
161161

162162
# Pull baseline image data from dvc remote (DAGsHub)
163163
- name: Pull baseline image data from dvc remote
164-
run: dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
164+
run: |
165+
dvc remote modify upstream url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/pygmt.dvc --local
166+
dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
167+
env:
168+
DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }}
165169

166170
# Download cached remote files (artifacts) from GitHub
167171
- name: Download remote data from GitHub

.github/workflows/ci_tests_legacy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ jobs:
6262
gmt=${{ matrix.gmt_version }}
6363
ghostscript<10
6464
numpy=1.26
65-
pandas
66-
xarray
65+
pandas=2.2
66+
xarray=2023.10
6767
packaging=24.2
6868
contextily=1.5
6969
geopandas=1.0

.github/workflows/dvc-diff.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ on:
1414
paths:
1515
- 'pygmt/tests/baseline/*.png.dvc'
1616

17-
permissions: {}
17+
permissions:
18+
contents: read
19+
pull-requests: write
1820

1921
jobs:
2022
dvc-diff:
@@ -55,12 +57,16 @@ jobs:
5557
# Report last updated at commit abcdef
5658
- name: Generate the image diff report
5759
env:
58-
repo_token: ${{ github.token }}
60+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5961
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
62+
DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }}
6063
run: |
6164
echo -e "## Summary of changed images\n" > report.md
6265
echo -e "This is an auto-generated report of images that have changed on the DVC remote\n" >> report.md
6366
67+
# Configure DVC to use the DAGsHub remote via a token
68+
dvc remote modify upstream url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/pygmt.dvc --local
69+
6470
# Pull image data from cloud storage
6571
dvc pull --remote upstream
6672
dvc diff --md main HEAD >> report.md

.github/workflows/format-command.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
# Generate token from GenericMappingTools bot
19-
- uses: actions/create-github-app-token@v2.1.1
19+
- uses: actions/create-github-app-token@v2.1.4
2020
id: generate-token
2121
with:
2222
app-id: ${{ secrets.APP_ID }}
@@ -31,14 +31,14 @@ jobs:
3131
persist-credentials: false
3232

3333
# Setup Python environment
34-
- uses: actions/setup-python@v5.6.0
34+
- uses: actions/setup-python@v6.0.0
3535
with:
3636
python-version: '3.13'
3737

3838
# Install formatting tools
3939
- name: Install formatting tools
4040
run: |
41-
python -m pip install ruff pre-commit
41+
python -m pip install ruff prek
4242
python -m pip list
4343
4444
# Run "make format" and commit the change to the PR branch

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
persist-credentials: false
5151

5252
- name: Set up Python
53-
uses: actions/setup-python@v5.6.0
53+
uses: actions/setup-python@v6.0.0
5454
with:
5555
python-version: '3.13'
5656

@@ -99,7 +99,7 @@ jobs:
9999
path: dist/
100100

101101
- name: Publish distribution 📦 to TestPyPI
102-
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
102+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
103103
with:
104104
repository-url: https://test.pypi.org/legacy/
105105

@@ -123,4 +123,4 @@ jobs:
123123
path: dist/
124124

125125
- name: Publish distribution 📦 to PyPI
126-
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
126+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0

.github/workflows/release-baseline-images.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ jobs:
3131
uses: iterative/setup-dvc@175771be1dc3d119268e00a896b52a4b77decb5e # v1.2.0
3232

3333
- name: Pull baseline image data from dvc remote
34-
run: dvc pull && ls -lhR pygmt/tests/baseline/
34+
run: |
35+
dvc remote modify upstream url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/pygmt.dvc --local
36+
dvc pull && ls -lhR pygmt/tests/baseline/
37+
env:
38+
DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }}
3539

3640
- name: Create the baseline image asset in zip format
3741
run: |

.github/workflows/style_checks.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ jobs:
3232

3333
# Setup Python
3434
- name: Set up Python
35-
uses: actions/setup-python@v5.6.0
35+
uses: actions/setup-python@v6.0.0
3636
with:
3737
python-version: '3.13'
3838

3939
- name: Install packages
4040
run: |
41-
python -m pip install ruff pre-commit
41+
python -m pip install ruff prek
4242
python -m pip list
4343
44-
- name: Formatting check (ruff + pre-commit)
44+
- name: Formatting check (ruff + prek)
4545
run: |
4646
make check
47-
pre-commit run --all-files
47+
prek run --all-files
4848
4949
- name: Ensure example scripts have at least one code block separator
5050
run: |

0 commit comments

Comments
 (0)