Skip to content

Commit 3d0f879

Browse files
pygmt.x2sys_cross: Deprecate parameter trackvalues to track_values (Will be removed in v0.20.0) (#4282)
1 parent cc7e18e commit 3d0f879

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

pygmt/src/x2sys_cross.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from pygmt.helpers import (
1717
build_arg_list,
1818
data_kind,
19+
deprecate_parameter,
1920
fmt_docstring,
2021
unique_name,
2122
use_alias,
@@ -58,6 +59,7 @@ def tempfile_from_dftrack(track, suffix):
5859

5960

6061
@fmt_docstring
62+
@deprecate_parameter("trackvalues", "track_values", "v0.18.0", remove_version="v0.20.0")
6163
@use_alias(
6264
A="combitable",
6365
C="runtimes",
@@ -67,7 +69,7 @@ def tempfile_from_dftrack(track, suffix):
6769
T="tag",
6870
Q="coe",
6971
W="numpoints",
70-
Z="trackvalues",
72+
Z="track_values",
7173
)
7274
def x2sys_cross(
7375
tracks=None,
@@ -182,7 +184,7 @@ def x2sys_cross(
182184
Give the maximum number of data points on either side of the crossover
183185
to use in the spline interpolation [Default is 3].
184186
185-
trackvalues : bool
187+
track_values : bool
186188
Report the values of each track at the crossover [Default reports the
187189
crossover value and the mean value].
188190

pygmt/tests/test_x2sys_cross.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,14 +267,14 @@ def test_x2sys_cross_region_interpolation_numpoints():
267267

268268

269269
@pytest.mark.usefixtures("mock_x2sys_home")
270-
def test_x2sys_cross_trackvalues():
270+
def test_x2sys_cross_track_values():
271271
"""
272-
Test that x2sys_cross's trackvalues (Z) argument work.
272+
Test that x2sys_cross's track_values (Z) argument work.
273273
"""
274274
with TemporaryDirectory(prefix="X2SYS", dir=Path.cwd()) as tmpdir:
275275
tag = Path(tmpdir).name
276276
x2sys_init(tag=tag, fmtfile="xyz", force=True)
277-
output = x2sys_cross(tracks=["@tut_ship.xyz"], tag=tag, trackvalues=True)
277+
output = x2sys_cross(tracks=["@tut_ship.xyz"], tag=tag, track_values=True)
278278

279279
assert isinstance(output, pd.DataFrame)
280280
if platform.machine() in {"aarch64", "arm64"}:

0 commit comments

Comments
 (0)