-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-tut-symbols
- Loading branch information
Showing
128 changed files
with
2,520 additions
and
737 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | | ||
|
@@ -108,6 +108,7 @@ jobs: | |
make | ||
pip | ||
python-build | ||
geodatasets | ||
myst-nb | ||
panel | ||
sphinx>=6.2 | ||
|
@@ -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}:" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | | ||
|
@@ -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 }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|
@@ -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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.