Skip to content

Commit 0430c20

Browse files
authored
Merge branch 'main' into quotes
2 parents 782cf08 + 4b9314a commit 0430c20

File tree

82 files changed

+1976
-504
lines changed

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

+1976
-504
lines changed

Diff for: .github/ISSUE_TEMPLATE/4-release_checklist.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: PyGMT release checklist
3-
about: Checklist for a new PyGMT release.
3+
about: Checklist for a new PyGMT release. [For project maintainers only!]
44
title: Release PyGMT vX.Y.Z
55
labels: maintenance
66
assignees: ''
@@ -23,7 +23,7 @@ assignees: ''
2323
core package dependencies (NumPy, pandas, Xarray)
2424
- [ ] Review the ["PyGMT Team" page](https://www.pygmt.org/dev/team.html)
2525
- [ ] Check to ensure that:
26-
- [ ] Deprecations and related tests are removed for this version by running `grep --include="*.py" -r vX.Y.Z` from the base of the repository
26+
- [ ] Deprecated workarounds/codes/tests are removed. Run `grep "# TODO" **/*.py` to find all potential TODOs.
2727
- [ ] All tests pass in the ["GMT Legacy Tests" workflow](https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_tests_legacy.yaml)
2828
- [ ] All tests pass in the ["GMT Dev Tests" workflow](https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_tests_dev.yaml)
2929
- [ ] All tests pass in the ["Doctests" workflow](https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_doctests.yaml)

Diff for: .github/ISSUE_TEMPLATE/5-bump_gmt_checklist.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Bump GMT version checklist
3-
about: Checklist for bumping the minimum required GMT version.
3+
about: Checklist for bumping the minimum required GMT version. [For project maintainers only!]
44
title: Bump to GMT X.Y.Z
55
labels: maintenance
66
assignees: ''

Diff for: .github/PULL_REQUEST_TEMPLATE.md

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Fixes #
2020
- [ ] Write detailed docstrings for all functions/methods.
2121
- [ ] If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
2222
- [ ] If adding new functionality, add an example to docstrings or tutorials.
23-
- [ ] Use underscores (not hyphens) in names of Python files and directories.
2423

2524
**Slash Commands**
2625

Diff for: .github/workflows/cache_data.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676

7777
# Upload the downloaded files as artifacts to GitHub
7878
- name: Upload artifacts to GitHub
79-
uses: actions/upload-artifact@v4.4.3
79+
uses: actions/upload-artifact@v4.5.0
8080
with:
8181
name: gmt-cache
8282
include-hidden-files: true

Diff for: .github/workflows/ci_docs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108
make
109109
pip
110110
python-build
111+
geodatasets
111112
myst-nb
112113
panel
113114
sphinx>=6.2

Diff for: .github/workflows/ci_tests.yaml

+6-8
Original file line numberDiff line numberDiff line change
@@ -154,20 +154,18 @@ jobs:
154154
GH_TOKEN: ${{ github.token }}
155155

156156
- name: Install uv
157-
uses: astral-sh/[email protected]
157+
uses: astral-sh/[email protected]
158+
with:
159+
python-version: ${{ matrix.python-version }}
158160

159161
- name: Install dvc
160162
run: |
161-
uv venv
162-
source .venv/bin/activate
163163
uv pip install dvc
164164
uv pip list
165165
166166
# Pull baseline image data from dvc remote (DAGsHub)
167167
- name: Pull baseline image data from dvc remote
168-
run: |
169-
source .venv/bin/activate
170-
uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
168+
run: uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
171169

172170
# Install the package that we want to test
173171
- name: Install the package
@@ -179,15 +177,15 @@ jobs:
179177

180178
# Upload diff images on test failure
181179
- name: Upload diff images if any test fails
182-
uses: actions/upload-artifact@v4.4.3
180+
uses: actions/upload-artifact@v4.5.0
183181
if: failure()
184182
with:
185183
name: artifact-${{ runner.os }}-${{ matrix.python-version }}
186184
path: tmp-test-dir-with-unique-name
187185

188186
# Upload coverage to Codecov
189187
- name: Upload coverage to Codecov
190-
uses: codecov/[email protected].1
188+
uses: codecov/[email protected].2
191189
if: success() || failure()
192190
with:
193191
use_oidc: true

Diff for: .github/workflows/ci_tests_dev.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ jobs:
187187

188188
# Upload diff images on test failure
189189
- name: Upload diff images if any test fails
190-
uses: actions/upload-artifact@v4.4.3
190+
uses: actions/upload-artifact@v4.5.0
191191
if: ${{ failure() }}
192192
with:
193193
name: artifact-GMT-${{ matrix.gmt_git_ref }}-${{ runner.os }}

Diff for: .github/workflows/format-command.yml

+1-1
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].0
14+
- uses: actions/[email protected].1
1515
id: generate-token
1616
with:
1717
app-id: ${{ secrets.APP_ID }}

Diff for: .github/workflows/style_checks.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,15 @@ jobs:
5252
rm output.txt
5353
exit $nfiles
5454
fi
55+
56+
- name: Ensure hyphens are not used in names of directories and Python files
57+
run: |
58+
git ls-files '*.py' | grep '-' > output.txt || true
59+
git ls-tree -rd --name-only HEAD | grep '-' >> output.txt || true
60+
nfiles=$(wc --lines output.txt | awk '{print $1}')
61+
if [[ $nfiles > 0 ]]; then
62+
echo "Following directories/files use hyphens in file names:"
63+
cat output.txt
64+
rm output.txt
65+
exit $nfiles
66+
fi

Diff for: CITATION.cff

+7-7
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ authors:
4040
family-names: Yao
4141
affiliation: Nanyang Technological University, Singapore
4242
orcid: https://orcid.org/0000-0001-7036-4238
43+
- given-names: Jing-Hui
44+
family-names: Tong
45+
affiliation: National Taiwan Normal University, Taiwan
46+
orcid: https://orcid.org/0009-0002-7195-3071
4347
- given-names: Yohai
4448
family-names: Magen
4549
affiliation: Tel Aviv University, Israel
4650
orcid: https://orcid.org/0000-0002-4892-4013
47-
- given-names: Tong
48-
family-names: Jing-Hui
49-
affiliation: National Taiwan Normal University, Taiwan
50-
orcid: https://orcid.org/0009-0002-7195-3071
5151
- given-names: Kathryn
5252
family-names: Materna
5353
affiliation: US Geological Survey, USA
@@ -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: 2024-09-05
80-
doi: 10.5281/zenodo.13679420
79+
date-released: 2024-12-31
80+
doi: 10.5281/zenodo.14535921
8181
license: BSD-3-Clause
8282
repository-code: https://github.com/GenericMappingTools/pygmt
8383
type: software
84-
version: 0.13.0
84+
version: 0.14.0

Diff for: LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017-2024 The PyGMT Developers
1+
Copyright (c) 2017-2025 The PyGMT Developers
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

Diff for: README.md

+46-41
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,32 @@
2222

2323
## Why PyGMT?
2424

25-
A beautiful map is worth a thousand words. To truly understand how powerful PyGMT is, play with it online on
26-
[Binder](https://github.com/GenericMappingTools/try-gmt)! For a quicker introduction, check out our
27-
[3 minute overview](https://youtu.be/4iPnITXrxVU)!
25+
A beautiful map is worth a thousand words. To truly understand how powerful PyGMT is,
26+
play with it online on [Binder](https://github.com/GenericMappingTools/try-gmt)! For a
27+
quicker introduction, check out our [3 minute overview](https://youtu.be/4iPnITXrxVU)!
2828

29-
Afterwards, feel free to look at our [Tutorials](https://www.pygmt.org/latest/tutorials), visit the
30-
[Gallery](https://www.pygmt.org/latest/gallery), and check out some
29+
Afterwards, feel free to look at our [Tutorials](https://www.pygmt.org/latest/tutorials),
30+
visit the [Gallery](https://www.pygmt.org/latest/gallery), and check out some
3131
[external PyGMT examples](https://www.pygmt.org/latest/external_resources.html)!
3232

33-
![Quick Introduction to PyGMT YouTube Video](doc/_static/scipy2022-youtube-thumbnail.jpg)
33+
![Quick Introduction to PyGMT YouTube Video](https://raw.githubusercontent.com/GenericMappingTools/pygmt/refs/heads/main/doc/_static/scipy2022-youtube-thumbnail.jpg)
3434

3535
## About
3636

37-
PyGMT is a library for processing geospatial and geophysical data and making publication-quality
38-
maps and figures. It provides a Pythonic interface for the
39-
[Generic Mapping Tools (GMT)](https://github.com/GenericMappingTools/gmt), a command-line program
40-
widely used across the Earth, Ocean, and Planetary sciences and beyond.
37+
PyGMT is a library for processing geospatial and geophysical data and making
38+
publication-quality maps and figures. It provides a Pythonic interface for the
39+
[Generic Mapping Tools (GMT)](https://github.com/GenericMappingTools/gmt), a command-line
40+
program widely used across the Earth, Ocean, and Planetary sciences and beyond.
4141

4242
## Project goals
4343

4444
- Make GMT more accessible to new users.
4545
- Build a Pythonic API for GMT.
4646
- Interface with the GMT C API directly using ctypes (no system calls).
4747
- Support for rich display in the Jupyter notebook.
48-
- Integration with the [scientific Python ecosystem](https://scientific-python.org/): `numpy.ndarray` or
49-
`pandas.DataFrame` for data tables, `xarray.DataArray` for grids, and `geopandas.GeoDataFrame` for geographical data.
48+
- Integration with the [scientific Python ecosystem](https://scientific-python.org/):
49+
`numpy.ndarray` or `pandas.DataFrame` for data tables, `xarray.DataArray` for grids,
50+
and `geopandas.GeoDataFrame` for geographical data.
5051

5152
## Quickstart
5253

@@ -69,7 +70,8 @@ For other ways to install `pygmt`, see the [full installation instructions](http
6970
### Getting started
7071

7172
As a starting point, you can open a [Python interpreter](https://docs.python.org/3/tutorial/interpreter.html)
72-
or a [Jupyter notebook](https://docs.jupyter.org/en/latest/running.html), and try the following example:
73+
or a [Jupyter notebook](https://docs.jupyter.org/en/latest/running.html), and try the
74+
following example:
7375

7476
``` python
7577
import pygmt
@@ -79,18 +81,18 @@ fig.text(position="MC", text="PyGMT", font="80p,Helvetica-Bold,red@75")
7981
fig.show()
8082
```
8183

82-
You should see a global map with land and water masses colored in tan and lightblue, respectively. On top,
83-
there should be the semi-transparent text "PyGMT". For more examples, please have a look at the
84-
[Gallery](https://www.pygmt.org/latest/gallery/index.html) and
84+
You should see a global map with land and water masses colored in tan and lightblue,
85+
respectively. On top, there should be the semi-transparent text "PyGMT". For more examples,
86+
please have a look at the [Gallery](https://www.pygmt.org/latest/gallery/index.html) and
8587
[Tutorials](https://www.pygmt.org/latest/tutorials/index.html).
8688

8789
## Contacting us
8890

8991
- Most discussion happens [on GitHub](https://github.com/GenericMappingTools/pygmt).
90-
Feel free to [open an issue](https://github.com/GenericMappingTools/pygmt/issues/new) or comment on any open
91-
issue or pull request.
92-
- We have a [Discourse forum](https://forum.generic-mapping-tools.org/c/questions/pygmt-q-a) where you can ask
93-
questions and leave comments.
92+
Feel free to [open an issue](https://github.com/GenericMappingTools/pygmt/issues/new)
93+
or comment on any open issue or pull request.
94+
- We have a [Discourse forum](https://forum.generic-mapping-tools.org/c/questions/pygmt-q-a)
95+
where you can ask questions and leave comments.
9496

9597
## Contributing
9698

@@ -109,30 +111,33 @@ to see how you can help and give feedback.
109111

110112
**We want your help.** No, really.
111113

112-
There may be a little voice inside your head that is telling you that you're not ready to be an open source
113-
contributor; that your skills aren't nearly good enough to contribute. What could you possibly offer?
114+
There may be a little voice inside your head that is telling you that you're not ready
115+
to be an open source contributor; that your skills aren't nearly good enough to
116+
contribute. What could you possibly offer?
114117

115118
We assure you that the little voice in your head is wrong.
116119

117-
**Being a contributor doesn't just mean writing code.** Equally important contributions include: writing or
118-
proof-reading documentation, suggesting or implementing tests, or even giving feedback about the project
119-
(including giving feedback about the contribution process). If you're coming to the project with fresh eyes,
120-
you might see the errors and assumptions that seasoned contributors have glossed over. If you can write any
121-
code at all, you can contribute code to open source. We are constantly trying out new skills, making mistakes,
122-
and learning from those mistakes. That's how we all improve and we are happy to help others learn.
120+
**Being a contributor doesn't just mean writing code.** Equally important contributions
121+
include: writing or proof-reading documentation, suggesting or implementing tests, or
122+
even giving feedback about the project (including giving feedback about the contribution
123+
process). If you're coming to the project with fresh eyes, you might see the errors and
124+
assumptions that seasoned contributors have glossed over. If you can write any code at
125+
all, you can contribute code to open source. We are constantly trying out new skills,
126+
making mistakes, and learning from those mistakes. That's how we all improve and we are
127+
happy to help others learn.
123128

124129
*This disclaimer was adapted from the* [MetPy project](https://github.com/Unidata/MetPy).
125130

126131
## Citing PyGMT
127132

128133
PyGMT is a community developed project. See the
129-
[AUTHORS.md](https://github.com/GenericMappingTools/pygmt/blob/main/AUTHORS.md) file on GitHub for a list of
130-
the people involved and a definition of the term "PyGMT Developers". Feel free to cite our work in your
131-
research using the following BibTeX:
134+
[AUTHORS.md](https://github.com/GenericMappingTools/pygmt/blob/main/AUTHORS.md) file
135+
on GitHub for a list of the people involved and a definition of the term "PyGMT Developers".
136+
Feel free to cite our work in your research using the following BibTeX:
132137

133138
```
134139
@software{
135-
pygmt_2024_13679420,
140+
pygmt_2024_14535921,
136141
author = {Tian, Dongdong and
137142
Uieda, Leonardo and
138143
Leong, Wei Ji and
@@ -142,8 +147,8 @@ research using the following BibTeX:
142147
Jones, Max and
143148
Toney, Liam and
144149
Yao, Jiayuan and
145-
Magen, Yohai and
146150
Tong, Jing-Hui and
151+
Magen, Yohai and
147152
Materna, Kathryn and
148153
Belem, Andre and
149154
Newton, Tyler and
@@ -152,20 +157,20 @@ research using the following BibTeX:
152157
Quinn, Jamie and
153158
Wessel, Paul},
154159
title = {{PyGMT: A Python interface for the Generic Mapping Tools}},
155-
month = sep,
160+
month = dec,
156161
year = 2024,
157162
publisher = {Zenodo},
158-
version = {0.13.0},
159-
doi = {10.5281/zenodo.13679420},
160-
url = {https://doi.org/10.5281/zenodo.13679420}
163+
version = {0.14.0},
164+
doi = {10.5281/zenodo.14535921},
165+
url = {https://doi.org/10.5281/zenodo.14535921}
161166
}
162167
```
163168

164169
To cite a specific version of PyGMT, go to our Zenodo page at <https://doi.org/10.5281/zenodo.3781524>
165-
and use the "Export to BibTeX" function there. It is also strongly recommended to cite the
166-
[GMT 6 paper](https://doi.org/10.1029/2019GC008515) (which PyGMT wraps around). Note that some modules
167-
like `dimfilter`, `surface`, and `x2sys` also have their dedicated citations. Further information for
168-
all these can be found at <https://www.generic-mapping-tools.org/cite>.
170+
and use the "Export to BibTeX" function there. It is also strongly recommended to cite
171+
the [GMT 6 paper](https://doi.org/10.1029/2019GC008515) (which PyGMT wraps around). Note
172+
that some modules like `dimfilter`, `surface`, and `x2sys` also have their dedicated
173+
citations. Further information for all these can be found at <https://www.generic-mapping-tools.org/cite>.
169174

170175
## License
171176

Diff for: ci/requirements/docs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies:
2323
- pip
2424
- python-build
2525
# Dev dependencies (building documentation)
26+
- geodatasets
2627
- myst-nb
2728
- panel
2829
- sphinx>=6.2

Diff for: doc/_static/version_switch.js

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
var all_versions = {
1313
'latest': 'latest',
1414
'dev': 'dev',
15+
'v0.14.0': 'v0.14.0',
1516
'v0.13.0': 'v0.13.0',
1617
'v0.12.0': 'v0.12.0',
1718
'v0.11.0': 'v0.11.0',

Diff for: doc/api/index.rst

+6-1
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ Plotting map elements
2929
Figure.basemap
3030
Figure.coast
3131
Figure.colorbar
32+
Figure.hlines
3233
Figure.inset
3334
Figure.legend
3435
Figure.logo
3536
Figure.solar
3637
Figure.text
3738
Figure.timestamp
39+
Figure.vlines
3840

3941
Plotting tabular data
4042
~~~~~~~~~~~~~~~~~~~~~
@@ -233,10 +235,14 @@ and store them in GMT's user data directory.
233235
datasets.load_black_marble
234236
datasets.load_blue_marble
235237
datasets.load_earth_age
238+
datasets.load_earth_deflection
239+
datasets.load_earth_dist
236240
datasets.load_earth_free_air_anomaly
237241
datasets.load_earth_geoid
238242
datasets.load_earth_magnetic_anomaly
239243
datasets.load_earth_mask
244+
datasets.load_earth_mean_dynamic_topography
245+
datasets.load_earth_mean_sea_surface
240246
datasets.load_earth_relief
241247
datasets.load_earth_vertical_gravity_gradient
242248
datasets.load_mars_relief
@@ -329,7 +335,6 @@ Low level access (these are mostly used by the :mod:`pygmt.clib` package):
329335
clib.Session.read_virtualfile
330336
clib.Session.extract_region
331337
clib.Session.get_libgmt_func
332-
clib.Session.virtualfile_from_data
333338
clib.Session.virtualfile_from_grid
334339
clib.Session.virtualfile_from_stringio
335340
clib.Session.virtualfile_from_matrix

0 commit comments

Comments
 (0)