Skip to content

Commit

Permalink
Merge branch 'main' into alias-system
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Jan 3, 2025
2 parents 03e2269 + 4b9314a commit 0a14135
Show file tree
Hide file tree
Showing 24 changed files with 483 additions and 229 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cache_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:

# Upload the downloaded files as artifacts to GitHub
- name: Upload artifacts to GitHub
uses: actions/upload-artifact@v4.4.3
uses: actions/upload-artifact@v4.5.0
with:
name: gmt-cache
include-hidden-files: true
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,20 +154,18 @@ jobs:
GH_TOKEN: ${{ github.token }}

- name: Install uv
uses: astral-sh/[email protected]
uses: astral-sh/[email protected]
with:
python-version: ${{ matrix.python-version }}

- name: Install dvc
run: |
uv venv
source .venv/bin/activate
uv pip install dvc
uv pip list
# Pull baseline image data from dvc remote (DAGsHub)
- name: Pull baseline image data from dvc remote
run: |
source .venv/bin/activate
uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
run: uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/

# Install the package that we want to test
- name: Install the package
Expand All @@ -179,7 +177,7 @@ jobs:

# Upload diff images on test failure
- name: Upload diff images if any test fails
uses: actions/upload-artifact@v4.4.3
uses: actions/upload-artifact@v4.5.0
if: failure()
with:
name: artifact-${{ runner.os }}-${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ jobs:

# Upload diff images on test failure
- name: Upload diff images if any test fails
uses: actions/upload-artifact@v4.4.3
uses: actions/upload-artifact@v4.5.0
if: ${{ failure() }}
with:
name: artifact-GMT-${{ matrix.gmt_git_ref }}-${{ runner.os }}
Expand Down
14 changes: 7 additions & 7 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ authors:
family-names: Yao
affiliation: Nanyang Technological University, Singapore
orcid: https://orcid.org/0000-0001-7036-4238
- given-names: Jing-Hui
family-names: Tong
affiliation: National Taiwan Normal University, Taiwan
orcid: https://orcid.org/0009-0002-7195-3071
- given-names: Yohai
family-names: Magen
affiliation: Tel Aviv University, Israel
orcid: https://orcid.org/0000-0002-4892-4013
- given-names: Tong
family-names: Jing-Hui
affiliation: National Taiwan Normal University, Taiwan
orcid: https://orcid.org/0009-0002-7195-3071
- given-names: Kathryn
family-names: Materna
affiliation: US Geological Survey, USA
Expand Down Expand Up @@ -76,9 +76,9 @@ authors:
family-names: Wessel
affiliation: University of Hawaiʻi at Mānoa, USA
orcid: https://orcid.org/0000-0001-5708-7336
date-released: 2024-09-05
doi: 10.5281/zenodo.13679420
date-released: 2024-12-31
doi: 10.5281/zenodo.14535921
license: BSD-3-Clause
repository-code: https://github.com/GenericMappingTools/pygmt
type: software
version: 0.13.0
version: 0.14.0
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017-2024 The PyGMT Developers
Copyright (c) 2017-2025 The PyGMT Developers
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
87 changes: 46 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,32 @@

## Why PyGMT?

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

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

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

## About

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

## Project goals

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

## Quickstart

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

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

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

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

## Contacting us

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

## Contributing

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

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

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

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

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

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

## Citing PyGMT

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

```
@software{
pygmt_2024_13679420,
pygmt_2024_14535921,
author = {Tian, Dongdong and
Uieda, Leonardo and
Leong, Wei Ji and
Expand All @@ -142,8 +147,8 @@ research using the following BibTeX:
Jones, Max and
Toney, Liam and
Yao, Jiayuan and
Magen, Yohai and
Tong, Jing-Hui and
Magen, Yohai and
Materna, Kathryn and
Belem, Andre and
Newton, Tyler and
Expand All @@ -152,20 +157,20 @@ research using the following BibTeX:
Quinn, Jamie and
Wessel, Paul},
title = {{PyGMT: A Python interface for the Generic Mapping Tools}},
month = sep,
month = dec,
year = 2024,
publisher = {Zenodo},
version = {0.13.0},
doi = {10.5281/zenodo.13679420},
url = {https://doi.org/10.5281/zenodo.13679420}
version = {0.14.0},
doi = {10.5281/zenodo.14535921},
url = {https://doi.org/10.5281/zenodo.14535921}
}
```

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

## License

Expand Down
1 change: 1 addition & 0 deletions doc/_static/version_switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
var all_versions = {
'latest': 'latest',
'dev': 'dev',
'v0.14.0': 'v0.14.0',
'v0.13.0': 'v0.13.0',
'v0.12.0': 'v0.12.0',
'v0.11.0': 'v0.11.0',
Expand Down
2 changes: 1 addition & 1 deletion doc/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ and store them in GMT's user data directory.
datasets.load_black_marble
datasets.load_blue_marble
datasets.load_earth_age
datasets.load_earth_deflection
datasets.load_earth_dist
datasets.load_earth_free_air_anomaly
datasets.load_earth_geoid
Expand Down Expand Up @@ -334,7 +335,6 @@ Low level access (these are mostly used by the :mod:`pygmt.clib` package):
clib.Session.read_virtualfile
clib.Session.extract_region
clib.Session.get_libgmt_func
clib.Session.virtualfile_from_data
clib.Session.virtualfile_from_grid
clib.Session.virtualfile_from_stringio
clib.Session.virtualfile_from_matrix
Expand Down
Loading

0 comments on commit 0a14135

Please sign in to comment.