Skip to content

Commit 068820c

Browse files
committed
Merge branch 'main' into alias-system-v1
2 parents ee072df + 977c16e commit 068820c

File tree

14 files changed

+245
-76
lines changed

14 files changed

+245
-76
lines changed

.github/ISSUE_TEMPLATE/4-release_checklist.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ assignees: ''
1111
**Scheduled Date**: 20YY/MM/DD
1212
**Pull request due date**: 20YY/MM/DD
1313
**DOI**: `10.5281/zenodo.XXXXXXX`
14+
**Announcement draft**: https://hackmd.io/@pygmt/xxxxxxxx
1415

1516
**Priority PRs/issues to complete prior to release**
1617

@@ -39,11 +40,15 @@ assignees: ''
3940
- [ ] Edit the draft release notes with the finalized changelog
4041
- [ ] Set the tag version and release title to vX.Y.Z
4142
- [ ] Make a release by clicking the 'Publish Release' button, this will automatically create a tag too
43+
- [ ] Verify that [all workflows triggered by the release](https://github.com/GenericMappingTools/pygmt/actions?query=event%3Arelease) pass
44+
- [ ] The latest version is correct on [PyPI](https://pypi.org/project/pygmt/)
45+
- [ ] The latest version is correct on https://www.pygmt.org/latest/
46+
- [ ] The [release page](https://github.com/GenericMappingTools/pygmt/releases) has five assets, including `baseline-images.zip`, `pygmt-docs.zip` and `pygmt-docs.pdf`
4247
- [ ] Download pygmt-X.Y.Z.zip (rename to pygmt-vX.Y.Z.zip) and baseline-images.zip from the release page, and upload the two zip files to https://zenodo.org/deposit, ensure that they are filed under the correct reserved DOI
4348

4449
**After release**:
4550

46-
- [ ] Update conda-forge [pygmt-feedstock](https://github.com/conda-forge/pygmt-feedstock) [Done automatically by conda-forge's bot. Remember to pin GMT, Python and SPEC0 versions]
51+
- [ ] Update conda-forge [pygmt-feedstock](https://github.com/conda-forge/pygmt-feedstock) (Done automatically by conda-forge's bot. If you don't want to wait, open a new issue in the `conda-forge/pygmt-feedstock` repository with the title `@conda-forge-admin, please update version`. This will trigger the bot immediately. Remember to pin GMT, Python and SPEC0 versions)
4752
- [ ] Bump PyGMT version on https://github.com/GenericMappingTools/try-gmt (after conda-forge update)
4853
- [ ] Announce the release on:
4954
- [ ] GMT [forum](https://forum.generic-mapping-tools.org/c/news/) (do this announcement first! Requires moderator status)

.github/workflows/check-links.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,8 @@ jobs:
6666
--exclude "^https://www.pygmt.org/%7B%7Bpath%7D%7D"
6767
--exclude "^https://www.researchgate.net/"
6868
--exclude "^https://zenodo.org/badge/DOI/"
69-
--exclude-path "repository/doc/**/*.rst"
70-
--exclude-path "repository/doc/**/*.md"
7169
--verbose
72-
"repository/**/*.rst"
73-
"repository/**/*.md"
70+
"repository/*.md"
7471
"repository/**/*.py"
7572
"documentation/dev/**/*.html"
7673

.github/workflows/ci_tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ concurrency:
4949

5050
jobs:
5151
test:
52-
name: ${{ matrix.os }} - Python ${{ matrix.python-version }} / NumPy ${{ matrix.numpy-version }}
52+
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
5353
runs-on: ${{ matrix.os }}
5454
permissions:
5555
id-token: write # This is required for requesting OIDC token for codecov
@@ -152,7 +152,7 @@ jobs:
152152
GH_TOKEN: ${{ github.token }}
153153

154154
- name: Install uv
155-
uses: astral-sh/[email protected].0
155+
uses: astral-sh/[email protected].1
156156
with:
157157
python-version: ${{ matrix.python-version }}
158158

.github/workflows/format-command.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
# Generate token from GenericMappingTools bot
19-
- uses: actions/create-github-app-token@v1.11.6
19+
- uses: actions/create-github-app-token@v1.12.0
2020
id: generate-token
2121
with:
2222
app-id: ${{ secrets.APP_ID }}

CITATION.cff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ authors:
7676
family-names: Wessel
7777
affiliation: University of Hawaiʻi at Mānoa, USA
7878
orcid: https://orcid.org/0000-0001-5708-7336
79-
date-released: 2025-02-15
80-
doi: 10.5281/zenodo.14868324
79+
date-released: 2025-03-31
80+
doi: 10.5281/zenodo.15071586
8181
license: BSD-3-Clause
8282
repository-code: https://github.com/GenericMappingTools/pygmt
8383
type: software
84-
version: 0.14.2
84+
version: 0.15.0

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Feel free to cite our work in your research using the following BibTeX:
137137

138138
```
139139
@software{
140-
pygmt_2025_14868324,
140+
pygmt_2025_15071586,
141141
author = {Tian, Dongdong and
142142
Uieda, Leonardo and
143143
Leong, Wei Ji and
@@ -157,12 +157,12 @@ Feel free to cite our work in your research using the following BibTeX:
157157
Quinn, Jamie and
158158
Wessel, Paul},
159159
title = {{PyGMT: A Python interface for the Generic Mapping Tools}},
160-
month = feb,
160+
month = mar,
161161
year = 2025,
162162
publisher = {Zenodo},
163-
version = {0.14.2},
164-
doi = {10.5281/zenodo.14868324},
165-
url = {https://doi.org/10.5281/zenodo.14868324}
163+
version = {0.15.0},
164+
doi = {10.5281/zenodo.15071586},
165+
url = {https://doi.org/10.5281/zenodo.15071586}
166166
}
167167
```
168168

doc/_static/version_switch.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
var all_versions = {
1313
'latest': 'latest',
1414
'dev': 'dev',
15+
'v0.15.0': 'v0.15.0',
1516
'v0.14.2': 'v0.14.2',
1617
'v0.14.1': 'v0.14.1',
1718
'v0.14.0': 'v0.14.0',

doc/changes.md

Lines changed: 64 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,69 @@
11
# Changelog
22

3+
## Release v0.15.0 (2025/03/31)
4+
5+
[![Digital Object Identifier for PyGMT v0.15.0](https://zenodo.org/badge/DOI/10.5281/zenodo.15071586.svg)](https://doi.org/10.5281/zenodo.15071586)
6+
7+
### Highlights
8+
9+
* 🎉 **Fifteenth minor release of PyGMT** 🎉
10+
* One new gallery example and two new tutorials
11+
* Figure.shift_origin: Support shifting origins temporarily when used as a context manager ([#2509](https://github.com/GenericMappingTools/pygmt/pull/2509))
12+
* Documentation as HTML ZIP archive and in PDF format for offline reference
13+
14+
### Enhancements
15+
16+
* **BREAKING** Support typesetting apostrophe (') and backtick (`) ([#3105](https://github.com/GenericMappingTools/pygmt/pull/3105))
17+
* **BREAKING** pygmt.grdcut: Refactor to store output in virtualfiles for grids ([#3115](https://github.com/GenericMappingTools/pygmt/pull/3115))
18+
* GMTDataArrayAccessor: Support passing values using enums GridRegistration and GridType for grid registration and type ([#3696](https://github.com/GenericMappingTools/pygmt/pull/3696))
19+
* pygmt.grdfill: Add new parameters 'constantfill'/'gridfill'/'neighborfill'/'splinefill' for filling holes ([#3855](https://github.com/GenericMappingTools/pygmt/pull/3855))
20+
* pygmt.grdfill: Add new parameter 'inquire' to inquire the bounds of holes ([#3880](https://github.com/GenericMappingTools/pygmt/pull/3880))
21+
* pygmt.grdfill: Add alias 'coltypes' (-f) ([#3869](https://github.com/GenericMappingTools/pygmt/pull/3869))
22+
23+
### Deprecations
24+
25+
* pygmt.grdfill: Deprecate parameter 'no_data' to 'hole' (remove in v0.19.0) ([#3852](https://github.com/GenericMappingTools/pygmt/pull/3852))
26+
* pygmt.grdfill: Deprecate parameter 'mode', use parameters 'constantfill'/'gridfill'/'neighborfill'/'splinefill' instead (remove in v0.19.0) ([#3855](https://github.com/GenericMappingTools/pygmt/pull/3855))
27+
* pygmt.grdclip: Deprecate parameter 'new' to 'replace' (remove in v0.19.0) ([#3884](https://github.com/GenericMappingTools/pygmt/pull/3884))
28+
* clib.Session: Remove deprecated open_virtual_file method, use open_virtualfile instead (Deprecated since v0.11.0) ([#3738](https://github.com/GenericMappingTools/pygmt/pull/3738))
29+
* clib.Session: Remove deprecated virtualfile_from_data method, use virtualfile_in instead (Deprecated since v0.13.0) ([#3739](https://github.com/GenericMappingTools/pygmt/pull/3739))
30+
31+
### Documentation
32+
33+
* Add an advanced tutorial for plotting focal mechanisms (beachballs) ([#2550](https://github.com/GenericMappingTools/pygmt/pull/2550))
34+
* Add an advanced tutorial for creating legends ([#3594](https://github.com/GenericMappingTools/pygmt/pull/3594))
35+
* Add a gallery example for Figure.hlines and Figure.vlines ([#3755](https://github.com/GenericMappingTools/pygmt/pull/3755))
36+
37+
### Maintenance
38+
39+
* Use the 'release-branch-semver' version scheme for setuptools_scm ([#3828](https://github.com/GenericMappingTools/pygmt/pull/3828))
40+
* Rename _GMT_DATASET.to_dataframe to .to_pandas and _GMT_GRID.to_dataarray/_GMT_IMAGE.to_dataarray to .to_xarray ([#3798](https://github.com/GenericMappingTools/pygmt/pull/3798))
41+
* Bump to ruff 0.9.0, apply ruff 2025 style, and ignore A005 (stdlib-module-shadowing) violations ([#3763](https://github.com/GenericMappingTools/pygmt/pull/3763))
42+
* Use well-known labels in project URLs following PEP753 ([#3743](https://github.com/GenericMappingTools/pygmt/pull/3743))
43+
* clib.conversion: Remove the unused array_to_datetime function ([#3507](https://github.com/GenericMappingTools/pygmt/pull/3507))
44+
* CI: Test on Linux arm64 runners ([#3778](https://github.com/GenericMappingTools/pygmt/pull/3778))
45+
* CI: Build PDF documentation using tectonic ([#3765](https://github.com/GenericMappingTools/pygmt/pull/3765))
46+
47+
**Full Changelog**: <https://github.com/GenericMappingTools/pygmt/compare/v0.14.0...v0.15.0>
48+
49+
### Contributors
50+
51+
* [Dongdong Tian](https://github.com/seisman)
52+
* [Yvonne Fröhlich](https://github.com/yvonnefroehlich)
53+
* [Wei Ji Leong](https://github.com/weiji14)
54+
* [Michael Grund](https://github.com/michaelgrund)
55+
56+
---
57+
358
## Release v0.14.2 (2025/02/15)
459

560
[![Digital Object Identifier for PyGMT v0.14.2](https://zenodo.org/badge/DOI/10.5281/zenodo.14868324.svg)](https://doi.org/10.5281/zenodo.14868324)
661

762

863
### Bug Fixes
964

10-
- **Patch release fixing a critical bug introduced in PyGMT v0.14.1**
11-
- Fix the bug for passing text strings with numeric values ([#3804](https://github.com/GenericMappingTools/pygmt/pull/3804))
65+
* **Patch release fixing a critical bug introduced in PyGMT v0.14.1**
66+
* Fix the bug for passing text strings with numeric values ([#3804](https://github.com/GenericMappingTools/pygmt/pull/3804))
1267

1368
**Full Changelog**: <https://github.com/GenericMappingTools/pygmt/compare/v0.14.1...v0.14.2>
1469

@@ -24,16 +79,16 @@
2479

2580
### Highlights
2681

27-
- **Patch release fixing critical bugs in PyGMT v0.14.0**
28-
- Fix the bug of converting Python sequence of datetime-like objects ([#3760](https://github.com/GenericMappingTools/pygmt/pull/3760))
82+
* **Patch release fixing critical bugs in PyGMT v0.14.0**
83+
* Fix the bug of converting Python sequence of datetime-like objects ([#3760](https://github.com/GenericMappingTools/pygmt/pull/3760))
2984

3085
### Maintenance
3186

32-
- CI: Separate jobs for publishing to TestPyPI and PyPI ([#3742](https://github.com/GenericMappingTools/pygmt/pull/3742))
33-
- clib.conversion._to_numpy: Add tests for Python sequence of datetime-like objects ([#3758](https://github.com/GenericMappingTools/pygmt/pull/3758))
34-
- Fix an image in README.md (broken on PyPI) and rewrap to 88 characters ([#3740](https://github.com/GenericMappingTools/pygmt/pull/3740))
35-
- Fix the dataset link in the RGB image gallery example ([#3781](https://github.com/GenericMappingTools/pygmt/pull/3781))
36-
- Update License year to 2025 ([#3737](https://github.com/GenericMappingTools/pygmt/pull/3737))
87+
* CI: Separate jobs for publishing to TestPyPI and PyPI ([#3742](https://github.com/GenericMappingTools/pygmt/pull/3742))
88+
* clib.conversion._to_numpy: Add tests for Python sequence of datetime-like objects ([#3758](https://github.com/GenericMappingTools/pygmt/pull/3758))
89+
* Fix an image in README.md (broken on PyPI) and rewrap to 88 characters ([#3740](https://github.com/GenericMappingTools/pygmt/pull/3740))
90+
* Fix the dataset link in the RGB image gallery example ([#3781](https://github.com/GenericMappingTools/pygmt/pull/3781))
91+
* Update License year to 2025 ([#3737](https://github.com/GenericMappingTools/pygmt/pull/3737))
3792

3893
**Full Changelog**: <https://github.com/GenericMappingTools/pygmt/compare/v0.14.0...v0.14.1>
3994

doc/minversions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ compatibility reasons.
4747
| PyGMT Version | Documentation | GMT | Python | NumPy | pandas | Xarray |
4848
|---|---|---|---|---|---|---|
4949
| [Dev][]* | <doc:dev>, [HTML+ZIP](doc:dev/pygmt-docs.zip), [PDF](doc:dev/pygmt-docs.pdf) | {{ requires.gmt }} | {{ requires.python }} | {{ requires.numpy }} | {{ requires.pandas }} | {{ requires.xarray }} |
50+
| <tag:v0.15.0> | <doc:v0.15.0>, <html:v0.15.0>, <pdf:v0.15.0> | >=6.4.0 | >=3.11 | >=1.25 | >=2.0 | >=2023.04 |
5051
| <tag:v0.14.2> | <doc:v0.14.2>, <html:v0.14.2> | >=6.4.0 | >=3.11 | >=1.25 | >=2.0 | >=2023.04 |
5152
| <tag:v0.14.1> | <doc:v0.14.1>, <html:v0.14.1> | >=6.4.0 | >=3.11 | >=1.25 | >=2.0 | >=2023.04 |
5253
| <tag:v0.14.0> | <doc:v0.14.0>, <html:v0.14.0> | >=6.4.0 | >=3.11 | >=1.25 | >=2.0 | >=2023.04 |

pygmt/src/grdclip.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,26 @@
44

55
import xarray as xr
66
from pygmt.clib import Session
7-
from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
7+
from pygmt.helpers import (
8+
build_arg_list,
9+
deprecate_parameter,
10+
fmt_docstring,
11+
kwargs_to_strings,
12+
use_alias,
13+
)
814

915
__doctest_skip__ = ["grdclip"]
1016

1117

18+
# TODO(PyGMT>=0.19.0): Remove the deprecated "new" parameter.
1219
@fmt_docstring
20+
@deprecate_parameter("new", "replace", "v0.15.0", remove_version="v0.19.0")
1321
@use_alias(
1422
R="region",
1523
Sa="above",
1624
Sb="below",
1725
Si="between",
18-
Sr="new",
26+
Sr="replace",
1927
V="verbose",
2028
)
2129
@kwargs_to_strings(
@@ -55,7 +63,7 @@ def grdclip(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | None:
5563
between : str or list
5664
[*low*, *high*, *between*].
5765
Set all data[i] >= *low* and <= *high* to *between*.
58-
new : str or list
66+
replace : str or list
5967
[*old*, *new*].
6068
Set all data[i] == *old* to *new*. This is mostly useful when
6169
your data are known to be integer values.

0 commit comments

Comments
 (0)