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 Dec 24, 2024
2 parents d35af8b + 5a3a290 commit 3d3010d
Show file tree
Hide file tree
Showing 76 changed files with 551 additions and 283 deletions.
8 changes: 4 additions & 4 deletions .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].2
uses: mamba-org/[email protected].3
with:
environment-name: pygmt
condarc: |
Expand All @@ -58,14 +58,14 @@ jobs:
cache-environment-key: micromamba-environment-${{ steps.date.outputs.date }}
create-args: >-
gmt=6.5.0
python=3.12
python=3.13
numpy
pandas
xarray
netCDF4
packaging
geopandas
pyarrow
pyarrow-core
pytest
pytest-codspeed
pytest-mpl
Expand All @@ -87,7 +87,7 @@ jobs:

# Run the benchmark tests
- name: Run benchmarks
uses: CodSpeedHQ/action@v3.1.0
uses: CodSpeedHQ/action@v3.2.0
with:
# 'bash -el -c' is needed to use the custom shell.
# See https://github.com/CodSpeedHQ/action/issues/65.
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,15 +43,15 @@ jobs:

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/[email protected].2
uses: mamba-org/[email protected].3
with:
environment-name: pygmt
condarc: |
channels:
- conda-forge
- nodefaults
create-args: >-
python=3.12
python=3.13
gmt=6.5.0
numpy
pandas
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# Is it a draft Pull Request (true or false)?
isDraft:
- ${{ github.event.pull_request.draft }}
# Only run one job (Ubuntu + Python 3.12) for draft PRs
# Only run jobs on Ubuntu for draft PRs
exclude:
- os: macos-latest
isDraft: true
Expand All @@ -80,7 +80,7 @@ jobs:

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/[email protected].2
uses: mamba-org/[email protected].3
with:
environment-name: pygmt
condarc: |
Expand All @@ -92,7 +92,7 @@ jobs:
# environment cache is persistent for one week.
cache-environment-key: micromamba-environment-${{ steps.date.outputs.date }}
create-args: >-
python=3.12
python=3.13
gmt=6.5.0
ghostscript=10.04.0
numpy
Expand All @@ -101,16 +101,16 @@ jobs:
netCDF4
packaging
contextily
geopandas<1.0
geopandas
ipython
pyarrow
pyarrow-core
rioxarray
make
pip
python-build
myst-nb
panel
sphinx
sphinx>=6.2
sphinx-autodoc-typehints
sphinx-copybutton
sphinx-design
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_doctests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ jobs:

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/[email protected].2
uses: mamba-org/[email protected].3
with:
environment-name: pygmt
condarc: |
channels:
- conda-forge
- nodefaults
create-args: >-
python=3.12
python=3.13
gmt=6.5.0
numpy
pandas
Expand All @@ -60,7 +60,7 @@ jobs:
contextily
geopandas
ipython
pyarrow
pyarrow-core
rioxarray
make
pip
Expand Down
41 changes: 26 additions & 15 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.12']
python-version: ['3.11', '3.13']
os: [ubuntu-latest, macos-latest, windows-latest]
# Is it a draft Pull Request (true or false)?
isDraft:
Expand All @@ -68,21 +68,21 @@ jobs:
- os: windows-latest
isDraft: true
include:
# Python 3.10 + core packages (minimum supported versions) + optional packages (minimum supported versions if any)
- python-version: '3.10'
numpy-version: '1.24'
# Python 3.11 + core packages (minimum supported versions) + optional packages (minimum supported versions if any)
- python-version: '3.11'
numpy-version: '1.25'
pandas-version: '=2.0'
xarray-version: '=2023.04'
optional-packages: ' contextily geopandas<1 ipython pyarrow rioxarray sphinx-gallery'
# Python 3.12 + core packages (latest versions) + optional packages
- python-version: '3.12'
numpy-version: '2.1'
optional-packages: ' contextily geopandas<1 ipython pyarrow-core rioxarray sphinx-gallery'
# Python 3.13 + core packages (latest versions) + optional packages
- python-version: '3.13'
numpy-version: '2.2'
pandas-version: ''
xarray-version: ''
optional-packages: ' contextily geopandas>=1.0 ipython pyarrow rioxarray sphinx-gallery'
# Python 3.11 + core packages (Linux only)
optional-packages: ' contextily geopandas>=1.0 ipython pyarrow-core rioxarray sphinx-gallery'
# Python 3.12 + core packages (Linux only)
- os: 'ubuntu-latest'
python-version: '3.11'
python-version: '3.12'
numpy-version: ''
pandas-version: ''
xarray-version: ''
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/[email protected].2
uses: mamba-org/[email protected].3
with:
environment-name: pygmt
condarc: |
Expand All @@ -133,7 +133,6 @@ jobs:
xarray${{ matrix.xarray-version }}
netCDF4
packaging
dvc
make
pip
python-build
Expand All @@ -154,9 +153,21 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}

- name: Install uv
uses: astral-sh/[email protected]

- 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: dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
run: |
source .venv/bin/activate
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 @@ -176,7 +187,7 @@ jobs:

# Upload coverage to Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.0.7
uses: codecov/codecov-action@v5.1.1
if: success() || failure()
with:
use_oidc: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15, windows-2022]
os: [ubuntu-24.04, macos-15, windows-2025]
gmt_git_ref: [master]
timeout-minutes: 30
defaults:
Expand All @@ -57,7 +57,7 @@ jobs:

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/[email protected].2
uses: mamba-org/[email protected].3
with:
environment-name: pygmt
condarc: |
Expand All @@ -69,7 +69,7 @@ jobs:
# environment cache is persistent for one week.
cache-environment-key: micromamba-environment-${{ steps.date.outputs.date }}
create-args: >-
python=3.12
python=3.13
cmake
make
ninja
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_tests_legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ jobs:

# Install Micromamba with conda-forge dependencies
- name: Setup Micromamba
uses: mamba-org/[email protected].2
uses: mamba-org/[email protected].3
with:
environment-name: pygmt
condarc: |
channels:
- conda-forge
- nodefaults
create-args: >-
python=3.10
python=3.11
gmt=${{ matrix.gmt_version }}
ghostscript<10
numpy<2
Expand All @@ -70,7 +70,7 @@ jobs:
contextily
geopandas
ipython
pyarrow
pyarrow-core
rioxarray
sphinx-gallery
make
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 @@ -27,7 +27,7 @@ jobs:
# Setup Python environment
- uses: actions/[email protected]
with:
python-version: '3.12'
python-version: '3.13'

# Install formatting tools
- name: Install formatting tools
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.12'
python-version: '3.13'

- name: Install dependencies
run: python -m pip install build
Expand All @@ -75,10 +75,10 @@ jobs:
ls -lh dist/
- name: Publish to Test PyPI
uses: pypa/[email protected].2
uses: pypa/[email protected].3
with:
repository-url: https://test.pypi.org/legacy/

- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/[email protected].2
uses: pypa/[email protected].3
2 changes: 1 addition & 1 deletion .github/workflows/style_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.12'
python-version: '3.13'

- name: Install packages
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/type_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.12'
python-version: '3.13'

- name: Install packages
run: |
Expand Down
8 changes: 4 additions & 4 deletions ci/requirements/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- nodefaults
dependencies:
# Required dependencies
- python=3.12
- python=3.13
- gmt=6.5.0
- ghostscript=10.04.0
- numpy
Expand All @@ -14,9 +14,9 @@ dependencies:
- packaging
# Optional dependencies
- contextily
- geopandas<1.0
- geopandas
- ipython
- pyarrow
- pyarrow-core
- rioxarray
# Development dependencies (general)
- make
Expand All @@ -25,7 +25,7 @@ dependencies:
# Dev dependencies (building documentation)
- myst-nb
- panel
- sphinx
- sphinx>=6.2
- sphinx-autodoc-typehints
- sphinx-copybutton
- sphinx-design
Expand Down
7 changes: 7 additions & 0 deletions doc/_templates/autosummary/enums.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ fullname | escape | underline }}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:member-order: bysource
16 changes: 14 additions & 2 deletions doc/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,20 @@ Getting metadata from tabular or grid data:
info
grdinfo

Enums
-----

.. currentmodule:: pygmt.enums

.. autosummary::
:toctree: generated
:nosignatures:
:template: autosummary/enums.rst

GridRegistration
GridType

.. currentmodule:: pygmt

Miscellaneous
-------------
Expand All @@ -205,8 +219,6 @@ Miscellaneous
which
show_versions

.. currentmodule:: pygmt

Datasets
--------

Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
]

source_suffix = ".rst"
needs_sphinx = "1.8"
needs_sphinx = "6.2"
# Encoding of source files
source_encoding = "utf-8-sig"
root_doc = "index"
Expand Down
Loading

0 comments on commit 3d3010d

Please sign in to comment.