Skip to content

Commit 0b8733d

Browse files
committed
Merge branch 'main' into datatypes/gmtdataset
2 parents 0772711 + fddf0a3 commit 0b8733d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+401
-278
lines changed

.github/workflows/cache_data.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
steps:
2929
# Checkout current git repository
3030
- name: Checkout
31-
uses: actions/[email protected].0
31+
uses: actions/[email protected].1
3232
with:
3333
# fetch all history so that setuptools-scm works
3434
fetch-depth: 0
3535

3636
# Install Micromamba with conda-forge dependencies
3737
- name: Setup Micromamba
38-
uses: mamba-org/setup-micromamba@v1.4.4
38+
uses: mamba-org/setup-micromamba@v1.5.0
3939
with:
4040
environment-name: pygmt
4141
condarc: |

.github/workflows/check-links.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121

2222
steps:
2323
- name: Checkout the repository
24-
uses: actions/[email protected].0
24+
uses: actions/[email protected].1
2525
with:
2626
path: repository
2727

2828
- name: Checkout the documentation
29-
uses: actions/[email protected].0
29+
uses: actions/[email protected].1
3030
with:
3131
ref: gh-pages
3232
path: documentation

.github/workflows/ci_docs.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ jobs:
5858
steps:
5959
# Checkout current git repository
6060
- name: Checkout
61-
uses: actions/[email protected].0
61+
uses: actions/[email protected].1
6262
with:
6363
# fetch all history so that setuptools-scm works
6464
fetch-depth: 0
6565

6666
# Install Micromamba with conda-forge dependencies
6767
- name: Setup Micromamba
68-
uses: mamba-org/setup-micromamba@v1.4.4
68+
uses: mamba-org/setup-micromamba@v1.5.0
6969
with:
7070
environment-name: pygmt
7171
condarc: |
@@ -126,7 +126,7 @@ jobs:
126126
run: make -C doc clean all
127127

128128
- name: Checkout the gh-pages branch
129-
uses: actions/[email protected].0
129+
uses: actions/[email protected].1
130130
with:
131131
ref: gh-pages
132132
# Checkout to this folder instead of the current one

.github/workflows/ci_doctests.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ jobs:
3333
steps:
3434
# Checkout current git repository
3535
- name: Checkout
36-
uses: actions/[email protected].0
36+
uses: actions/[email protected].1
3737
with:
3838
# fetch all history so that setuptools-scm works
3939
fetch-depth: 0
4040

4141
# Install Micromamba with conda-forge dependencies
4242
- name: Setup Micromamba
43-
uses: mamba-org/setup-micromamba@v1.4.4
43+
uses: mamba-org/setup-micromamba@v1.5.0
4444
with:
4545
environment-name: pygmt
4646
condarc: |

.github/workflows/ci_tests.yaml

+6-5
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ jobs:
6363
isDraft: true
6464
- os: windows-latest
6565
isDraft: true
66-
# Pair Python 3.9 with NumPy 1.22 and Python 3.11 with NumPy 1.25
67-
# Only install optional packages on Python 3.11/NumPy 1.25
66+
# Pair Python 3.9 with NumPy 1.22 and Python 3.11 with NumPy 1.26
67+
# Only install optional packages on Python 3.11/NumPy 1.26
6868
include:
6969
- python-version: '3.9'
7070
numpy-version: '1.22'
7171
optional-packages: ''
7272
- python-version: '3.11'
73-
numpy-version: '1.25'
73+
numpy-version: '1.26'
7474
optional-packages: ' contextily geopandas ipython rioxarray sphinx-gallery'
7575

7676
timeout-minutes: 30
@@ -87,14 +87,14 @@ jobs:
8787
steps:
8888
# Checkout current git repository
8989
- name: Checkout
90-
uses: actions/[email protected].0
90+
uses: actions/[email protected].1
9191
with:
9292
# fetch all history so that setuptools-scm works
9393
fetch-depth: 0
9494

9595
# Install Micromamba with conda-forge dependencies
9696
- name: Setup Micromamba
97-
uses: mamba-org/setup-micromamba@v1.4.4
97+
uses: mamba-org/setup-micromamba@v1.5.0
9898
with:
9999
environment-name: pygmt
100100
condarc: |
@@ -106,6 +106,7 @@ jobs:
106106
create-args: >-
107107
python=${{ matrix.python-version }}${{ matrix.optional-packages }}
108108
gmt=6.4.0
109+
ghostscript=9.54.0
109110
numpy=${{ matrix.numpy-version }}
110111
pandas
111112
xarray

.github/workflows/ci_tests_dev.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
steps:
5454
# Checkout current git repository
5555
- name: Checkout
56-
uses: actions/[email protected].0
56+
uses: actions/[email protected].1
5757
if: github.event_name != 'repository_dispatch'
5858
with:
5959
# fetch all history so that setuptools-scm works
@@ -70,7 +70,7 @@ jobs:
7070

7171
# Checkout the pull request branch
7272
- name: Checkout
73-
uses: actions/[email protected].0
73+
uses: actions/[email protected].1
7474
if: github.event_name == 'repository_dispatch'
7575
with:
7676
token: ${{ steps.generate-token.outputs.token }}
@@ -90,7 +90,7 @@ jobs:
9090

9191
# Install Micromamba with conda-forge dependencies
9292
- name: Setup Micromamba
93-
uses: mamba-org/setup-micromamba@v1.4.4
93+
uses: mamba-org/setup-micromamba@v1.5.0
9494
with:
9595
environment-name: pygmt
9696
condarc: |
@@ -106,7 +106,7 @@ jobs:
106106
ninja
107107
curl
108108
fftw
109-
ghostscript
109+
ghostscript=9.54.0
110110
hdf5
111111
libblas
112112
libcblas

.github/workflows/ci_tests_legacy.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ jobs:
4545
steps:
4646
# Checkout current git repository
4747
- name: Checkout
48-
uses: actions/[email protected].0
48+
uses: actions/[email protected].1
4949
with:
5050
# fetch all history so that setuptools-scm works
5151
fetch-depth: 0
5252

5353
# Install Micromamba with conda-forge dependencies
5454
- name: Setup Micromamba
55-
uses: mamba-org/setup-micromamba@v1.4.4
55+
uses: mamba-org/setup-micromamba@v1.5.0
5656
with:
5757
environment-name: pygmt
5858
condarc: |

.github/workflows/dvc-diff.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Checkout
24-
uses: actions/[email protected].0
24+
uses: actions/[email protected].1
2525
with:
2626
# fetch all history so that dvc diff works
2727
fetch-depth: 0

.github/workflows/format-command.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
private_key: ${{ secrets.APP_PRIVATE_KEY }}
1919

2020
# Checkout the pull request branch
21-
- uses: actions/[email protected].0
21+
- uses: actions/[email protected].1
2222
with:
2323
token: ${{ steps.generate-token.outputs.token }}
2424
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
@@ -32,7 +32,7 @@ jobs:
3232
# Install formatting tools
3333
- name: Install formatting tools
3434
run: |
35-
python -m pip install black blackdoc docformatter flakeheaven isort
35+
python -m pip install black blackdoc docformatter ruff
3636
python -m pip list
3737
sudo apt-get install dos2unix
3838

.github/workflows/publish-to-pypi.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
steps:
4040
- name: Checkout
41-
uses: actions/[email protected].0
41+
uses: actions/[email protected].1
4242
with:
4343
# fetch all history so that setuptools-scm works
4444
fetch-depth: 0

.github/workflows/release-baseline-images.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
steps:
2121
- name: Checkout
22-
uses: actions/[email protected].0
22+
uses: actions/[email protected].1
2323

2424
- name: Setup data version control (DVC)
2525
uses: iterative/[email protected]

.github/workflows/release-drafter.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
# Drafts your next Release notes as Pull Requests are merged into "main"
20-
- uses: release-drafter/release-drafter@v5.24.0
20+
- uses: release-drafter/release-drafter@v5.25.0
2121
with:
2222
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
2323
config-name: release-drafter.yml

.github/workflows/style_checks.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
steps:
2525
# Checkout current git repository
2626
- name: Checkout
27-
uses: actions/[email protected].0
27+
uses: actions/[email protected].1
2828

2929
# Setup Python
3030
- name: Set up Python
@@ -34,11 +34,11 @@ jobs:
3434

3535
- name: Install packages
3636
run: |
37-
python -m pip install black blackdoc docformatter flakeheaven pylint isort
37+
python -m pip install black blackdoc docformatter pylint ruff
3838
python -m pip list
3939
sudo apt-get install dos2unix
4040
41-
- name: Formatting check (black, blackdoc, docformatter, flakeheaven and isort)
41+
- name: Formatting check (black, blackdoc, docformatter, ruff)
4242
run: make check
4343

4444
- name: Linting (pylint)

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ MANIFEST
1717
.coverage
1818
coverage.xml
1919
htmlcov/
20-
.flakeheaven_cache/
2120
.pytest_cache/
21+
.ruff_cache/
2222
results/
2323
result_images/
2424
tmp-test-dir-with-unique-name/

Makefile

+4-5
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ help:
1515
@echo " fulltest run the test suite (including all doctests)"
1616
@echo " doctest run the doctests only"
1717
@echo " test_no_images run the test suite (including all doctests) but skip image comparisons"
18-
@echo " format run black, blackdoc, docformatter and isort to automatically format the code"
19-
@echo " check run code style and quality checks (black, blackdoc, docformatter, flakeheaven and isort)"
18+
@echo " format run black, blackdoc, docformatter and ruff to automatically format the code"
19+
@echo " check run code style and quality checks (black, blackdoc, docformatter, ruff)"
2020
@echo " codespell run codespell to check common misspellings"
2121
@echo " lint run pylint for a deeper (and slower) quality check"
2222
@echo " clean clean up build and generated files"
@@ -60,17 +60,16 @@ test_no_images: PYTEST_ARGS=-o addopts="--verbose --durations=0 --durations-min=
6060
test_no_images: _runtest
6161

6262
format:
63-
isort .
6463
docformatter --in-place $(FORMAT_FILES)
6564
black $(FORMAT_FILES)
6665
blackdoc $(FORMAT_FILES)
66+
ruff check --fix $(FORMAT_FILES)
6767

6868
check:
69-
isort . --check
7069
docformatter --check $(FORMAT_FILES)
7170
black --check $(FORMAT_FILES)
7271
blackdoc --check $(FORMAT_FILES)
73-
FLAKEHEAVEN_CACHE_TIMEOUT=0 flakeheaven lint $(FORMAT_FILES)
72+
ruff check $(FORMAT_FILES)
7473

7574
codespell:
7675
@codespell

doc/conf.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Sphinx documentation configuration file.
43
"""
@@ -7,7 +6,7 @@
76
import datetime
87
from importlib.metadata import metadata
98

10-
# isort: off
9+
# ruff: isort: off
1110
from sphinx_gallery.sorting import ( # pylint: disable=no-name-in-module
1211
ExplicitOrder,
1312
ExampleTitleSortKey,
@@ -16,7 +15,7 @@
1615
from pygmt import __commit__, __version__
1716
from pygmt.sphinx_gallery import PyGMTScraper
1817

19-
# isort: on
18+
# ruff: isort: on
2019

2120
extensions = [
2221
"myst_parser",

doc/contributing.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ We use some tools to format the code so we don't have to think about it:
476476
- [Black](https://github.com/psf/black)
477477
- [blackdoc](https://github.com/keewis/blackdoc)
478478
- [docformatter](https://github.com/myint/docformatter)
479-
- [isort](https://pycqa.github.io/isort/)
479+
- [ruff](https://docs.astral.sh/ruff)
480480

481481
Black and blackdoc loosely follows the [PEP8](http://pep8.org) guide but with a few
482482
differences. Regardless, you won't have to worry about formatting the code yourself.
@@ -499,14 +499,14 @@ words bridged only by consonants, such as `distcalc`, and `crossprofile`. This
499499
convention is not applied by the code checking tools, but the PyGMT maintainers
500500
will comment on any pull requests as needed.
501501

502-
We also use [flakeheaven](https://flakeheaven.readthedocs.io) and
502+
We also use [ruff](https://docs.astral.sh/ruff) and
503503
[pylint](https://pylint.pycqa.org/) to check the quality of the code and quickly catch
504504
common errors.
505505
The [`Makefile`](https://github.com/GenericMappingTools/pygmt/blob/main/Makefile)
506506
contains rules for running both checks:
507507

508508
```bash
509-
make check # Runs black, blackdoc, docformatter, flakeheaven and isort (in check mode)
509+
make check # Runs black, blackdoc, docformatter, ruff (in check mode)
510510
make lint # Runs pylint, which is a bit slower
511511
```
512512

doc/external_resources.md

+11
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,17 @@ Andre Belem
9191
+++
9292
Andre Belem
9393
::::
94+
95+
::::{grid-item-card} PyGMT-HOWTO
96+
:link: https://tktmyd.github.io/pygmt-howto-jp/pygmt
97+
:text-align: center
98+
:margin: 0 3 0 0
99+
100+
![](https://github.com/tktmyd/pygmt-howto-jp/raw/main/docs/_images/inf_on_map_12_0.png)
101+
+++
102+
Takuto Maeda
103+
::::
104+
94105
:::::
95106

96107
## Examples from Publications and Posters

doc/maintenance.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ communication tools we use.
2828
- Update the role on the {doc}`Team Gallery page <team>`
2929
- Added as moderator on the [GMT forum](https://forum.generic-mapping-tools.org) (to see mod-only discussions) [optional]
3030
- Added as a maintainer on [Readthedocs](https://readthedocs.org/projects/pygmt-dev) [optional]
31+
- Added as a curator to the [GMT community](https://zenodo.org/communities/generic-mapping-tools/) on Zenodo (for making releases) [optional]
3132

3233
### As an Administrator
3334

environment.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ dependencies:
2626
- blackdoc
2727
- codespell
2828
- docformatter>=1.7.2
29-
- flakeheaven>=3
30-
- isort>=5
3129
- pylint
30+
- ruff
3231
# Dev dependencies (unit testing)
3332
- matplotlib
3433
- pytest-cov

examples/projections/cyl/cyl_universal_transverse_mercator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
.. _GMT_utm_zones:
1616
17-
.. figure:: https://docs.generic-mapping-tools.org/latest/_images/GMT_utm_zones.png # noqa: W505
17+
.. figure:: https://docs.generic-mapping-tools.org/latest/_images/GMT_utm_zones.png
1818
:width: 700 px
1919
:align: center
2020

pygmt/clib/session.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -909,10 +909,8 @@ def put_vector(self, dataset, column, vector):
909909
)
910910
if status != 0:
911911
raise GMTCLibError(
912-
(
913-
f"Failed to put vector of type {vector.dtype} "
914-
f"in column {column} of dataset."
915-
)
912+
f"Failed to put vector of type {vector.dtype} "
913+
f"in column {column} of dataset."
916914
)
917915

918916
def put_strings(self, dataset, family, strings):

0 commit comments

Comments
 (0)