Skip to content

Commit 98fabc7

Browse files
committed
Merge branch 'main' into options
2 parents 1f81ec3 + c783a79 commit 98fabc7

File tree

235 files changed

+4297
-2925
lines changed

Some content is hidden

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

235 files changed

+4297
-2925
lines changed

.github/ISSUE_TEMPLATE/release_checklist.md renamed to .github/ISSUE_TEMPLATE/4-release_checklist.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ assignees: ''
1616
- [ ] Wrap Y ()
1717

1818
**Before release**:
19-
- [ ] Check [SPEC 0](https://scientific-python.org/specs/spec-0000/) to see if we need to bump the minimum supported versions of Python and core package dependencies (NumPy/Pandas/Xarray)
19+
- [ ] 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)
2020
- [ ] Run `make codespell` to check common misspellings. If there are any, either fix them or add them to `ignore-words-list` in `pyproject.toml`
2121
- [ ] Check to ensure that:
2222
- [ ] All tests pass in the ["GMT Legacy Tests" workflow](https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_tests_legacy.yaml)
@@ -43,7 +43,7 @@ assignees: ''
4343
- [ ] Manually upload the pygmt-vX.Y.Z.zip and baseline-images.zip files to https://zenodo.org/deposit, ensure that it is filed under the correct reserved DOI
4444

4545
**After release**:
46-
- [ ] Update conda-forge [pygmt-feedstock](https://github.com/conda-forge/pygmt-feedstock) [Done automatically by conda-forge's bot, but remember to pin NEP29 versions]
46+
- [ ] Update conda-forge [pygmt-feedstock](https://github.com/conda-forge/pygmt-feedstock) [Done automatically by conda-forge's bot, but remember to pin SPEC0 versions]
4747
- [ ] Bump PyGMT version on https://github.com/GenericMappingTools/try-gmt (after conda-forge update)
4848
- [ ] Announce the release on:
4949
- [ ] GMT [forum](https://forum.generic-mapping-tools.org/c/news/) (do this announcement first! draft on https://hackmd.io/@pygmt. requires moderator status)

.github/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ updates:
66
- package-ecosystem: "github-actions"
77
directory: "/"
88
schedule:
9-
# Check for updates to GitHub Actions every weekday
9+
# Check for updates to GitHub Actions on Tuesdays
1010
interval: "weekly"
1111
day: "tuesday"
1212
# Allow up to 2 open pull requests at a time

.github/workflows/benchmarks.yml

+11-21
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Run performance benchmarks
22
#
3-
# Continuous benchmarking using pytest-codspeed. Measures the execution speed
4-
# of tests marked with @pytest.mark.benchmark decorator.
3+
# Continuous benchmarking using pytest-codspeed. Measures the execution speed of tests
4+
# marked with @pytest.mark.benchmark decorator.
55

66
name: Benchmarks
77

@@ -15,12 +15,9 @@ on:
1515
# Run in PRs but only if the PR has the 'run/benchmark' label
1616
pull_request:
1717
types: [ opened, reopened, labeled, synchronize ]
18-
# `workflow_dispatch` allows CodSpeed to trigger backtest
19-
# performance analysis in order to generate initial data.
18+
# 'workflow_dispatch' allows CodSpeed to trigger backtest performance analysis
19+
# in order to generate initial data.
2020
workflow_dispatch:
21-
release:
22-
types:
23-
- published
2421

2522
concurrency:
2623
group: ${{ github.workflow }}-${{ github.ref }}
@@ -37,14 +34,14 @@ jobs:
3734
steps:
3835
# Checkout current git repository
3936
- name: Checkout
40-
uses: actions/[email protected].1
37+
uses: actions/[email protected].4
4138
with:
4239
# fetch all history so that setuptools-scm works
4340
fetch-depth: 0
4441

4542
# Install Miniconda with conda-forge dependencies
4643
- name: Setup Miniconda
47-
uses: conda-incubator/[email protected].1
44+
uses: conda-incubator/[email protected].4
4845
with:
4946
auto-activate-base: true
5047
activate-environment: "" # base environment
@@ -64,29 +61,22 @@ jobs:
6461
6562
# Download cached remote files (artifacts) from GitHub
6663
- name: Download remote data from GitHub
67-
uses: dawidd6/[email protected]
68-
with:
69-
workflow: cache_data.yaml
70-
workflow_conclusion: success
71-
name: gmt-cache
72-
path: .gmt
73-
74-
# Move downloaded files to ~/.gmt directory and list them
75-
- name: Move and list downloaded remote files
7664
run: |
77-
mkdir -p ~/.gmt
78-
mv .gmt/* ~/.gmt
65+
# Download cached files to ~/.gmt directory and list them
66+
gh run download --name gmt-cache --dir ~/.gmt/
7967
# Change modification times of the two files, so GMT won't refresh it
8068
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
8169
ls -lhR ~/.gmt
70+
env:
71+
GH_TOKEN: ${{ github.token }}
8272

8373
# Install the package that we want to test
8474
- name: Install the package
8575
run: make install
8676

8777
# Run the benchmark tests
8878
- name: Run benchmarks
89-
uses: CodSpeedHQ/action@v2.1.1
79+
uses: CodSpeedHQ/action@v2.4.1
9080
with:
9181
run: |
9282
python -c "import pygmt; pygmt.show_versions()"

.github/workflows/cache_data.yaml

+17-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# Cache GMT remote data files and upload as artifacts
22
#
3-
# This workflow downloads data files needed by PyGMT tests/documentation from
4-
# the GMT data server and uploads as workflow artifacts which can be accessed
5-
# by other GitHub Actions workflows.
3+
# This workflow downloads data files needed by PyGMT tests/documentation from the GMT
4+
# data server and uploads them as workflow artifacts, which can then be accessed by other
5+
# GitHub Actions workflows.
66
#
7-
# It is scheduled to run every Sunday at 12:00 (UTC). If new remote files are
8-
# needed urgently, maintainers can update the workflow file or the
9-
# 'pygmt/helpers/caching.py' file to refresh the cache.
7+
# It is scheduled to run every Sunday at 12:00 (UTC). If new remote files are needed
8+
# urgently, maintainers can refresh the cache by one of the following methods:
9+
#
10+
# 1. Update this workflow file
11+
# 2. Update the `pygmt/helpers/caching.py` file
12+
# 3. Go to https://github.com/GenericMappingTools/pygmt/actions/workflows/cache_data.yaml
13+
# and click the "Run workflow" button
1014
#
1115
name: Cache data
1216

@@ -16,6 +20,7 @@ on:
1620
paths:
1721
- 'pygmt/helpers/caching.py'
1822
- '.github/workflows/cache_data.yaml'
23+
workflow_dispatch:
1924
# Schedule runs on 12 noon every Sunday
2025
schedule:
2126
- cron: '0 12 * * 0'
@@ -31,14 +36,14 @@ jobs:
3136
steps:
3237
# Checkout current git repository
3338
- name: Checkout
34-
uses: actions/[email protected].1
39+
uses: actions/[email protected].4
3540
with:
3641
# fetch all history so that setuptools-scm works
3742
fetch-depth: 0
3843

3944
# Install Micromamba with conda-forge dependencies
4045
- name: Setup Micromamba
41-
uses: mamba-org/[email protected].0
46+
uses: mamba-org/[email protected].1
4247
with:
4348
environment-name: pygmt
4449
condarc: |
@@ -75,7 +80,7 @@ jobs:
7580
with:
7681
name: gmt-cache
7782
path: |
78-
~/.gmt/cache
79-
~/.gmt/server
80-
~/.gmt/gmt_data_server.txt
81-
~/.gmt/gmt_hash_server.txt
83+
~/.gmt/cache
84+
~/.gmt/server
85+
~/.gmt/gmt_data_server.txt
86+
~/.gmt/gmt_hash_server.txt

.github/workflows/check-links.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ name: Check Links
1010
on:
1111
# Uncomment the 'pull_request' line below to trigger the workflow in PR
1212
# pull_request:
13+
workflow_dispatch:
1314
# Schedule runs on 12 noon every Sunday
1415
schedule:
1516
- cron: '0 12 * * 0'
@@ -22,19 +23,19 @@ jobs:
2223

2324
steps:
2425
- name: Checkout the repository
25-
uses: actions/[email protected].1
26+
uses: actions/[email protected].4
2627
with:
2728
path: repository
2829

2930
- name: Checkout the documentation
30-
uses: actions/[email protected].1
31+
uses: actions/[email protected].4
3132
with:
3233
ref: gh-pages
3334
path: documentation
3435

3536
- name: Link Checker
3637
id: lychee
37-
uses: lycheeverse/lychee-action@v1.9.3
38+
uses: lycheeverse/lychee-action@v1.10.0
3839
with:
3940
# 429: Too many requests
4041
args: >
@@ -53,7 +54,7 @@ jobs:
5354
--exclude "^https://www.generic-mapping-tools.org/remote-datasets/%s$"
5455
--exclude "^https://hackmd.io/@pygmt"
5556
--exclude "^https://doi.org"
56-
--exclude "^https://www.researchgate.net/project/"
57+
--exclude "^https://www.researchgate.net/"
5758
--exclude "^https://test.pypi.org/simple/"
5859
--verbose
5960
"repository/**/*.rst"
@@ -67,7 +68,8 @@ jobs:
6768

6869
- name: Create Issue From File
6970
if: env.lychee_exit_code != 0
70-
uses: peter-evans/create-issue-from-file@v5
71-
with:
72-
title: Link Checker Report on ${{ steps.date.outputs.date }}
73-
content-filepath: ./lychee/out.md
71+
run: |
72+
title="Link Checker Report on ${{ steps.date.outputs.date }}"
73+
gh issue create --title "$title" --body-file ./lychee/out.md
74+
env:
75+
GH_TOKEN: ${{ github.token }}

.github/workflows/ci_docs.yml

+10-16
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ on:
3434
- 'examples/**'
3535
- 'README.md'
3636
- '.github/workflows/ci_docs.yml'
37+
workflow_dispatch:
3738
release:
3839
types:
3940
- published
@@ -68,14 +69,14 @@ jobs:
6869
steps:
6970
# Checkout current git repository
7071
- name: Checkout
71-
uses: actions/[email protected].1
72+
uses: actions/[email protected].4
7273
with:
7374
# fetch all history so that setuptools-scm works
7475
fetch-depth: 0
7576

7677
# Install Micromamba with conda-forge dependencies
7778
- name: Setup Micromamba
78-
uses: mamba-org/[email protected].0
79+
uses: mamba-org/[email protected].1
7980
with:
8081
environment-name: pygmt
8182
condarc: |
@@ -87,7 +88,7 @@ jobs:
8788
create-args: >-
8889
python=3.12
8990
gmt=6.5.0
90-
ghostscript=10.02.1
91+
ghostscript=10.03.0
9192
numpy
9293
pandas
9394
xarray
@@ -111,21 +112,14 @@ jobs:
111112
112113
# Download cached remote files (artifacts) from GitHub
113114
- name: Download remote data from GitHub
114-
uses: dawidd6/[email protected]
115-
with:
116-
workflow: cache_data.yaml
117-
workflow_conclusion: success
118-
name: gmt-cache
119-
path: .gmt
120-
121-
# Move downloaded files to ~/.gmt directory and list them
122-
- name: Move and list downloaded remote files
123115
run: |
124-
mkdir -p ~/.gmt
125-
mv .gmt/* ~/.gmt
116+
# Download cached files to ~/.gmt directory and list them
117+
gh run download --name gmt-cache --dir ~/.gmt/
126118
# Change modification times of the two files, so GMT won't refresh it
127119
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
128120
ls -lhR ~/.gmt
121+
env:
122+
GH_TOKEN: ${{ github.token }}
129123

130124
# Install the package that we want to test
131125
- name: Install the package
@@ -138,7 +132,7 @@ jobs:
138132
run: make -C doc clean all
139133

140134
- name: Checkout the gh-pages branch
141-
uses: actions/[email protected].1
135+
uses: actions/[email protected].4
142136
with:
143137
ref: gh-pages
144138
# Checkout to this folder instead of the current one
@@ -161,7 +155,7 @@ jobs:
161155
# to get the right commit hash.
162156
message="Deploy $version from $(git rev-parse --short HEAD)"
163157
cd deploy
164-
# Need to have this file so that Github doesn't try to run Jekyll
158+
# Need to have this file so that GitHub doesn't try to run Jekyll
165159
touch .nojekyll
166160
# Delete all the files and replace with our new set
167161
echo -e "\nRemoving old files from previous builds of ${version}:"

.github/workflows/ci_doctests.yaml

+7-13
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
# push:
1010
# branches: [ main ]
1111
# pull_request:
12+
workflow_dispatch:
1213
# Schedule weekly tests on Sunday
1314
schedule:
1415
- cron: '0 0 * * 0'
@@ -34,14 +35,14 @@ jobs:
3435
steps:
3536
# Checkout current git repository
3637
- name: Checkout
37-
uses: actions/[email protected].1
38+
uses: actions/[email protected].4
3839
with:
3940
# fetch all history so that setuptools-scm works
4041
fetch-depth: 0
4142

4243
# Install Micromamba with conda-forge dependencies
4344
- name: Setup Micromamba
44-
uses: mamba-org/[email protected].0
45+
uses: mamba-org/[email protected].1
4546
with:
4647
environment-name: pygmt
4748
condarc: |
@@ -70,21 +71,14 @@ jobs:
7071
7172
# Download cached remote files (artifacts) from GitHub
7273
- name: Download remote data from GitHub
73-
uses: dawidd6/[email protected]
74-
with:
75-
workflow: cache_data.yaml
76-
workflow_conclusion: success
77-
name: gmt-cache
78-
path: .gmt
79-
80-
# Move downloaded files to ~/.gmt directory and list them
81-
- name: Move and list downloaded remote files
8274
run: |
83-
mkdir -p ~/.gmt
84-
mv .gmt/* ~/.gmt
75+
# Download cached files to ~/.gmt directory and list them
76+
gh run download --name gmt-cache --dir ~/.gmt/
8577
# Change modification times of the two files, so GMT won't refresh it
8678
touch ~/.gmt/gmt_data_server.txt ~/.gmt/gmt_hash_server.txt
8779
ls -lhR ~/.gmt
80+
env:
81+
GH_TOKEN: ${{ github.token }}
8882

8983
# Install the package that we want to test
9084
- name: Install the package

0 commit comments

Comments
 (0)