Skip to content

Commit 1c08e31

Browse files
authored
Merge branch 'main' into alias-system
2 parents ecb5201 + 97a6f30 commit 1c08e31

28 files changed

+64
-51
lines changed

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ jobs:
6969
pytest
7070
pytest-codspeed
7171
pytest-mpl
72-
pytest-rerunfailures
73-
pytest-xdist
7472
7573
# Download cached remote files (artifacts) from GitHub
7674
- name: Download remote data from GitHub
@@ -93,4 +91,4 @@ jobs:
9391
with:
9492
# 'bash -el -c' is needed to use the custom shell.
9593
# See https://github.com/CodSpeedHQ/action/issues/65.
96-
run: bash -el -c "python -c \"import pygmt; pygmt.show_versions()\"; PYGMT_USE_EXTERNAL_DISPLAY=false python -m pytest -r P -n auto --reruns 2 --pyargs pygmt --codspeed"
94+
run: bash -el -c "python -c \"import pygmt; pygmt.show_versions()\"; PYGMT_USE_EXTERNAL_DISPLAY=false python -m pytest -r P --pyargs pygmt --codspeed"

.github/workflows/format-command.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
# Generate token from GenericMappingTools bot
14-
- uses: actions/[email protected].1
14+
- uses: actions/[email protected].3
1515
id: generate-token
1616
with:
1717
app-id: ${{ secrets.APP_ID }}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ jobs:
7575
ls -lh dist/
7676
7777
- name: Publish to Test PyPI
78-
uses: pypa/gh-action-pypi-publish@v1.8.14
78+
uses: pypa/gh-action-pypi-publish@v1.9.0
7979
with:
8080
repository-url: https://test.pypi.org/legacy/
8181

8282
- name: Publish to PyPI
8383
if: startsWith(github.ref, 'refs/tags')
84-
uses: pypa/gh-action-pypi-publish@v1.8.14
84+
uses: pypa/gh-action-pypi-publish@v1.9.0

AUTHORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ with [Paul Wessel](https://www.soest.hawaii.edu/wessel) at the University of
66
Hawaiʻi at Mānoa.
77

88
The following people have contributed code and/or documentation to the project
9-
(alphabetical by name) and are considered to be "PyGMT Developers":
9+
(alphabetically by name) and are considered to be "PyGMT Developers":
1010

1111
* [Abhishek Anant](https://twitter.com/itsabhianant) | [0000-0002-5751-2010](https://orcid.org/0000-0002-5751-2010) | Unaffiliated
1212
* [Andre L. Belem](https://github.com/andrebelem) | [0000-0002-8865-6180](https://orcid.org/0000-0002-8865-6180) | Fluminense Federal University, Brazil

examples/gallery/basemaps/double_y_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Double Y axes graph
2+
Double Y-axes graph
33
===================
44
55
The ``frame`` parameter of the plotting methods of the :class:`pygmt.Figure`

examples/gallery/basemaps/ternary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@
4242

4343
# Add a colorbar indicating the values given in the fourth column of
4444
# the input dataset
45-
fig.colorbar(position="JBC+o0c/1.5c", frame=["x+lPermittivity"])
45+
fig.colorbar(position="JBC+o0c/1.5c", frame="x+lPermittivity")
4646
fig.show()

examples/gallery/embellishments/inset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
fig.coast(region="MG+r2", land="brown", water="lightblue", shorelines="thin", frame="a")
1919
# Create an inset, setting the position to top left, the width to 3.5 cm, and
2020
# the x- and y-offsets to 0.2 cm. The margin is set to 0, and the border is
21-
# "gold" with a pen size of 1.5p.
21+
# "gold" with a pen size of 1.5 points.
2222
with fig.inset(position="jTL+w3.5c+o0.2c", margin=0, box="+p1.5p,gold"):
2323
# Create a figure in the inset using coast. This example uses the azimuthal
2424
# orthogonal projection centered at 47E, 20S. The land color is set to

pygmt/accessors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def registration(self):
141141

142142
@registration.setter
143143
def registration(self, value):
144-
if value not in (0, 1):
144+
if value not in {0, 1}:
145145
raise GMTInvalidInput(
146146
f"Invalid grid registration value: {value}, should be either "
147147
"0 for Gridline registration or 1 for Pixel registration."
@@ -157,7 +157,7 @@ def gtype(self):
157157

158158
@gtype.setter
159159
def gtype(self, value):
160-
if value not in (0, 1):
160+
if value not in {0, 1}:
161161
raise GMTInvalidInput(
162162
f"Invalid coordinate system type: {value}, should be "
163163
"either 0 for Cartesian or 1 for Geographic."

pygmt/clib/session.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ def put_vector(self, dataset, column, vector):
944944
)
945945

946946
gmt_type = self._check_dtype_and_dim(vector, ndim=1)
947-
if gmt_type in (self["GMT_TEXT"], self["GMT_DATETIME"]):
947+
if gmt_type in {self["GMT_TEXT"], self["GMT_DATETIME"]}:
948948
if gmt_type == self["GMT_DATETIME"]:
949949
vector = np.datetime_as_string(array_to_datetime(vector))
950950
vector_pointer = strings_to_ctypes_array(vector)
@@ -1622,7 +1622,7 @@ def virtualfile_in( # noqa: PLR0912
16221622
}[kind]
16231623

16241624
# Ensure the data is an iterable (Python list or tuple)
1625-
if kind in ("geojson", "grid", "image", "file", "arg"):
1625+
if kind in {"geojson", "grid", "image", "file", "arg"}:
16261626
if kind == "image" and data.dtype != "uint8":
16271627
msg = (
16281628
f"Input image has dtype: {data.dtype} which is unsupported, "
@@ -1849,7 +1849,7 @@ def read_virtualfile(
18491849
# _GMT_DATASET).
18501850
if kind is None: # Return the ctypes void pointer
18511851
return pointer
1852-
if kind in ["image", "cube"]:
1852+
if kind in {"image", "cube"}:
18531853
raise NotImplementedError(f"kind={kind} is not supported yet.")
18541854
dtype = {"dataset": _GMT_DATASET, "grid": _GMT_GRID}[kind]
18551855
return ctp.cast(pointer, ctp.POINTER(dtype))

pygmt/datasets/load_remote_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def _load_remote_dataset(
387387
if registration is None:
388388
# Use gridline registration unless only pixel registration is available
389389
registration = "gridline" if "gridline" in resinfo.registrations else "pixel"
390-
elif registration in ("pixel", "gridline"):
390+
elif registration in {"pixel", "gridline"}:
391391
if registration not in resinfo.registrations:
392392
raise GMTInvalidInput(
393393
f"{registration} registration is not available for the "

0 commit comments

Comments
 (0)