Skip to content

Commit

Permalink
Merge branch 'main' into wrap-ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
willschlitzer committed Dec 15, 2021
2 parents 601b89a + 387887b commit 1333d6a
Show file tree
Hide file tree
Showing 235 changed files with 5,614 additions and 1,751 deletions.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bump_gmt_checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bump GMT version checklist
about: Checklist for bumping the minimum required GMT version.
title: Bump to GMT X.Y.Z
labels: maintenance
assignees: ''

---

:tada: [GMT X.Y.Z](https://github.com/GenericMappingTools/gmt/releases/tag/X.Y.Z) has been released! It is installable from the
[conda-forge channel](https://anaconda.org/conda-forge/gmt/files) using the following command:

`conda install -c conda-forge gmt=X.Y.Z`

<!-- Please add specific checklist items for the tests, xfail pytest markers, and deprecated syntax that need to be updated. -->

**To-Do**:
- [ ] Bump the minimum required GMT version (1 PR)
- [ ] Update `.github/workflows/cache_data.yaml`
- [ ] Update `.github/workflows/ci_docs.yml`
- [ ] Update `.github/workflows/ci_tests.yaml`
- [ ] Update `doc/install.rst`
- [ ] Update `environment.yml`
- [ ] Update `required_version` in `pygmt/clib/session.py`
- [ ] Update `test_get_default` in `pygmt/tests/test_clib.py`
- [ ] Update compatibility table in `README.rst`
- [ ] Fix failing tests (1 or more PRs)
- [ ] 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
- [ ] Update deprecated syntax in source code and examples based on the [GMT Changelog](https://docs.generic-mapping-tools.org/latest/changes.html)
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Feature request
name: Feature request - General feature
about: Request the addition of a new feature/functionality
title: ''
labels: feature request
Expand Down
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/module_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Feature request - Wrap new GMT module
about: Request PyGMT wrapper for a GMT module
title: Wrapper for <module-name>
labels: feature request
assignees: ''

---

<!-- 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. -->

**Description of the desired module**:

Implement [`<module-name>`](https://docs.generic-mapping-tools.org/latest/<module-name>.html) which `<insert description of the GMT module>`.

<!-- 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). -->


**Are you willing to help implement and maintain this feature?** Yes/No

<!-- 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. -->

**Checklist for wrapping GMT Module**

<!-- Please do not edit this section when submitting pull requests. This checklist will help track progress on wrapping the module. -->

- [ ] 'Initial feature implementation' Pull Request (PR)
- [ ] 'Add missing aliases to module' documentation PR
- [ ] 'Support additional functionality in module' PR (optional)
- [ ] 'Add gallery example for module' documentation PR
- [ ] 'Add tutorial for module' documentation PR (optional)
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/release_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ assignees: ''
- [ ] Wrap Y ()

**Before release**:
- [ ] 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
- [ ] Reserve a DOI on [Zenodo](https://zenodo.org) by clicking on "New Version"
- [ ] Finish up 'Changelog entry for v0.x.x' Pull Request:
- [ ] Add a new entry in `doc/_static/version_switch.js` for documentation switcher
- [ ] Update citation information https://github.com/GenericMappingTools/pygmt#citing-pygmt
- [ ] Update `CITATION.cff` and BibTeX at https://github.com/GenericMappingTools/pygmt#citing-pygmt
- [ ] Add the documentation link https://github.com/GenericMappingTools/pygmt#documentation-for-other-versions
- [ ] Add compatibility information https://github.com/GenericMappingTools/pygmt#compatibility-with-gmt-and-pythonnumpy-versions
- [ ] 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))
Expand Down
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Fixes #
- [ ] Add tests for new features or tests that would have caught the bug that you're fixing.
- [ ] Add new public functions/methods/classes to `doc/api/index.rst`.
- [ ] Write detailed docstrings for all functions/methods.
- [ ] If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
- [ ] If adding new functionality, add an example to docstrings or tutorials.

**Slash Commands**
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/cache_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,26 @@ jobs:
steps:
# Checkout current git repository
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2.4.0
with:
# fecth all history so that setuptools-scm works
fetch-depth: 0

# Setup Miniconda
- name: Setup Miniconda
# Install Mambaforge with conda-forge dependencies
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2.1.1
with:
channels: conda-forge
miniconda-version: "latest"
channels: conda-forge,nodefaults
channel-priority: strict
miniforge-version: latest
miniforge-variant: Mambaforge
mamba-version: "*"
use-mamba: true

# Install GMT and other required dependencies from conda-forge
- name: Install dependencies
run: |
conda install gmt=6.2.0 \
mamba install gmt=6.3.0 \
numpy pandas xarray netCDF4 packaging matplotlib
# Install the package that we want to test
Expand All @@ -47,6 +51,8 @@ jobs:
- name: Download remote data
run: |
python -c "from pygmt.helpers.testing import download_test_data; download_test_data()"
env:
GMT_DATA_SERVER: https://oceania.generic-mapping-tools.org/

# Upload the downloaded files as artifacts to GitHub
- name: Upload artifacts to GitHub
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,32 @@ jobs:

steps:
- name: Checkout the repository
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2.4.0
with:
path: repository

- name: Checkout the documentation
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2.4.0
with:
ref: gh-pages
path: documentation

- name: Link Checker
uses: lycheeverse/lychee-action@v1.0.8
uses: lycheeverse/lychee-action@v1.2.0
with:
# 429: Too many requests
args: >
--accept 429
--exclude-mail
--exclude "^https://doi.org/10.5281/zenodo$"
--exclude "^https://zenodo.org/badge/DOI/$"
--exclude "^https://zenodo.org/badge/DOI/10.5281/zenodo$"
--exclude "^https://github.com/GenericMappingTools/pygmt/pull/[0-9]*$"
--exclude "^https://github.com/GenericMappingTools/pygmt/issues/[0-9]*$"
--exclude "^https://www.generic-mapping-tools.org/_static/gmt-logo.png/$"
--exclude "^https://www.generic-mapping-tools.org/_static/gmt-logo.png/n/n$"
--exclude "^``@ridge.txt$"
--exclude "^git"
--exclude "^file://"
--exclude "^https://docs.generic-mapping-tools.org/latest/%s$"
--exclude "^https://docs.generic-mapping-tools.org/latest/%3Cmodule-name%3E.html$"
--exclude "https://hackmd.io/@pygmt"
--verbose
"repository/**/*.rst"
Expand All @@ -51,8 +50,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"

- name: Create Issue From File
uses: peter-evans/create-issue-from-file@v3
with:
title: Link Checker Report
title: Link Checker Report on ${{ steps.date.outputs.date }}
content-filepath: ./lychee/out.md
24 changes: 14 additions & 10 deletions .github/workflows/ci_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,34 +49,38 @@ jobs:

# Checkout current git repository
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2.4.0
with:
# fecth all history so that setuptools-scm works
fetch-depth: 0

# Setup Miniconda
- name: Setup Miniconda
# Install Mambaforge with conda-forge dependencies
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2.1.1
with:
activate-environment: pygmt
python-version: ${{ matrix.python-version }}
channels: conda-forge
miniconda-version: "latest"
channels: conda-forge,nodefaults
channel-priority: strict
miniforge-version: latest
miniforge-variant: Mambaforge
mamba-version: "*"
use-mamba: true

# Install GMT and other required dependencies from conda-forge
- name: Install dependencies
run: |
conda install gmt=6.2.0 numpy pandas xarray netCDF4 packaging \
ipython make myst-parser \
mamba install gmt=6.3.0 numpy pandas xarray netCDF4 packaging \
ipython make myst-parser geopandas \
sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme
# Show installed pkg information for postmortem diagnostic
- name: List installed packages
run: conda list
run: mamba list

# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
uses: dawidd6/action-download-artifact@v2.14.1
uses: dawidd6/action-download-artifact@v2.16.0
with:
workflow: cache_data.yaml
workflow_conclusion: success
Expand All @@ -103,7 +107,7 @@ jobs:
run: make -C doc clean all

- name: Checkout the gh-pages branch
uses: actions/checkout@28c7f3d2b5162b5ddd3dfd9a45aa55eaf396478b
uses: actions/checkout@v2.4.0
with:
ref: gh-pages
# Checkout to this folder instead of the current one
Expand Down
33 changes: 18 additions & 15 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ jobs:
# - os: ubuntu-latest
# python-version: 3.7
# isDraft: true
# Pair Python 3.7 with NumPy 1.17 and Python 3.9 with NumPy 1.21
# Pair Python 3.7 with NumPy 1.18 and Python 3.9 with NumPy 1.21
# Only install optional packages on Python 3.9/NumPy 1.21
include:
- python-version: 3.7
numpy-version: '1.17'
numpy-version: '1.18'
optional-packages: ''
- python-version: 3.9
numpy-version: '1.21'
optional-packages: 'geopandas'
optional-packages: 'geopandas ipython'
defaults:
run:
shell: bash -l {0}
Expand All @@ -72,37 +72,40 @@ jobs:

# Checkout current git repository
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2.4.0
with:
# fecth all history so that setuptools-scm works
fetch-depth: 0

# Setup Miniconda
- name: Setup Miniconda
# Install Mambaforge with conda-forge dependencies
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2.1.1
with:
activate-environment: pygmt
python-version: ${{ matrix.python-version }}
channels: conda-forge
miniconda-version: "latest"
channels: conda-forge,nodefaults
channel-priority: strict
miniforge-version: latest
miniforge-variant: Mambaforge
mamba-version: "*"
use-mamba: true

# Install GMT and other required dependencies from conda-forge
- name: Install dependencies
run: |
conda install gmt=6.2.0 numpy=${{ matrix.numpy-version }} \
mamba install gmt=6.3.0 numpy=${{ matrix.numpy-version }} \
pandas xarray netCDF4 packaging \
${{ matrix.optional-packages }} \
codecov coverage[toml] dvc ipython make \
pytest-cov pytest-mpl pytest>=6.0 \
sphinx-gallery
dvc make pytest>=6.0 \
pytest-cov pytest-mpl sphinx-gallery tomli
# Show installed pkg information for postmortem diagnostic
- name: List installed packages
run: conda list
run: mamba list

# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
uses: dawidd6/action-download-artifact@v2.14.1
uses: dawidd6/action-download-artifact@v2.16.0
with:
workflow: cache_data.yaml
workflow_conclusion: success
Expand Down Expand Up @@ -144,7 +147,7 @@ jobs:

# Upload coverage to Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2.0.2
uses: codecov/codecov-action@v2.1.0
with:
file: ./coverage.xml # optional
env_vars: OS,PYTHON,NUMPY
Expand Down
26 changes: 15 additions & 11 deletions .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
fail-fast: false
matrix:
python-version: [3.9]
os: [ubuntu-latest, macOS-11.0, windows-latest]
os: [ubuntu-latest, macOS-11.0, windows-2022]
gmt_git_ref: [master]
defaults:
run:
Expand All @@ -45,7 +45,7 @@ jobs:

# Checkout current git repository
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2.4.0
if: github.event_name != 'repository_dispatch'
with:
# fecth all history so that setuptools-scm works
Expand All @@ -62,28 +62,32 @@ jobs:

# Checkout the pull request branch
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v2.4.0
if: github.event_name == 'repository_dispatch'
with:
token: ${{ steps.generate-token.outputs.token }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}
ref: ${{ github.event.pull_request.head.sha }}
# fecth all history so that setuptools-scm works
fetch-depth: 0

# Setup Miniconda
- name: Setup Miniconda
# Install Mambaforge with conda-forge dependencies
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2.1.1
with:
activate-environment: pygmt
python-version: ${{ matrix.python-version }}
channels: conda-forge
miniconda-version: "latest"
channels: conda-forge,nodefaults
channel-priority: strict
miniforge-version: latest
miniforge-variant: Mambaforge
mamba-version: "*"
use-mamba: true

# Install dependencies from conda-forge
- name: Install dependencies
run: |
conda install ninja cmake libblas libcblas liblapack fftw gdal geopandas \
mamba install ninja cmake libblas libcblas liblapack fftw gdal geopandas \
ghostscript libnetcdf hdf5 zlib curl pcre make dvc
pip install --pre numpy pandas xarray netCDF4 packaging \
ipython pytest-cov pytest-mpl pytest>=6.0 sphinx-gallery \
Expand All @@ -98,12 +102,12 @@ jobs:
if: runner.os != 'Windows'

- name: Install GMT dev version from conda-forge (Windows)
run: conda install -c conda-forge/label/dev gmt
run: mamba install -c conda-forge/label/dev gmt
if: runner.os == 'Windows'

# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
uses: dawidd6/action-download-artifact@v2.14.1
uses: dawidd6/action-download-artifact@v2.16.0
with:
workflow: cache_data.yaml
workflow_conclusion: success
Expand Down
Loading

0 comments on commit 1333d6a

Please sign in to comment.