Skip to content

Commit c90f27c

Browse files
committed
Merge branch 'main' into gridding/triangulate
2 parents 9e67eef + fc352ca commit c90f27c

File tree

237 files changed

+6072
-2344
lines changed

Some content is hidden

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

237 files changed

+6072
-2344
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bump GMT version checklist
3+
about: Checklist for bumping the minimum required GMT version.
4+
title: Bump to GMT X.Y.Z
5+
labels: maintenance
6+
assignees: ''
7+
8+
---
9+
10+
:tada: [GMT X.Y.Z](https://github.com/GenericMappingTools/gmt/releases/tag/X.Y.Z) has been released! It is installable from the
11+
[conda-forge channel](https://anaconda.org/conda-forge/gmt/files) using the following command:
12+
13+
`conda install -c conda-forge gmt=X.Y.Z`
14+
15+
<!-- Please add specific checklist items for the tests, xfail pytest markers, and deprecated syntax that need to be updated. -->
16+
17+
**To-Do**:
18+
- [ ] Bump the minimum required GMT version (1 PR)
19+
- [ ] Update `.github/workflows/cache_data.yaml`
20+
- [ ] Update `.github/workflows/ci_docs.yml`
21+
- [ ] Update `.github/workflows/ci_tests.yaml`
22+
- [ ] Update `doc/install.rst`
23+
- [ ] Update `environment.yml`
24+
- [ ] Update `required_version` in `pygmt/clib/session.py`
25+
- [ ] Update `test_get_default` in `pygmt/tests/test_clib.py`
26+
- [ ] Update compatibility table in `README.rst`
27+
- [ ] Fix failing tests (1 or more PRs)
28+
- [ ] Remove [xfail](https://docs.pytest.org/en/stable/skipping.html#xfail-mark-test-functions-as-expected-to-fail) pytest markers on tests that are now xpass
29+
- [ ] Update deprecated syntax in source code and examples based on the [GMT Changelog](https://docs.generic-mapping-tools.org/latest/changes.html)

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Feature request
2+
name: Feature request - General feature
33
about: Request the addition of a new feature/functionality
44
title: ''
55
labels: feature request
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Feature request - Wrap new GMT module
3+
about: Request PyGMT wrapper for a GMT module
4+
title: Wrapper for <module-name>
5+
labels: feature request
6+
assignees: ''
7+
8+
---
9+
10+
<!-- Please replace <module-name> in the issue title and the description with the name of the requested module and add the description of the module. -->
11+
12+
**Description of the desired module**:
13+
14+
Implement [`<module-name>`](https://docs.generic-mapping-tools.org/latest/<module-name>.html) which `<insert description of the GMT module>`.
15+
16+
<!-- Please be as detailed as you can in your description. If possible, include an example of how you would like to use this feature (even better if it's a code example). -->
17+
18+
19+
**Are you willing to help implement and maintain this feature?** Yes/No
20+
21+
<!-- Every feature we add is code that we will have to maintain and keep updated. This takes a lot of effort. If you are willing to be involved in the project and help maintain your feature, it will make it easier for us to accept it. -->
22+
23+
**Checklist for wrapping GMT Module**
24+
25+
<!-- Please do not edit this section when submitting pull requests. This checklist will help track progress on wrapping the module. -->
26+
27+
- [ ] 'Initial feature implementation' Pull Request (PR)
28+
- [ ] 'Add missing aliases to module' documentation PR
29+
- [ ] 'Support additional functionality in module' PR (optional)
30+
- [ ] 'Add gallery example for module' documentation PR
31+
- [ ] 'Add tutorial for module' documentation PR (optional)

.github/ISSUE_TEMPLATE/release_checklist.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ assignees: ''
1616
- [ ] Wrap Y ()
1717

1818
**Before release**:
19+
- [ ] Run `grep --include="*.py" -r 'remove_version="vX.Y.Z"' pygmt` from the base of the repository to check if any deprecations and related tests should be removed in this version
1920
- [ ] Reserve a DOI on [Zenodo](https://zenodo.org) by clicking on "New Version"
2021
- [ ] Finish up 'Changelog entry for v0.x.x' Pull Request:
2122
- [ ] Add a new entry in `doc/_static/version_switch.js` for documentation switcher
22-
- [ ] Update citation information https://github.com/GenericMappingTools/pygmt#citing-pygmt
23+
- [ ] Update `CITATION.cff` and BibTeX at https://github.com/GenericMappingTools/pygmt#citing-pygmt
2324
- [ ] Add the documentation link https://github.com/GenericMappingTools/pygmt#documentation-for-other-versions
2425
- [ ] Add compatibility information https://github.com/GenericMappingTools/pygmt#compatibility-with-gmt-and-pythonnumpy-versions
2526
- [ ] Copy draft changelog from Release Drafter and edit it to look nice ([see maintainers guide for details](https://www.pygmt.org/dev/maintenance.html#updating-the-changelog))

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Fixes #
1414
- [ ] Add tests for new features or tests that would have caught the bug that you're fixing.
1515
- [ ] Add new public functions/methods/classes to `doc/api/index.rst`.
1616
- [ ] Write detailed docstrings for all functions/methods.
17+
- [ ] If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
1718
- [ ] If adding new functionality, add an example to docstrings or tutorials.
1819

1920
**Slash Commands**

.github/workflows/cache_data.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,26 @@ jobs:
1919
steps:
2020
# Checkout current git repository
2121
- name: Checkout
22-
uses: actions/checkout@v2.3.4
22+
uses: actions/checkout@v3.0.0
2323
with:
2424
# fecth all history so that setuptools-scm works
2525
fetch-depth: 0
2626

27-
# Setup Miniconda
28-
- name: Setup Miniconda
27+
# Install Mambaforge with conda-forge dependencies
28+
- name: Setup Mambaforge
2929
uses: conda-incubator/[email protected]
3030
with:
31-
channels: conda-forge
32-
miniconda-version: "latest"
31+
channels: conda-forge,nodefaults
32+
channel-priority: strict
33+
miniforge-version: latest
34+
miniforge-variant: Mambaforge
35+
mamba-version: "*"
36+
use-mamba: true
3337

3438
# Install GMT and other required dependencies from conda-forge
3539
- name: Install dependencies
3640
run: |
37-
conda install gmt=6.2.0 \
41+
mamba install gmt=6.3.0 \
3842
numpy pandas xarray netCDF4 packaging matplotlib
3943
4044
# Install the package that we want to test

.github/workflows/check-links.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,32 @@ jobs:
1515

1616
steps:
1717
- name: Checkout the repository
18-
uses: actions/checkout@v2.3.4
18+
uses: actions/checkout@v3.0.0
1919
with:
2020
path: repository
2121

2222
- name: Checkout the documentation
23-
uses: actions/checkout@v2.3.4
23+
uses: actions/checkout@v3.0.0
2424
with:
2525
ref: gh-pages
2626
path: documentation
2727

2828
- name: Link Checker
29-
uses: lycheeverse/lychee-action@v1.0.8
29+
uses: lycheeverse/lychee-action@v1.3.2
3030
with:
3131
# 429: Too many requests
3232
args: >
3333
--accept 429
34+
--exclude-mail
3435
--exclude "^https://doi.org/10.5281/zenodo$"
3536
--exclude "^https://zenodo.org/badge/DOI/$"
3637
--exclude "^https://zenodo.org/badge/DOI/10.5281/zenodo$"
3738
--exclude "^https://github.com/GenericMappingTools/pygmt/pull/[0-9]*$"
3839
--exclude "^https://github.com/GenericMappingTools/pygmt/issues/[0-9]*$"
39-
--exclude "^https://www.generic-mapping-tools.org/_static/gmt-logo.png/$"
40-
--exclude "^https://www.generic-mapping-tools.org/_static/gmt-logo.png/n/n$"
41-
--exclude "^``@ridge.txt$"
4240
--exclude "^git"
4341
--exclude "^file://"
4442
--exclude "^https://docs.generic-mapping-tools.org/latest/%s$"
43+
--exclude "^https://docs.generic-mapping-tools.org/latest/%3Cmodule-name%3E.html$"
4544
--exclude "https://hackmd.io/@pygmt"
4645
--verbose
4746
"repository/**/*.rst"
@@ -51,8 +50,12 @@ jobs:
5150
env:
5251
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5352

53+
- name: Get current date
54+
id: date
55+
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
56+
5457
- name: Create Issue From File
5558
uses: peter-evans/create-issue-from-file@v3
5659
with:
57-
title: Link Checker Report
60+
title: Link Checker Report on ${{ steps.date.outputs.date }}
5861
content-filepath: ./lychee/out.md

.github/workflows/ci_docs.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ on:
1313
- '*.json'
1414
- 'LICENSE.txt'
1515
- '.gitignore'
16-
- '.pylintrc'
1716
release:
1817
types:
1918
- published
@@ -25,7 +24,7 @@ jobs:
2524
strategy:
2625
fail-fast: false
2726
matrix:
28-
python-version: [3.9]
27+
python-version: ['3.9']
2928
os: [ubuntu-latest, macOS-latest, windows-latest]
3029
# Is it a draft Pull Request (true or false)?
3130
isDraft:
@@ -36,6 +35,7 @@ jobs:
3635
isDraft: true
3736
- os: windows-latest
3837
isDraft: true
38+
timeout-minutes: 30
3939
defaults:
4040
run:
4141
shell: bash -l {0}
@@ -49,34 +49,38 @@ jobs:
4949

5050
# Checkout current git repository
5151
- name: Checkout
52-
uses: actions/checkout@v2.3.4
52+
uses: actions/checkout@v3.0.0
5353
with:
5454
# fecth all history so that setuptools-scm works
5555
fetch-depth: 0
5656

57-
# Setup Miniconda
58-
- name: Setup Miniconda
57+
# Install Mambaforge with conda-forge dependencies
58+
- name: Setup Mambaforge
5959
uses: conda-incubator/[email protected]
6060
with:
6161
activate-environment: pygmt
6262
python-version: ${{ matrix.python-version }}
63-
channels: conda-forge
64-
miniconda-version: "latest"
63+
channels: conda-forge,nodefaults
64+
channel-priority: strict
65+
miniforge-version: latest
66+
miniforge-variant: Mambaforge
67+
mamba-version: "*"
68+
use-mamba: true
6569

6670
# Install GMT and other required dependencies from conda-forge
6771
- name: Install dependencies
6872
run: |
69-
conda install gmt=6.2.0 numpy pandas xarray netCDF4 packaging \
73+
mamba install gmt=6.3.0 numpy pandas xarray netCDF4 packaging \
7074
ipython make myst-parser geopandas \
7175
sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme
7276
7377
# Show installed pkg information for postmortem diagnostic
7478
- name: List installed packages
75-
run: conda list
79+
run: mamba list
7680

7781
# Download cached remote files (artifacts) from GitHub
7882
- name: Download remote data from GitHub
79-
uses: dawidd6/action-download-artifact@v2.14.1
83+
uses: dawidd6/action-download-artifact@v2.17.0
8084
with:
8185
workflow: cache_data.yaml
8286
workflow_conclusion: success
@@ -103,7 +107,7 @@ jobs:
103107
run: make -C doc clean all
104108

105109
- name: Checkout the gh-pages branch
106-
uses: actions/checkout@28c7f3d2b5162b5ddd3dfd9a45aa55eaf396478b
110+
uses: actions/checkout@v3.0.0
107111
with:
108112
ref: gh-pages
109113
# Checkout to this folder instead of the current one

.github/workflows/ci_tests.yaml

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ on:
1515
- 'README.rst'
1616
- 'LICENSE.txt'
1717
- '.gitignore'
18-
- '.pylintrc'
1918
release:
2019
types:
2120
- published
@@ -30,7 +29,7 @@ jobs:
3029
strategy:
3130
fail-fast: false
3231
matrix:
33-
python-version: [3.7, 3.9]
32+
python-version: ['3.8', '3.9']
3433
os: [ubuntu-latest, macOS-latest, windows-latest]
3534
# Is it a draft Pull Request (true or false)?
3635
isDraft:
@@ -44,15 +43,16 @@ jobs:
4443
# - os: ubuntu-latest
4544
# python-version: 3.7
4645
# isDraft: true
47-
# Pair Python 3.7 with NumPy 1.18 and Python 3.9 with NumPy 1.21
48-
# Only install optional packages on Python 3.9/NumPy 1.21
46+
# Pair Python 3.8 with NumPy 1.19 and Python 3.9 with NumPy 1.22
47+
# Only install optional packages on Python 3.9/NumPy 1.22
4948
include:
50-
- python-version: 3.7
51-
numpy-version: '1.18'
49+
- python-version: '3.8'
50+
numpy-version: '1.19'
5251
optional-packages: ''
53-
- python-version: 3.9
54-
numpy-version: '1.21'
55-
optional-packages: 'geopandas'
52+
- python-version: '3.9'
53+
numpy-version: '1.22'
54+
optional-packages: 'geopandas ipython'
55+
timeout-minutes: 30
5656
defaults:
5757
run:
5858
shell: bash -l {0}
@@ -72,37 +72,40 @@ jobs:
7272

7373
# Checkout current git repository
7474
- name: Checkout
75-
uses: actions/checkout@v2.3.4
75+
uses: actions/checkout@v3.0.0
7676
with:
7777
# fecth all history so that setuptools-scm works
7878
fetch-depth: 0
7979

80-
# Setup Miniconda
81-
- name: Setup Miniconda
80+
# Install Mambaforge with conda-forge dependencies
81+
- name: Setup Mambaforge
8282
uses: conda-incubator/[email protected]
8383
with:
8484
activate-environment: pygmt
8585
python-version: ${{ matrix.python-version }}
86-
channels: conda-forge
87-
miniconda-version: "latest"
86+
channels: conda-forge,nodefaults
87+
channel-priority: strict
88+
miniforge-version: latest
89+
miniforge-variant: Mambaforge
90+
mamba-version: "*"
91+
use-mamba: true
8892

8993
# Install GMT and other required dependencies from conda-forge
9094
- name: Install dependencies
9195
run: |
92-
conda install gmt=6.2.0 numpy=${{ matrix.numpy-version }} \
96+
mamba install gmt=6.3.0 numpy=${{ matrix.numpy-version }} \
9397
pandas xarray netCDF4 packaging \
9498
${{ matrix.optional-packages }} \
95-
codecov coverage[toml] dvc ipython make \
96-
pytest-cov pytest-mpl pytest>=6.0 \
97-
sphinx-gallery
99+
dvc make pytest>=6.0 \
100+
pytest-cov pytest-doctestplus pytest-mpl sphinx-gallery tomli
98101
99102
# Show installed pkg information for postmortem diagnostic
100103
- name: List installed packages
101-
run: conda list
104+
run: mamba list
102105

103106
# Download cached remote files (artifacts) from GitHub
104107
- name: Download remote data from GitHub
105-
uses: dawidd6/action-download-artifact@v2.14.1
108+
uses: dawidd6/action-download-artifact@v2.17.0
106109
with:
107110
workflow: cache_data.yaml
108111
workflow_conclusion: success
@@ -121,7 +124,7 @@ jobs:
121124
# Pull baseline image data from dvc remote (DAGsHub)
122125
- name: Pull baseline image data from dvc remote
123126
run: |
124-
dvc pull
127+
dvc pull --verbose
125128
ls -lhR pygmt/tests/baseline/
126129
127130
# Install the package that we want to test
@@ -144,7 +147,7 @@ jobs:
144147

145148
# Upload coverage to Codecov
146149
- name: Upload coverage to Codecov
147-
uses: codecov/codecov-action@v2.0.3
150+
uses: codecov/codecov-action@v2.1.0
148151
with:
149152
file: ./coverage.xml # optional
150153
env_vars: OS,PYTHON,NUMPY

0 commit comments

Comments
 (0)