Skip to content

Commit dab0bdb

Browse files
committed
Merge branch 'main' into refactor/logo
2 parents cd1165f + 2200457 commit dab0bdb

File tree

20 files changed

+333
-23
lines changed

20 files changed

+333
-23
lines changed

.github/workflows/benchmarks.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ jobs:
8484

8585
# Run the benchmark tests
8686
- name: Run benchmarks
87-
uses: CodSpeedHQ/action@76578c2a7ddd928664caa737f0e962e3085d4e7c # v3.8.1
87+
uses: CodSpeedHQ/action@6eeb021fd0f305388292348b775d96d95253adf4 # v4.0.0
8888
with:
89+
mode: "instrumentation"
8990
# 'bash -el -c' is needed to use the custom shell.
9091
# See https://github.com/CodSpeedHQ/action/issues/65.
9192
run: bash -el -c "python -c \"import pygmt; pygmt.show_versions()\"; PYGMT_USE_EXTERNAL_DISPLAY=false python -m pytest -r P --pyargs pygmt --codspeed --override-ini addopts='--verbose'"

.github/workflows/ci_tests.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,11 @@ jobs:
163163
164164
# Pull baseline image data from dvc remote (DAGsHub)
165165
- name: Pull baseline image data from dvc remote
166-
run: uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
166+
run: |
167+
uv run dvc remote modify upstream url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/pygmt.dvc --local
168+
uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
169+
env:
170+
DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }}
167171

168172
# Install the package that we want to test
169173
- name: Install the package
@@ -183,7 +187,7 @@ jobs:
183187

184188
# Upload coverage to Codecov
185189
- name: Upload coverage to Codecov
186-
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
190+
uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
187191
if: success() || failure()
188192
with:
189193
use_oidc: true

.github/workflows/ci_tests_dev.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@ jobs:
161161

162162
# Pull baseline image data from dvc remote (DAGsHub)
163163
- name: Pull baseline image data from dvc remote
164-
run: dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
164+
run: |
165+
dvc remote modify upstream url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/pygmt.dvc --local
166+
dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
167+
env:
168+
DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }}
165169

166170
# Download cached remote files (artifacts) from GitHub
167171
- name: Download remote data from GitHub

.github/workflows/dvc-diff.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,14 @@ jobs:
5757
env:
5858
repo_token: ${{ github.token }}
5959
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
60+
DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }}
6061
run: |
6162
echo -e "## Summary of changed images\n" > report.md
6263
echo -e "This is an auto-generated report of images that have changed on the DVC remote\n" >> report.md
6364
65+
# Configure DVC to use the DAGsHub remote via a token
66+
dvc remote modify upstream url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/pygmt.dvc --local
67+
6468
# Pull image data from cloud storage
6569
dvc pull --remote upstream
6670
dvc diff --md main HEAD >> report.md

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ jobs:
3131
uses: iterative/setup-dvc@175771be1dc3d119268e00a896b52a4b77decb5e # v1.2.0
3232

3333
- name: Pull baseline image data from dvc remote
34-
run: dvc pull && ls -lhR pygmt/tests/baseline/
34+
run: |
35+
dvc remote modify upstream url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/pygmt.dvc --local
36+
dvc pull && ls -lhR pygmt/tests/baseline/
37+
env:
38+
DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }}
3539

3640
- name: Create the baseline image asset in zip format
3741
run: |

doc/api/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,16 @@ Xarray Integration
203203
GMTBackendEntrypoint
204204
GMTDataArrayAccessor
205205

206+
Class-style Parameters
207+
----------------------
208+
209+
.. currentmodule:: pygmt.params
210+
211+
.. autosummary::
212+
:toctree: generated
213+
214+
Box
215+
206216
Enums
207217
-----
208218

examples/gallery/embellishments/inset.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# %%
1212
import pygmt
13+
from pygmt.params import Box
1314

1415
fig = pygmt.Figure()
1516
# Create the primary figure, setting the region to Madagascar, the land color
@@ -19,7 +20,7 @@
1920
# Create an inset, placing it in the Top Left (TL) corner with a width of 3.5 cm and
2021
# x- and y-offsets of 0.2 cm. The margin is set to 0, and the border is "gold" with a
2122
# pen size of 1.5 points.
22-
with fig.inset(position="jTL+w3.5c+o0.2c", margin=0, box="+p1.5p,gold"):
23+
with fig.inset(position="jTL+w3.5c+o0.2c", margin=0, box=Box(pen="1.5p,gold")):
2324
# Create a figure in the inset using coast. This example uses the azimuthal
2425
# orthogonal projection centered at 47E, 20S. The land color is set to
2526
# "gray" and Madagascar is highlighted in "red3".

examples/gallery/embellishments/inset_rectangle_region.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# %%
1212
import pygmt
13+
from pygmt.params import Box
1314

1415
# Set the region of the main figure
1516
region = [137.5, 141, 34, 37]
@@ -34,7 +35,7 @@
3435
# a pen of "1p".
3536
with fig.inset(
3637
position="jBR+o0.1c",
37-
box="+gwhite+p1p",
38+
box=Box(fill="white", pen="1p"),
3839
region=[129, 146, 30, 46],
3940
projection="U54S/3c",
4041
):

examples/gallery/embellishments/scalebar.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242

4343
# %%
4444
import pygmt
45+
from pygmt.params import Box
4546

4647
# Create a new Figure instance
4748
fig = pygmt.Figure()
@@ -103,7 +104,7 @@
103104
# Fill the box in white with a transparency of 30 percent, add a solid
104105
# outline in darkgray (gray30) with a thickness of 0.5 points, and use
105106
# rounded edges with a radius of 3 points
106-
box="+gwhite@30+p0.5p,gray30,solid+r3p",
107+
box=Box(fill="white@30", pen="0.5p,gray30,solid", radius="3p"),
107108
)
108109

109110
fig.show()

examples/gallery/images/cross_section.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
# %%
1616
import pygmt
17+
from pygmt.params import Box
1718

1819
# Define region of study area
1920
# lon_min, lon_max, lat_min, lat_max in degrees East and North
@@ -44,9 +45,9 @@
4445
# corner with an offset ("+o") of 0.7 centimeters and 0.3 centimeters in x- or y-
4546
# directions, respectively; move the x-label above the horizontal colorbar ("+ml")
4647
position="jBR+o0.7c/0.8c+h+w5c/0.3c+ml",
47-
# Add a box around the colobar with a fill ("+g") in "white" color and a
48-
# transparency ("@") of 30 % and with a 0.8-points thick, black, outline ("+p")
49-
box="+gwhite@30+p0.8p,black",
48+
# Add a box around the colobar, filled in white and a 30 % transparency, with a
49+
# 0.8-points thick, black, outline.
50+
box=Box(pen="0.8p,black", fill="white@30"),
5051
# Add x- and y-labels ("+l")
5152
frame=["x+lElevation", "y+lm"],
5253
)

0 commit comments

Comments
 (0)