Skip to content

Commit 89100c9

Browse files
authored
pygmt.surface: Remove parameter 'outfile', use 'outgrid' instead (#1976)
1 parent 5ea5bb7 commit 89100c9

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

pygmt/src/surface.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
GMTTempFile,
88
build_arg_string,
99
check_data_input_order,
10-
deprecate_parameter,
1110
fmt_docstring,
1211
kwargs_to_strings,
1312
use_alias,
@@ -18,7 +17,6 @@
1817

1918

2019
@fmt_docstring
21-
@deprecate_parameter("outfile", "outgrid", "v0.5.0", remove_version="v0.7.0")
2220
@check_data_input_order("v0.5.0", remove_version="v0.7.0")
2321
@use_alias(
2422
I="spacing",

pygmt/tests/test_surface.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -145,25 +145,3 @@ def test_surface_with_outgrid_param(data, region, spacing, expected_grid):
145145
assert os.path.exists(path=tmpfile.name) # check that outgrid exists at path
146146
with xr.open_dataarray(tmpfile.name) as grid:
147147
check_values(grid, expected_grid)
148-
149-
150-
def test_surface_deprecate_outfile_to_outgrid(data, region, spacing, expected_grid):
151-
"""
152-
Make sure that the old parameter "outfile" is supported and it reports a
153-
warning.
154-
"""
155-
with pytest.warns(expected_warning=FutureWarning) as record:
156-
data = data.values # convert pandas.DataFrame to numpy.ndarray
157-
with GMTTempFile(suffix=".nc") as tmpfile:
158-
output = surface(
159-
data=data,
160-
spacing=spacing,
161-
region=region,
162-
outfile=tmpfile.name,
163-
verbose="e", # Suppress warnings for IEEE 754 rounding
164-
)
165-
assert output is None # check that output is None since outfile is set
166-
assert os.path.exists(path=tmpfile.name) # check that file exists at path
167-
with xr.open_dataarray(tmpfile.name) as grid:
168-
check_values(grid, expected_grid)
169-
assert len(record) == 1 # check that only one warning was raised

0 commit comments

Comments
 (0)