Skip to content

Commit

Permalink
Merge branch 'main' into add-tut-symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
yvonnefroehlich authored Jan 16, 2025
2 parents 3d3010d + 540bba1 commit de138bb
Show file tree
Hide file tree
Showing 128 changed files with 2,520 additions and 737 deletions.
22 changes: 9 additions & 13 deletions .github/ISSUE_TEMPLATE/4-release_checklist.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: PyGMT release checklist
about: Checklist for a new PyGMT release.
about: Checklist for a new PyGMT release. [For project maintainers only!]
title: Release PyGMT vX.Y.Z
labels: maintenance
assignees: ''
Expand All @@ -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:
- [ ] Deprecations and related tests are removed for this version by running `grep --include="*.py" -r vX.Y.Z` from the base of the repository
- [ ] 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/ISSUE_TEMPLATE/5-bump_gmt_checklist.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bump GMT version checklist
about: Checklist for bumping the minimum required GMT version.
about: Checklist for bumping the minimum required GMT version. [For project maintainers only!]
title: Bump to GMT X.Y.Z
labels: maintenance
assignees: ''
Expand Down
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Fixes #
- [ ] 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.
- [ ] Use underscores (not hyphens) in names of Python files and directories.

**Slash Commands**

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/[email protected].3
uses: mamba-org/[email protected].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/[email protected].3
uses: mamba-org/[email protected].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.4.3
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
12 changes: 9 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/[email protected].3
uses: mamba-org/[email protected].4
with:
environment-name: pygmt
condarc: |
Expand Down Expand Up @@ -108,6 +108,7 @@ jobs:
make
pip
python-build
geodatasets
myst-nb
panel
sphinx>=6.2
Expand Down Expand Up @@ -162,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/[email protected].3
uses: mamba-org/[email protected].4
with:
environment-name: pygmt
condarc: |
Expand Down
16 changes: 7 additions & 9 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/[email protected].3
uses: mamba-org/[email protected].4
with:
environment-name: pygmt
condarc: |
Expand Down Expand Up @@ -154,20 +154,18 @@ jobs:
GH_TOKEN: ${{ github.token }}

- name: Install uv
uses: astral-sh/[email protected]
uses: astral-sh/[email protected]
with:
python-version: ${{ matrix.python-version }}

- name: Install dvc
run: |
uv venv
source .venv/bin/activate
uv pip install dvc
uv pip list
# Pull baseline image data from dvc remote (DAGsHub)
- name: Pull baseline image data from dvc remote
run: |
source .venv/bin/activate
uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
run: uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/

# Install the package that we want to test
- name: Install the package
Expand All @@ -179,15 +177,15 @@ jobs:

# Upload diff images on test failure
- name: Upload diff images if any test fails
uses: actions/upload-artifact@v4.4.3
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/[email protected].1
uses: codecov/[email protected].2
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/[email protected].3
uses: mamba-org/[email protected].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.4.3
uses: actions/upload-artifact@v4.6.0
if: ${{ failure() }}
with:
name: artifact-GMT-${{ matrix.gmt_git_ref }}-${{ runner.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests_legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/[email protected].3
uses: mamba-org/[email protected].4
with:
environment-name: pygmt
condarc: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Generate token from GenericMappingTools bot
- uses: actions/[email protected].0
- uses: actions/[email protected].1
id: generate-token
with:
app-id: ${{ secrets.APP_ID }}
Expand Down
58 changes: 49 additions & 9 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/[email protected]
with:
# fetch all history so that setuptools-scm works
fetch-depth: 0
persist-credentials: false

- name: Set up Python
uses: actions/[email protected]
Expand All @@ -74,11 +71,54 @@ jobs:
echo "Generated files:"
ls -lh dist/
- name: Publish to Test PyPI
- name: Store the distribution packages
uses: actions/[email protected]
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/[email protected]
with:
name: python-package-distributions
path: dist/

- name: Publish distribution 📦 to TestPyPI
uses: pypa/[email protected]
with:
repository-url: https://test.pypi.org/legacy/

- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
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/[email protected]
with:
name: python-package-distributions
path: dist/

- name: Publish distribution 📦 to PyPI
uses: pypa/[email protected]
12 changes: 12 additions & 0 deletions .github/workflows/style_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,15 @@ jobs:
rm output.txt
exit $nfiles
fi
- name: Ensure hyphens are not used in names of directories and Python files
run: |
git ls-files '*.py' | grep '-' > output.txt || true
git ls-tree -rd --name-only HEAD | grep '-' >> output.txt || true
nfiles=$(wc --lines output.txt | awk '{print $1}')
if [[ $nfiles > 0 ]]; then
echo "Following directories/files use hyphens in file names:"
cat output.txt
rm output.txt
exit $nfiles
fi
14 changes: 7 additions & 7 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ authors:
family-names: Yao
affiliation: Nanyang Technological University, Singapore
orcid: https://orcid.org/0000-0001-7036-4238
- given-names: Jing-Hui
family-names: Tong
affiliation: National Taiwan Normal University, Taiwan
orcid: https://orcid.org/0009-0002-7195-3071
- given-names: Yohai
family-names: Magen
affiliation: Tel Aviv University, Israel
orcid: https://orcid.org/0000-0002-4892-4013
- given-names: Tong
family-names: Jing-Hui
affiliation: National Taiwan Normal University, Taiwan
orcid: https://orcid.org/0009-0002-7195-3071
- given-names: Kathryn
family-names: Materna
affiliation: US Geological Survey, USA
Expand Down 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-09-05
doi: 10.5281/zenodo.13679420
date-released: 2024-12-31
doi: 10.5281/zenodo.14535921
license: BSD-3-Clause
repository-code: https://github.com/GenericMappingTools/pygmt
type: software
version: 0.13.0
version: 0.14.0
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017-2024 The PyGMT Developers
Copyright (c) 2017-2025 The PyGMT Developers
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
Loading

0 comments on commit de138bb

Please sign in to comment.