Skip to content

Commit b6a8ce9

Browse files
committed
Merge branch 'main' into alias/function
2 parents 81540bc + 5bc0682 commit b6a8ce9

File tree

247 files changed

+1151
-937
lines changed

Some content is hidden

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

247 files changed

+1151
-937
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Fixes #
2121
**Slash Commands**
2222

2323
You can write slash commands (`/command`) in the first line of a comment to perform
24-
specific operations. Supported slash commands are:
24+
specific operations. Supported slash command is:
2525

2626
- `/format`: automatically format and lint the code
27-
- `/test-gmt-dev`: run full tests on the latest GMT development version

.github/workflows/benchmarks.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,10 @@ on:
1111
branches: [ main ]
1212
paths:
1313
- 'pygmt/**/*.py'
14-
- '!pygmt/tests/**'
1514
- '.github/workflows/benchmarks.yml'
15+
# Run in PRs but only if the PR has the 'run/benchmark' label
1616
pull_request:
17-
paths:
18-
- 'pygmt/**/*.py'
19-
- '!pygmt/tests/**'
20-
- '.github/workflows/benchmarks.yml'
17+
types: [ opened, reopened, labeled, synchronize ]
2118
# `workflow_dispatch` allows CodSpeed to trigger backtest
2219
# performance analysis in order to generate initial data.
2320
workflow_dispatch:
@@ -32,6 +29,7 @@ concurrency:
3229
jobs:
3330
benchmarks:
3431
runs-on: ubuntu-22.04
32+
if: github.repository == 'GenericMappingTools/pygmt' && (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run/benchmark'))
3533
defaults:
3634
run:
3735
shell: bash -l {0}
@@ -59,9 +57,9 @@ jobs:
5957
# $CONDA is an environment variable pointing to the root of the miniconda directory
6058
# Preprend $CONDA/bin to $PATH so that conda's python is used over system python
6159
echo $CONDA/bin >> $GITHUB_PATH
62-
conda install --solver=libmamba gmt=6.4.0 python=3.12 \
60+
conda install --solver=libmamba gmt=6.5.0 python=3.12 \
6361
numpy pandas xarray netCDF4 packaging \
64-
geopandas pytest pytest-mpl
62+
geopandas pyarrow pytest pytest-mpl
6563
python -m pip install -U pytest-codspeed setuptools
6664
6765
# Download cached remote files (artifacts) from GitHub
@@ -88,7 +86,7 @@ jobs:
8886

8987
# Run the benchmark tests
9088
- name: Run benchmarks
91-
uses: CodSpeedHQ/[email protected].2
89+
uses: CodSpeedHQ/[email protected].3
9290
with:
9391
run: |
9492
python -c "import pygmt; pygmt.show_versions()"

.github/workflows/cache_data.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
# by other GitHub Actions workflows.
66
#
77
# 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
8+
# needed urgently, maintainers can update the workflow file or the
99
# 'pygmt/helpers/caching.py' file to refresh the cache.
1010
#
1111
name: Cache data
1212

1313
on:
1414
pull_request:
15-
# Make any changes to the following files to refresh the cache
15+
# Make any changes to the following files to refresh the cache in PRs
1616
paths:
1717
- 'pygmt/helpers/caching.py'
1818
- '.github/workflows/cache_data.yaml'
@@ -47,7 +47,7 @@ jobs:
4747
- nodefaults
4848
create-args: >-
4949
python=3.12
50-
gmt=6.4.0
50+
gmt=6.5.0
5151
numpy
5252
pandas
5353
xarray

.github/workflows/check-links.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
check_links:
1919
name: Check Links
2020
runs-on: ubuntu-latest
21+
if: github.repository == 'GenericMappingTools/pygmt'
2122

2223
steps:
2324
- name: Checkout the repository
@@ -33,7 +34,7 @@ jobs:
3334

3435
- name: Link Checker
3536
id: lychee
36-
uses: lycheeverse/lychee-action@v1.8.0
37+
uses: lycheeverse/lychee-action@v1.9.0
3738
with:
3839
# 429: Too many requests
3940
args: >
@@ -47,8 +48,8 @@ jobs:
4748
--exclude "^https://github.com/GenericMappingTools/gmt/releases/tag/X.Y.Z$"
4849
--exclude "^git"
4950
--exclude "^file://"
50-
--exclude "^https://docs.generic-mapping-tools.org/6.4/%s$"
51-
--exclude "^https://docs.generic-mapping-tools.org/6.4/%3Cmodule-name%3E.html$"
51+
--exclude "^https://docs.generic-mapping-tools.org/6.5/%s$"
52+
--exclude "^https://docs.generic-mapping-tools.org/6.5/%3Cmodule-name%3E.html$"
5253
--exclude "^https://www.generic-mapping-tools.org/remote-datasets/%s$"
5354
--exclude "^https://hackmd.io/@pygmt"
5455
--exclude "^https://doi.org"
@@ -60,8 +61,6 @@ jobs:
6061
"repository/**/*.md"
6162
"repository/**/*.py"
6263
"documentation/dev/**/*.html"
63-
env:
64-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6564
6665
- name: Get current date
6766
id: date

.github/workflows/ci_docs.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,22 @@ name: Docs
1818
on:
1919
push:
2020
branches: [ main ]
21+
paths:
22+
- 'pygmt/**/*.py'
23+
- '!pygmt/tests/**'
24+
- 'doc/**'
25+
- 'examples/**'
26+
- 'README.rst'
27+
- '.github/workflows/ci_docs.yml'
2128
pull_request:
2229
types: [opened, reopened, synchronize, ready_for_review]
23-
paths-ignore:
24-
- 'pygmt/tests/**'
25-
- '*.md'
26-
- 'LICENSE.txt'
27-
- '.gitignore'
30+
paths:
31+
- 'pygmt/**/*.py'
32+
- '!pygmt/tests/**'
33+
- 'doc/**'
34+
- 'examples/**'
35+
- 'README.rst'
36+
- '.github/workflows/ci_docs.yml'
2837
release:
2938
types:
3039
- published
@@ -37,6 +46,7 @@ jobs:
3746
docs:
3847
name: ${{ matrix.os }}
3948
runs-on: ${{ matrix.os }}
49+
if: github.repository == 'GenericMappingTools/pygmt'
4050
strategy:
4151
fail-fast: false
4252
matrix:
@@ -76,8 +86,8 @@ jobs:
7686
cache-environment: true
7787
create-args: >-
7888
python=3.12
79-
gmt=6.4.0
80-
ghostscript=9.54.0
89+
gmt=6.5.0
90+
ghostscript=10.02.1
8191
numpy
8292
pandas
8393
xarray

.github/workflows/ci_doctests.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
test:
2222
name: ${{ matrix.os }}
2323
runs-on: ${{ matrix.os }}
24+
if: github.repository == 'GenericMappingTools/pygmt'
2425
strategy:
2526
fail-fast: false
2627
matrix:
@@ -49,7 +50,7 @@ jobs:
4950
- nodefaults
5051
create-args: >-
5152
python=3.12
52-
gmt=6.4.0
53+
gmt=6.5.0
5354
numpy
5455
pandas
5556
xarray

.github/workflows/ci_tests.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,14 @@ name: Tests
2525
on:
2626
push:
2727
branches: [ main ]
28+
paths:
29+
- 'pygmt/**'
30+
- '.github/workflows/ci_tests.yaml'
2831
pull_request:
2932
types: [opened, reopened, synchronize, ready_for_review]
30-
paths-ignore:
31-
- 'doc/**'
32-
- 'examples/**'
33-
- '*.md'
34-
- 'README.rst'
35-
- 'LICENSE.txt'
36-
- '.gitignore'
33+
paths:
34+
- 'pygmt/**'
35+
- '.github/workflows/ci_tests.yaml'
3736
release:
3837
types:
3938
- published
@@ -105,8 +104,8 @@ jobs:
105104
cache-environment: true
106105
create-args: >-
107106
python=${{ matrix.python-version }}${{ matrix.optional-packages }}
108-
gmt=6.4.0
109-
ghostscript=9.54.0
107+
gmt=6.5.0
108+
ghostscript=10.02.1
110109
numpy=${{ matrix.numpy-version }}
111110
pandas
112111
xarray

.github/workflows/ci_tests_dev.yaml

Lines changed: 14 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,25 @@
11
# Test PyGMT with GMT dev version on Linux/macOS/Windows
22
#
3-
# This workflow runs regular PyGMT tests with the GMT dev version, and also
4-
# pre-release versions of several dependencies like NumPy, Pandas, Xarray, etc.
5-
# If any tests fail, it also uploads the diff images as workflow artifacts.
6-
# The GMT dev version is installed by fetching the latest source codes from
7-
# the GMT master branch and compiling.
3+
# This workflow runs regular PyGMT tests with the GMT dev version, and also pre-release
4+
# versions of several dependencies like NumPy, Pandas, Xarray, etc. If any tests fail,
5+
# it also uploads the diff images as workflow artifacts. The GMT dev version is
6+
# installed by fetching the latest source codes from the GMT master branch and
7+
# compiling.
88
#
9-
# It is triggered when a pull request is marked as "ready as review", or using
10-
# the slash command `/test-gmt-dev`. It is also scheduled to run on Monday,
11-
# Wednesday, and Friday on the main branch.
9+
# It is triggered when a pull request is marked as "ready as review", or labeled with
10+
# 'run/test-gmt-dev'. It is also scheduled to run on Monday, Wednesday, and Friday on
11+
# the main branch.
1212
#
1313
name: GMT Dev Tests
1414

1515
on:
1616
# push:
1717
# branches: [ main ]
1818
pull_request:
19-
types: [ready_for_review]
20-
paths-ignore:
21-
- 'doc/**'
22-
- 'examples/**'
23-
- '*.md'
24-
- 'README.rst'
25-
- 'LICENSE.txt'
26-
- '.gitignore'
27-
repository_dispatch:
28-
types: [test-gmt-dev-command]
19+
types: [ opened, reopened, labeled, synchronize ]
20+
paths:
21+
- 'pygmt/**'
22+
- '.github/workflows/ci_tests_dev.yaml'
2923
# Schedule tests on Monday/Wednesday/Friday
3024
schedule:
3125
- cron: '0 0 * * 1,3,5'
@@ -38,6 +32,7 @@ jobs:
3832
test_gmt_dev:
3933
name: ${{ matrix.os }} - GMT ${{ matrix.gmt_git_ref }}
4034
runs-on: ${{ matrix.os }}
35+
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run/test-gmt-dev')
4136
strategy:
4237
fail-fast: false
4338
matrix:
@@ -52,40 +47,10 @@ jobs:
5247
# Checkout current git repository
5348
- name: Checkout
5449
uses: actions/[email protected]
55-
if: github.event_name != 'repository_dispatch'
5650
with:
5751
# fetch all history so that setuptools-scm works
5852
fetch-depth: 0
5953

60-
# Generate token from GenericMappingTools bot
61-
- name: Generate token from GenericMappingTools bot
62-
uses: tibdex/github-app-token@v2
63-
if: github.event_name == 'repository_dispatch'
64-
id: generate-token
65-
with:
66-
app_id: ${{ secrets.APP_ID }}
67-
private_key: ${{ secrets.APP_PRIVATE_KEY }}
68-
69-
# Checkout the pull request branch
70-
- name: Checkout
71-
uses: actions/[email protected]
72-
if: github.event_name == 'repository_dispatch'
73-
with:
74-
token: ${{ steps.generate-token.outputs.token }}
75-
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
76-
ref: ${{ github.event.client_payload.pull_request.head.ref }}
77-
# fetch all history so that setuptools-scm works
78-
fetch-depth: 0
79-
80-
- name: Show job URL
81-
uses: peter-evans/[email protected]
82-
if: github.event_name == 'repository_dispatch' && (matrix.os == 'ubuntu-latest')
83-
with:
84-
token: ${{ steps.generate-token.outputs.token }}
85-
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
86-
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
87-
body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
88-
8954
# Install Micromamba with conda-forge dependencies
9055
- name: Setup Micromamba
9156
uses: mamba-org/[email protected]
@@ -104,7 +69,7 @@ jobs:
10469
ninja
10570
curl
10671
fftw
107-
ghostscript=9.54.0
72+
ghostscript=10.02.1
10873
glib
10974
hdf5
11075
libblas

.github/workflows/ci_tests_legacy.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,12 @@ name: GMT Legacy Tests
1111
on:
1212
# push:
1313
# branches: [ main ]
14+
# Uncomment the 'pull_request' line below to trigger the workflow in PR
1415
# pull_request:
1516
# types: [ready_for_review]
16-
# paths-ignore:
17-
# - 'doc/**'
18-
# - 'examples/**'
19-
# - '*.md'
20-
# - 'README.rst'
21-
# - 'LICENSE.txt'
22-
# - '.gitignore'
17+
# paths:
18+
# - 'pygmt/**'
19+
# - '.github/workflows/ci_tests_legacy.yaml'
2320
# Schedule tests on Tuesday
2421
schedule:
2522
- cron: '0 0 * * 2'
@@ -32,11 +29,12 @@ jobs:
3229
test:
3330
name: ${{ matrix.os }} - GMT ${{ matrix.gmt_version }}
3431
runs-on: ${{ matrix.os }}
32+
if: github.repository == 'GenericMappingTools/pygmt'
3533
strategy:
3634
fail-fast: false
3735
matrix:
3836
os: [ubuntu-20.04, macos-11, windows-2019]
39-
gmt_version: ['6.3']
37+
gmt_version: ['6.3', '6.4']
4038
timeout-minutes: 30
4139
defaults:
4240
run:

.github/workflows/format-command.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
# Install formatting tools
3333
- name: Install formatting tools
3434
run: |
35-
python -m pip install docformatter ruff
35+
python -m pip install ruff
3636
python -m pip list
3737
sudo apt-get install dos2unix
3838

0 commit comments

Comments
 (0)