Skip to content

Commit 82e1fe2

Browse files
committed
Merge branch 'main' into refactor-build_arg_string
2 parents 6c6dc3e + 0aa04d7 commit 82e1fe2

File tree

12 files changed

+61
-32
lines changed

12 files changed

+61
-32
lines changed

.github/workflows/check-links.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
path: documentation
2727

2828
- name: Link Checker
29-
uses: lycheeverse/lychee-action@v1.3.2
29+
uses: lycheeverse/lychee-action@v1.4.1
3030
with:
3131
# 429: Too many requests
3232
args: >
@@ -56,7 +56,7 @@ jobs:
5656
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
5757

5858
- name: Create Issue From File
59-
uses: peter-evans/create-issue-from-file@v3
59+
uses: peter-evans/create-issue-from-file@v4
6060
with:
6161
title: Link Checker Report on ${{ steps.date.outputs.date }}
6262
content-filepath: ./lychee/out.md

.github/workflows/ci_tests_dev.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
with:
6868
token: ${{ steps.generate-token.outputs.token }}
6969
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
70-
ref: ${{ github.event.pull_request.head.sha }}
70+
ref: ${{ github.event.client_payload.pull_request.head.ref }}
7171
# fecth all history so that setuptools-scm works
7272
fetch-depth: 0
7373

@@ -162,7 +162,7 @@ jobs:
162162
path: tmp-test-dir-with-unique-name
163163

164164
- name: Add reaction
165-
uses: peter-evans/create-or-update-comment@v1
165+
uses: peter-evans/create-or-update-comment@v2
166166
if: github.event_name == 'repository_dispatch'
167167
with:
168168
token: ${{ steps.generate-token.outputs.token }}

.github/workflows/dvc-diff.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
echo ::set-output name=report::$report
9696
9797
- name: Find comment with image diff report
98-
uses: peter-evans/find-comment@v1.3.0
98+
uses: peter-evans/find-comment@v2.0.0
9999
id: fc
100100
with:
101101
issue-number: ${{ github.event.pull_request.number }}
@@ -104,14 +104,14 @@ jobs:
104104

105105
- name: Create comment with image diff report
106106
if: steps.fc.outputs.comment-id == ''
107-
uses: peter-evans/create-or-update-comment@v1.4.4
107+
uses: peter-evans/create-or-update-comment@v2
108108
with:
109109
issue-number: ${{ github.event.pull_request.number }}
110110
body: ${{ steps.image-diff.outputs.report }}
111111

112112
- name: Update comment with new image diff report
113113
if: steps.fc.outputs.comment-id != ''
114-
uses: peter-evans/create-or-update-comment@v1.4.4
114+
uses: peter-evans/create-or-update-comment@v2
115115
with:
116116
comment-id: ${{ steps.fc.outputs.comment-id }}
117117
body: ${{ steps.image-diff.outputs.report }}

.github/workflows/format-command.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
token: ${{ steps.generate-token.outputs.token }}
2020
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
21-
ref: ${{ github.event.pull_request.head.sha }}
21+
ref: ${{ github.event.client_payload.pull_request.head.ref }}
2222

2323
# Setup Python environment
2424
- uses: actions/setup-python@v3.0.0
@@ -43,7 +43,7 @@ jobs:
4343
fi
4444
4545
- name: Add reaction
46-
uses: peter-evans/create-or-update-comment@v1
46+
uses: peter-evans/create-or-update-comment@v2
4747
with:
4848
token: ${{ steps.generate-token.outputs.token }}
4949
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
# Change setuptools-scm local_scheme to "no-local-version" so the
4444
# local part of the version isn't included, making the version string
4545
# compatible with PyPI.
46-
sed --in-place "s/node-and-date/no-local-version/g" setup.py
46+
sed --in-place "s/node-and-date/no-local-version/g" pyproject.toml
4747
4848
- name: Build source and wheel distributions
4949
run: |

.github/workflows/slash-command-dispatch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
private_key: ${{ secrets.APP_PRIVATE_KEY }}
1818

1919
- name: Slash Command Dispatch
20-
uses: peter-evans/slash-command-dispatch@v2
20+
uses: peter-evans/slash-command-dispatch@v3
2121
with:
2222
token: ${{ steps.generate-token.outputs.token }}
2323
commands: |

AUTHORS.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ The following people have contributed code and/or documentation to the project
99
(alphabetical by name) and are considered to be "PyGMT Developers":
1010

1111
* [Abhishek Anant](https://twitter.com/itsabhianant) | [0000-0002-5751-2010](https://orcid.org/0000-0002-5751-2010) | Unaffiliated
12-
* [Dongdong Tian](https://seisman.info/) | [0000-0001-7967-1197](https://orcid.org/0000-0001-7967-1197) | China University of Geosciences
13-
* [Jamie Quinn](http://jamiejquinn.com) | [0000-0002-0268-7032](https://orcid.org/0000-0002-0268-7032) | University College London
14-
* [Jiayuan Yao](https://github.com/core-man) | [0000-0001-7036-4238](https://orcid.org/0000-0001-7036-4238) | Nanyang Technological University
15-
* [Kathryn Materna](https://github.com/kmaterna) | [0000-0002-6687-980X](https://orcid.org/0000-0002-6687-980X) | US Geological Survey
16-
* [Leonardo Uieda](http://www.leouieda.com/) | [0000-0001-6123-9515](https://orcid.org/0000-0001-6123-9515) | University of Liverpool
17-
* [Liam Toney](https://liam.earth/) | [0000-0003-0167-9433](https://orcid.org/0000-0003-0167-9433) | University of Alaska Fairbanks
18-
* [Malte Ziebarth](https://github.com/mjziebarth) | [0000-0002-5190-4478](https://orcid.org/0000-0002-5190-4478) | GFZ German Research Centre for Geosciences
19-
* [Meghan Jones](https://github.com/meghanrjones) | [0000-0003-0180-8928](https://orcid.org/0000-0003-0180-8928) | University of Hawai'i at Mānoa
20-
* [Michael Grund](https://github.com/michaelgrund) | [0000-0001-8759-2018](https://orcid.org/0000-0001-8759-2018) | Innoplexia GmbH
21-
* [Tyler Newton](http://www.tnewton.com/) | [0000-0002-1560-6553](https://orcid.org/0000-0002-1560-6553) | University of Oregon
22-
* [Wei Ji Leong](https://github.com/weiji14) | [0000-0003-2354-1988](https://orcid.org/0000-0003-2354-1988) | The Ohio State University
12+
* [Dongdong Tian](https://seisman.info/) | [0000-0001-7967-1197](https://orcid.org/0000-0001-7967-1197) | China University of Geosciences, China
13+
* [Jamie Quinn](http://jamiejquinn.com) | [0000-0002-0268-7032](https://orcid.org/0000-0002-0268-7032) | University College London, United Kingdom
14+
* [Jiayuan Yao](https://github.com/core-man) | [0000-0001-7036-4238](https://orcid.org/0000-0001-7036-4238) | Nanyang Technological University, Singapore
15+
* [Kathryn Materna](https://github.com/kmaterna) | [0000-0002-6687-980X](https://orcid.org/0000-0002-6687-980X) | US Geological Survey, USA
16+
* [Leonardo Uieda](http://www.leouieda.com/) | [0000-0001-6123-9515](https://orcid.org/0000-0001-6123-9515) | University of Liverpool, United Kingdom
17+
* [Liam Toney](https://liam.earth/) | [0000-0003-0167-9433](https://orcid.org/0000-0003-0167-9433) | University of Alaska Fairbanks, USA
18+
* [Malte Ziebarth](https://github.com/mjziebarth) | [0000-0002-5190-4478](https://orcid.org/0000-0002-5190-4478) | GFZ German Research Centre for Geosciences, Germany
19+
* [Meghan Jones](https://github.com/meghanrjones) | [0000-0003-0180-8928](https://orcid.org/0000-0003-0180-8928) | University of Hawai'i at Mānoa, USA
20+
* [Michael Grund](https://github.com/michaelgrund) | [0000-0001-8759-2018](https://orcid.org/0000-0001-8759-2018) | Innoplexia GmbH, Germany
21+
* [Tyler Newton](http://www.tnewton.com/) | [0000-0002-1560-6553](https://orcid.org/0000-0002-1560-6553) | University of Oregon, USA
22+
* [Wei Ji Leong](https://github.com/weiji14) | [0000-0003-2354-1988](https://orcid.org/0000-0003-2354-1988) | The Ohio State University, USA
2323
* [William Schlitzer](https://github.com/willschlitzer) | [0000-0002-5843-2282](https://orcid.org/0000-0002-5843-2282) | Unaffiliated
24-
* [Yohai Magen](https://github.com/yohaimagen) | [0000-0002-4892-4013](https://orcid.org/0000-0002-4892-4013) | Tel Aviv University
24+
* [Yohai Magen](https://github.com/yohaimagen) | [0000-0002-4892-4013](https://orcid.org/0000-0002-4892-4013) | Tel Aviv University, Israel

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ authors:
3838
orcid: https://orcid.org/0000-0001-7036-4238
3939
- given-names: Yohai
4040
family-names: Magen
41-
affiliation: Tel Aviv University
41+
affiliation: Tel Aviv University, Israel
4242
orcid: https://orcid.org/0000-0002-4892-4013
4343
- given-names: Kathryn
4444
family-names: Materna
@@ -58,7 +58,7 @@ authors:
5858
orcid: https://orcid.org/0000-0002-5190-4478
5959
- given-names: Jamie
6060
family-names: Quinn
61-
affiliation: University College London
61+
affiliation: University College London, United Kingdom
6262
orcid: https://orcid.org/0000-0002-0268-7032
6363
- given-names: Paul
6464
family-names: Wessel

pygmt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def _get_gmt_version():
160160
"machine": platform.platform(),
161161
}
162162

163-
deps = ["numpy", "pandas", "xarray", "netCDF4", "packaging"]
163+
deps = ["numpy", "pandas", "xarray", "netCDF4", "packaging", "geopandas"]
164164

165165
print("PyGMT information:")
166166
print(f" version: {__version__}")

pygmt/tests/test_grdfill.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66
import numpy as np
77
import pytest
88
import xarray as xr
9-
from pygmt import grdfill, load_dataarray
9+
from packaging.version import Version
10+
from pygmt import clib, grdfill, load_dataarray
1011
from pygmt.exceptions import GMTInvalidInput
1112
from pygmt.helpers import GMTTempFile
1213
from pygmt.helpers.testing import load_static_earth_relief
1314

15+
with clib.Session() as _lib:
16+
gmt_version = Version(_lib.info["version"])
17+
1418

1519
@pytest.fixture(scope="module", name="grid")
1620
def fixture_grid():
@@ -82,6 +86,28 @@ def test_grdfill_dataarray_out(grid, expected_grid):
8286
xr.testing.assert_allclose(a=result, b=expected_grid)
8387

8488

89+
@pytest.mark.skipif(
90+
gmt_version < Version("6.4.0"),
91+
reason="Upstream bug/crash fixed in https://github.com/GenericMappingTools/gmt/pull/6418.",
92+
)
93+
def test_grdfill_asymmetric_pad(grid, expected_grid):
94+
"""
95+
Test grdfill using a region that includes the edge of the grid.
96+
97+
Regression test for
98+
https://github.com/GenericMappingTools/pygmt/issues/1745.
99+
"""
100+
result = grdfill(grid=grid, mode="c20", region=[-55, -50, -24, -16])
101+
# check information of the output grid
102+
assert isinstance(result, xr.DataArray)
103+
assert result.gmt.gtype == 1 # Geographic grid
104+
assert result.gmt.registration == 1 # Pixel registration
105+
# check information of the output grid
106+
xr.testing.assert_allclose(
107+
a=result, b=expected_grid.sel(lon=slice(-55, -50), lat=slice(-24, -16))
108+
)
109+
110+
85111
def test_grdfill_file_out(grid, expected_grid):
86112
"""
87113
Test grdfill with an outgrid set.

0 commit comments

Comments
 (0)