Skip to content

Commit 4c1f1e9

Browse files
committed
Merge branch 'main' into pytest/mark-benchmark-part2
2 parents eef9dc8 + 03f66b5 commit 4c1f1e9

File tree

107 files changed

+690
-644
lines changed

Some content is hidden

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

107 files changed

+690
-644
lines changed

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
echo $CONDA/bin >> $GITHUB_PATH
6262
conda install --solver=libmamba gmt=6.4.0 python=3.12 \
6363
numpy pandas xarray netCDF4 packaging \
64-
geopandas pyarrow pytest pytest-benchmark pytest-mpl
64+
geopandas pyarrow pytest pytest-mpl
6565
python -m pip install -U pytest-codspeed setuptools
6666
6767
# Download cached remote files (artifacts) from GitHub

.github/workflows/cache_data.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
# Cache GMT remote data files and uploads as artifacts
1+
# Cache GMT remote data files and upload as artifacts
22
#
33
# This workflow downloads data files needed by PyGMT tests/documentation from
44
# the GMT data server and uploads as workflow artifacts which can be accessed
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 manually uncomment the 'pull_request:' line
9-
# below to refresh the cache.
8+
# needed urgently, maintainers can update the workflow file or
9+
# 'pygmt/helpers/caching.py' file to refresh the cache.
1010
#
1111
name: Cache data
1212

1313
on:
14-
# Uncomment the 'pull_request' line below to manually re-cache data artifacts
15-
# pull_request:
14+
pull_request:
15+
# Make any changes to the following files to refresh the cache
16+
paths:
17+
- 'pygmt/helpers/caching.py'
18+
- '.github/workflows/cache_data.yaml'
1619
# Schedule runs on 12 noon every Sunday
1720
schedule:
1821
- cron: '0 12 * * 0'
@@ -61,7 +64,7 @@ jobs:
6164
# Download remote files
6265
- name: Download remote data
6366
run: |
64-
python -c "from pygmt.helpers.testing import download_test_data; download_test_data()"
67+
python -c "from pygmt.helpers.caching import cache_data; cache_data()"
6568
6669
# Upload the downloaded files as artifacts to GitHub
6770
- name: Upload artifacts to GitHub

.github/workflows/ci_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
channels:
7373
- conda-forge
7474
- nodefaults
75-
cache-downloads: true
75+
cache-downloads: false
7676
cache-environment: true
7777
create-args: >-
7878
python=3.12

.github/workflows/ci_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
channels:
102102
- conda-forge
103103
- nodefaults
104-
cache-downloads: true
104+
cache-downloads: false
105105
cache-environment: true
106106
create-args: >-
107107
python=${{ matrix.python-version }}${{ matrix.optional-packages }}

.github/workflows/ci_tests_dev.yaml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,31 +57,22 @@ jobs:
5757
# fetch all history so that setuptools-scm works
5858
fetch-depth: 0
5959

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-
6960
# Checkout the pull request branch
7061
- name: Checkout
7162
uses: actions/[email protected]
7263
if: github.event_name == 'repository_dispatch'
7364
with:
74-
token: ${{ steps.generate-token.outputs.token }}
65+
token: ${{ secrets.GITHUB_TOKEN }}
7566
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
7667
ref: ${{ github.event.client_payload.pull_request.head.ref }}
7768
# fetch all history so that setuptools-scm works
7869
fetch-depth: 0
7970

8071
- name: Show job URL
8172
uses: peter-evans/[email protected]
82-
if: github.event_name == 'repository_dispatch' && (matrix.os == 'ubuntu-latest')
73+
if: github.event_name == 'repository_dispatch' && runner.os == 'Linux'
8374
with:
84-
token: ${{ steps.generate-token.outputs.token }}
75+
token: ${{ secrets.GITHUB_TOKEN }}
8576
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
8677
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
8778
body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
@@ -95,7 +86,7 @@ jobs:
9586
channels:
9687
- conda-forge
9788
- nodefaults
98-
cache-downloads: true
89+
cache-downloads: false
9990
cache-environment: true
10091
create-args: >-
10192
python=3.12

.github/workflows/ci_tests_legacy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
channels:
6060
- conda-forge
6161
- nodefaults
62-
cache-downloads: true
62+
cache-downloads: false
6363
cache-environment: true
6464
create-args: >-
6565
python=3.9

.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

.github/workflows/slash-command-dispatch.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,10 @@ jobs:
1313
if: ${{ github.event.issue.pull_request }}
1414
runs-on: ubuntu-latest
1515
steps:
16-
# Generate token from GenericMappingTools bot
17-
- uses: tibdex/github-app-token@v2
18-
id: generate-token
19-
with:
20-
app_id: ${{ secrets.APP_ID }}
21-
private_key: ${{ secrets.APP_PRIVATE_KEY }}
22-
2316
- name: Slash Command Dispatch
2417
uses: peter-evans/slash-command-dispatch@v3
2518
with:
26-
token: ${{ steps.generate-token.outputs.token }}
19+
token: ${{ secrets.GITHUB_TOKEN }}
2720
commands: |
2821
format
2922
test-gmt-dev

.github/workflows/style_checks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ jobs:
3434

3535
- name: Install packages
3636
run: |
37-
python -m pip install docformatter ruff
37+
python -m pip install ruff
3838
python -m pip list
3939
sudo apt-get install dos2unix
4040
41-
- name: Formatting check (docformatter, ruff)
41+
- name: Formatting check (ruff)
4242
run: make check
4343

4444
- name: Ensure files use UNIX line breaks and have 644 permission

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017-2023 The PyGMT Developers
1+
Copyright (c) 2017-2024 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)