Skip to content

Commit bd4037f

Browse files
authored
Merge branch 'main' into try-micromamba
2 parents ece3db9 + 9a497e1 commit bd4037f

17 files changed

+35
-31
lines changed

.github/ISSUE_TEMPLATE/bump_gmt_checklist.md

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ assignees: ''
2929
**To-Do for bumping the minimum required GMT version**:
3030

3131
- [ ] Bump the minimum required GMT version (1 PR)
32-
- [ ] Update `doc/install.rst`
3332
- [ ] Update `required_version` in `pygmt/clib/session.py`
3433
- [ ] Update `test_get_default` in `pygmt/tests/test_clib.py`
3534
- [ ] Update compatibility table in `README.rst`

.github/workflows/cache_data.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
steps:
2929
# Checkout current git repository
3030
- name: Checkout
31-
uses: actions/[email protected].0
31+
uses: actions/[email protected].2
3232
with:
3333
# fetch all history so that setuptools-scm works
3434
fetch-depth: 0

.github/workflows/check-links.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121

2222
steps:
2323
- name: Checkout the repository
24-
uses: actions/[email protected].0
24+
uses: actions/[email protected].2
2525
with:
2626
path: repository
2727

2828
- name: Checkout the documentation
29-
uses: actions/[email protected].0
29+
uses: actions/[email protected].2
3030
with:
3131
ref: gh-pages
3232
path: documentation

.github/workflows/ci_docs.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060

6161
# Checkout current git repository
6262
- name: Checkout
63-
uses: actions/[email protected].0
63+
uses: actions/[email protected].2
6464
with:
6565
# fetch all history so that setuptools-scm works
6666
fetch-depth: 0
@@ -80,7 +80,7 @@ jobs:
8080

8181
# Download cached remote files (artifacts) from GitHub
8282
- name: Download remote data from GitHub
83-
uses: dawidd6/action-download-artifact@v2.26.1
83+
uses: dawidd6/action-download-artifact@v2.27.0
8484
with:
8585
workflow: cache_data.yaml
8686
workflow_conclusion: success
@@ -107,7 +107,7 @@ jobs:
107107
run: make -C doc clean all
108108

109109
- name: Checkout the gh-pages branch
110-
uses: actions/[email protected].0
110+
uses: actions/[email protected].2
111111
with:
112112
ref: gh-pages
113113
# Checkout to this folder instead of the current one

.github/workflows/ci_doctests.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
# Checkout current git repository
3737
- name: Checkout
38-
uses: actions/checkout@v3.4.0
38+
uses: actions/checkout@v3.5.2
3939
with:
4040
# fetch all history so that setuptools-scm works
4141
fetch-depth: 0
@@ -54,7 +54,7 @@ jobs:
5454

5555
# Download cached remote files (artifacts) from GitHub
5656
- name: Download remote data from GitHub
57-
uses: dawidd6/action-download-artifact@v2.26.0
57+
uses: dawidd6/action-download-artifact@v2.27.0
5858
with:
5959
workflow: cache_data.yaml
6060
workflow_conclusion: success

.github/workflows/ci_tests.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989

9090
# Checkout current git repository
9191
- name: Checkout
92-
uses: actions/[email protected].0
92+
uses: actions/[email protected].2
9393
with:
9494
# fetch all history so that setuptools-scm works
9595
fetch-depth: 0
@@ -111,7 +111,7 @@ jobs:
111111

112112
# Download cached remote files (artifacts) from GitHub
113113
- name: Download remote data from GitHub
114-
uses: dawidd6/action-download-artifact@v2.26.1
114+
uses: dawidd6/action-download-artifact@v2.27.0
115115
with:
116116
workflow: cache_data.yaml
117117
workflow_conclusion: success

.github/workflows/ci_tests_dev.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454

5555
# Checkout current git repository
5656
- name: Checkout
57-
uses: actions/[email protected].0
57+
uses: actions/[email protected].2
5858
if: github.event_name != 'repository_dispatch'
5959
with:
6060
# fetch all history so that setuptools-scm works
@@ -71,7 +71,7 @@ jobs:
7171

7272
# Checkout the pull request branch
7373
- name: Checkout
74-
uses: actions/[email protected].0
74+
uses: actions/[email protected].2
7575
if: github.event_name == 'repository_dispatch'
7676
with:
7777
token: ${{ steps.generate-token.outputs.token }}
@@ -155,7 +155,7 @@ jobs:
155155

156156
# Download cached remote files (artifacts) from GitHub
157157
- name: Download remote data from GitHub
158-
uses: dawidd6/action-download-artifact@v2.26.1
158+
uses: dawidd6/action-download-artifact@v2.27.0
159159
with:
160160
workflow: cache_data.yaml
161161
workflow_conclusion: success

.github/workflows/ci_tests_legacy.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
# Checkout current git repository
4949
- name: Checkout
50-
uses: actions/[email protected].0
50+
uses: actions/[email protected].2
5151
with:
5252
# fetch all history so that setuptools-scm works
5353
fetch-depth: 0
@@ -68,7 +68,7 @@ jobs:
6868

6969
# Download cached remote files (artifacts) from GitHub
7070
- name: Download remote data from GitHub
71-
uses: dawidd6/action-download-artifact@v2.26.1
71+
uses: dawidd6/action-download-artifact@v2.27.0
7272
with:
7373
workflow: cache_data.yaml
7474
workflow_conclusion: success

.github/workflows/dvc-diff.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Checkout
24-
uses: actions/[email protected].0
24+
uses: actions/[email protected].2
2525
with:
2626
# fetch all history so that dvc diff works
2727
fetch-depth: 0

.github/workflows/format-command.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
private_key: ${{ secrets.APP_PRIVATE_KEY }}
1919

2020
# Checkout the pull request branch
21-
- uses: actions/[email protected].0
21+
- uses: actions/[email protected].2
2222
with:
2323
token: ${{ steps.generate-token.outputs.token }}
2424
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
steps:
4040
- name: Checkout
41-
uses: actions/[email protected].0
41+
uses: actions/[email protected].2
4242
with:
4343
# fetch all history so that setuptools-scm works
4444
fetch-depth: 0

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
steps:
2121
- name: Checkout
22-
uses: actions/[email protected].0
22+
uses: actions/[email protected].2
2323

2424
- name: Setup data version control (DVC)
2525
uses: iterative/[email protected]

.github/workflows/style_checks.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
steps:
2525
# Checkout current git repository
2626
- name: Checkout
27-
uses: actions/[email protected].0
27+
uses: actions/[email protected].2
2828

2929
# Setup Python
3030
- name: Set up Python

doc/conf.py

+8
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
# pylint: disable=invalid-name
66

77
import datetime
8+
from importlib.metadata import metadata
89

910
# isort: off
1011
from sphinx_gallery.sorting import ( # pylint: disable=no-name-in-module
1112
ExplicitOrder,
1213
ExampleTitleSortKey,
1314
)
15+
import pygmt
1416
from pygmt import __commit__, __version__
1517
from pygmt.sphinx_gallery import PyGMTScraper
1618

@@ -149,9 +151,15 @@
149151
html_baseurl = "https://pygmt.org/latest/"
150152
release = __version__
151153

154+
requires_python = metadata("pygmt")["Requires-Python"]
155+
with pygmt.clib.Session() as lib:
156+
requires_gmt = ">=" + lib.required_version
157+
152158
# These enable substitutions using |variable| in the rst files
153159
rst_epilog = f"""
154160
.. |year| replace:: {year}
161+
.. |requires_python| replace:: {requires_python}
162+
.. |requires_gmt| replace:: {requires_gmt}
155163
"""
156164

157165
html_last_updated_fmt = "%b %d, %Y"

doc/install.rst

+4-7
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Start by looking at the tutorials on our sidebar, good luck!
6464
Which Python?
6565
-------------
6666

67-
PyGMT is tested to run on **Python 3.9 or greater**.
67+
PyGMT is tested to run on Python |requires_python|.
6868

6969
We recommend using the `Mambaforge <https://github.com/conda-forge/miniforge#mambaforge>`__
7070
Python distribution to ensure you have all dependencies installed and the
@@ -77,12 +77,9 @@ installations on your system.
7777
Which GMT?
7878
----------
7979

80-
PyGMT requires Generic Mapping Tools (GMT) version 6 as a minimum, which is the
81-
latest released version that can be found at
82-
the `GMT official site <https://www.generic-mapping-tools.org>`__.
83-
We need the latest GMT (>=6.3.0) since there are many changes being made to GMT
84-
itself in response to the development of PyGMT, mainly the new
85-
:gmt-docs:`modern execution mode <cookbook/introduction.html#modern-and-classic-mode>`.
80+
PyGMT requires Generic Mapping Tools (GMT) |requires_gmt| since there
81+
are many changes being made to GMT itself in response to the development of PyGMT,
82+
mainly the new :gmt-docs:`modern execution mode <cookbook/introduction.html#modern-and-classic-mode>`.
8683

8784
Compiled conda packages of GMT for Linux, macOS and Windows are provided
8885
through `conda-forge <https://anaconda.org/conda-forge/gmt>`__.

pygmt/helpers/decorators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ def kwargs_to_strings(**conversions):
679679
>>> import xarray as xr
680680
>>> module(
681681
... R=[
682-
... xr.DataArray(data=np.datetime64("2005-01-01T08:00:00")),
682+
... xr.DataArray(data=np.datetime64("2005-01-01T08:00:00", "ns")),
683683
... pd.Timestamp("2015-01-01T12:00:00.123456789"),
684684
... ]
685685
... )

pygmt/src/colorbar.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ def colorbar(self, **kwargs):
8585
rectangular borders instead, with a 6p corner radius. You can override
8686
this radius by appending another value. Finally, append **+s** to draw
8787
an offset background shaded region. Here, *dx/dy* indicates the shift
88-
relative to the foreground frame [4p/-4p] and shade sets the fill
89-
style to use for shading [Default is ``"gray50"``].
88+
relative to the foreground frame [Default is ``"4p/-4p"``] and shade
89+
sets the fill style to use for shading [Default is ``"gray50"``].
9090
truncate : list or str
9191
*zlo*/*zhi*.
9292
Truncate the incoming CPT so that the lowest and highest z-levels are

0 commit comments

Comments
 (0)