Skip to content

Commit

Permalink
Merge branch 'main' into refactor/meca-convention
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman authored Feb 3, 2025
2 parents ebe7f38 + 05c4ab9 commit 97e70a7
Show file tree
Hide file tree
Showing 72 changed files with 737 additions and 262 deletions.
18 changes: 7 additions & 11 deletions .github/ISSUE_TEMPLATE/4-release_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@ assignees: ''

**Before release**:

- [ ] 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)
- [ ] 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)
- [ ] Review the ["PyGMT Team" page](https://www.pygmt.org/dev/team.html)
- [ ] README looks good on TestPyPI. Visit [TestPyPI](https://test.pypi.org/project/pygmt/#history), click the latest pre-release, and check the homepage.
- [ ] Check to ensure that:
- [ ] Deprecated workarounds/codes/tests are removed. Run `grep "# TODO" **/*.py` to find all potential TODOs.
- [ ] All tests pass in the ["GMT Legacy Tests" workflow](https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_tests_legacy.yaml)
- [ ] All tests pass in the ["GMT Dev Tests" workflow](https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_tests_dev.yaml)
- [ ] All tests pass in the ["Doctests" workflow](https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_doctests.yaml)
- [ ] Update warnings in `pygmt/_show_versions.py` as well as notes in
[Not working transparency](https://www.pygmt.org/dev/install.html#not-working-transparency)
regarding GMT-Ghostscript incompatibility
- [ ] Update warnings in `pygmt/_show_versions.py` as well as notes in [Not working transparency](https://www.pygmt.org/dev/install.html#not-working-transparency) regarding GMT-Ghostscript incompatibility
- [ ] Reserve a DOI on [Zenodo](https://zenodo.org) by clicking on "New Version"
- [ ] Finish up the "Changelog entry for v0.x.x" Pull Request (Use the previous changelog PR as a reference)
- [ ] Run `make codespell` to check common misspellings. If there are any, either fix them or add them to `ignore-words-list` in `pyproject.toml`
Expand All @@ -41,18 +39,16 @@ assignees: ''
- [ ] Edit the draft release notes with the finalized changelog
- [ ] Set the tag version and release title to vX.Y.Z
- [ ] Make a release by clicking the 'Publish Release' button, this will automatically create a tag too
- [ ] Download pygmt-X.Y.Z.zip (rename to pygmt-vX.Y.Z.zip) and baseline-images.zip from
the release page, and upload the two zip files to https://zenodo.org/deposit,
ensure that they are filed under the correct reserved DOI
- [ ] Download pygmt-X.Y.Z.zip (rename to pygmt-vX.Y.Z.zip) and baseline-images.zip from the release page, and upload the two zip files to https://zenodo.org/deposit, ensure that they are filed under the correct reserved DOI

**After release**:

- [ ] Update conda-forge [pygmt-feedstock](https://github.com/conda-forge/pygmt-feedstock)
[Done automatically by conda-forge's bot. Remember to pin Python and SPEC0 versions]
- [ ] Update conda-forge [pygmt-feedstock](https://github.com/conda-forge/pygmt-feedstock) [Done automatically by conda-forge's bot. Remember to pin GMT, Python and SPEC0 versions]
- [ ] Bump PyGMT version on https://github.com/GenericMappingTools/try-gmt (after conda-forge update)
- [ ] Announce the release on:
- [ ] GMT [forum](https://forum.generic-mapping-tools.org/c/news/) (do this announcement first! Requires moderator status)
- [ ] [ResearchGate](https://www.researchgate.net) (after forum announcement, add new version as research item via the **code** category, be sure to include the corresponding new Zenodo DOI)
- [ ] [ResearchGate](https://www.researchgate.net) (after forum announcement; download the ZIP file of the new release from the release page and add it as research item via the **code** category, be sure to include the corresponding new Zenodo DOI)
- [ ] Update release checklist template with any additional bullet points that may have arisen during the release

---

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v2.0.3
uses: mamba-org/setup-micromamba@v2.0.4
with:
environment-name: pygmt
condarc: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cache_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v2.0.3
uses: mamba-org/setup-micromamba@v2.0.4
with:
environment-name: pygmt
condarc: |
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:

# Upload the downloaded files as artifacts to GitHub
- name: Upload artifacts to GitHub
uses: actions/upload-artifact@v4.5.0
uses: actions/upload-artifact@v4.6.0
with:
name: gmt-cache
include-hidden-files: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2.1.0
uses: lycheeverse/lychee-action@v2.2.0
with:
fail: false # Don't fail action on broken links
output: /tmp/lychee-out.md
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/ci_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v2.0.3
uses: mamba-org/setup-micromamba@v2.0.4
with:
environment-name: pygmt
condarc: |
Expand Down Expand Up @@ -163,9 +163,14 @@ jobs:
# to get the right commit hash.
message="Deploy $version from $(git rev-parse --short HEAD)"
cd deploy
# Need to have this file so that GitHub doesn't try to run Jekyll
# Create some files in the root directory.
# .nojekyll: Need to have this file so that GitHub doesn't try to run Jekyll
touch .nojekyll
# Delete all the files and replace with our new set
# CNAME: Set the custom domain name
echo "www.pygmt.org" > CNAME
# index.html: Redirect to the latest version
echo '<meta http-equiv="Refresh" content="0;url=latest/"/>' > index.html
# Delete all the files and replace with our new set
echo -e "\nRemoving old files from previous builds of ${version}:"
rm -rvf ${version}
echo -e "\nCopying HTML files to ${version}:"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_doctests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v2.0.3
uses: mamba-org/setup-micromamba@v2.0.4
with:
environment-name: pygmt
condarc: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v2.0.3
uses: mamba-org/setup-micromamba@v2.0.4
with:
environment-name: pygmt
condarc: |
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
GH_TOKEN: ${{ github.token }}

- name: Install uv
uses: astral-sh/setup-uv@v5.1.0
uses: astral-sh/setup-uv@v5.2.1
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -177,15 +177,15 @@ jobs:

# Upload diff images on test failure
- name: Upload diff images if any test fails
uses: actions/upload-artifact@v4.5.0
uses: actions/upload-artifact@v4.6.0
if: failure()
with:
name: artifact-${{ runner.os }}-${{ matrix.python-version }}
path: tmp-test-dir-with-unique-name

# Upload coverage to Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.1.2
uses: codecov/codecov-action@v5.3.1
if: success() || failure()
with:
use_oidc: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v2.0.3
uses: mamba-org/setup-micromamba@v2.0.4
with:
environment-name: pygmt
condarc: |
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:

# Upload diff images on test failure
- name: Upload diff images if any test fails
uses: actions/upload-artifact@v4.5.0
uses: actions/upload-artifact@v4.6.0
if: ${{ failure() }}
with:
name: artifact-GMT-${{ matrix.gmt_git_ref }}-${{ runner.os }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_tests_legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-13, windows-2019]
os: [ubuntu-22.04, macos-13, windows-2019]
gmt_version: ['6.4']
timeout-minutes: 30
defaults:
Expand All @@ -51,7 +51,7 @@ jobs:

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v2.0.3
uses: mamba-org/setup-micromamba@v2.0.4
with:
environment-name: pygmt
condarc: |
Expand Down
62 changes: 51 additions & 11 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,17 @@ on:
# - main

jobs:
publish-pypi:
name: Publish to PyPI
build:
name: Build distribution 📦
runs-on: ubuntu-latest
permissions:
# This permission is mandatory for OIDC publishing
id-token: write
if: github.repository == 'GenericMappingTools/pygmt'

steps:
- name: Checkout
uses: actions/checkout@v4.2.2
with:
# fetch all history so that setuptools-scm works
fetch-depth: 0
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5.3.0
Expand All @@ -74,11 +71,54 @@ jobs:
echo "Generated files:"
ls -lh dist/
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@v1.12.3
- name: Store the distribution packages
uses: actions/upload-artifact@v4.6.0
with:
name: python-package-distributions
path: dist/

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
if: github.repository == 'GenericMappingTools/pygmt'
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/project/pygmt
permissions:
id-token: write # IMPORTANT: mandatory for trusted OIDC publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4.1.8
with:
name: python-package-distributions
path: dist/

- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@v1.12.4
with:
repository-url: https://test.pypi.org/legacy/

- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@v1.12.3
publish-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
if: github.repository == 'GenericMappingTools/pygmt' && startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/pygmt/
permissions:
id-token: write # IMPORTANT: mandatory for trusted OIDC publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4.1.8
with:
name: python-package-distributions
path: dist/

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@v1.12.4
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@v6.0.0
- uses: release-drafter/release-drafter@v6.1.0
with:
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
config-name: release-drafter.yml
Expand Down
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ authors:
family-names: Wessel
affiliation: University of Hawaiʻi at Mānoa, USA
orcid: https://orcid.org/0000-0001-5708-7336
date-released: 2024-12-31
doi: 10.5281/zenodo.14535921
date-released: 2025-02-01
doi: 10.5281/zenodo.14742338
license: BSD-3-Clause
repository-code: https://github.com/GenericMappingTools/pygmt
type: software
version: 0.14.0
version: 0.14.1
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Feel free to cite our work in your research using the following BibTeX:

```
@software{
pygmt_2024_14535921,
pygmt_2025_14742338,
author = {Tian, Dongdong and
Uieda, Leonardo and
Leong, Wei Ji and
Expand All @@ -157,12 +157,12 @@ Feel free to cite our work in your research using the following BibTeX:
Quinn, Jamie and
Wessel, Paul},
title = {{PyGMT: A Python interface for the Generic Mapping Tools}},
month = dec,
year = 2024,
month = feb,
year = 2025,
publisher = {Zenodo},
version = {0.14.0},
doi = {10.5281/zenodo.14535921},
url = {https://doi.org/10.5281/zenodo.14535921}
version = {0.14.1},
doi = {10.5281/zenodo.14742338},
url = {https://doi.org/10.5281/zenodo.14742338}
}
```

Expand Down
18 changes: 8 additions & 10 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Makefile for Sphinx documentation

# You can set these variables from the command line.
SPHINXOPTS = -j auto
SPHINXBUILD = sphinx-build
SPHINXOPTS ?= -j auto
SPHINXBUILD ?= sphinx-build
SPHINXAUTOGEN = sphinx-autogen
SOURCEDIR = .
BUILDDIR = _build

# Internal variables.
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) .

.PHONY: help all api html server clean

help:
Expand All @@ -28,20 +26,20 @@ api:
@echo
$(SPHINXAUTOGEN) -i -t _templates -o api/generated api/*.rst

html: api
html latex: api
@echo
@echo "Building HTML files."
@echo "Building "$@" files."
@echo
# Set PYGMT_USE_EXTERNAL_DISPLAY to "false" to disable external display
PYGMT_USE_EXTERNAL_DISPLAY="false" $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
PYGMT_USE_EXTERNAL_DISPLAY="false" $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
@echo "Build finished. The files are in $(BUILDDIR)/$@."

html-noplot: api
@echo
@echo "Building HTML files without example plots."
@echo
$(SPHINXBUILD) -D plot_gallery=0 -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) -D plot_gallery=0
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

Expand Down
1 change: 1 addition & 0 deletions doc/_static/version_switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
var all_versions = {
'latest': 'latest',
'dev': 'dev',
'v0.14.1': 'v0.14.1',
'v0.14.0': 'v0.14.0',
'v0.13.0': 'v0.13.0',
'v0.12.0': 'v0.12.0',
Expand Down
Loading

0 comments on commit 97e70a7

Please sign in to comment.