Skip to content

Commit

Permalink
Figure.histogram and pygmt.info: Remove parameter 'table', use 'data'…
Browse files Browse the repository at this point in the history
… instead (#1975)
  • Loading branch information
seisman authored Jun 24, 2022
1 parent 89100c9 commit e8ea414
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 27 deletions.
9 changes: 1 addition & 8 deletions pygmt/src/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,10 @@
Histogram - Create a histogram
"""
from pygmt.clib import Session
from pygmt.helpers import (
build_arg_string,
deprecate_parameter,
fmt_docstring,
kwargs_to_strings,
use_alias,
)
from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias


@fmt_docstring
@deprecate_parameter("table", "data", "v0.5.0", remove_version="v0.7.0")
@use_alias(
A="horizontal",
B="frame",
Expand Down
2 changes: 0 additions & 2 deletions pygmt/src/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
from pygmt.helpers import (
GMTTempFile,
build_arg_string,
deprecate_parameter,
fmt_docstring,
kwargs_to_strings,
use_alias,
)


@fmt_docstring
@deprecate_parameter("table", "data", "v0.5.0", remove_version="v0.7.0")
@use_alias(
C="per_column",
I="spacing",
Expand Down
17 changes: 0 additions & 17 deletions pygmt/tests/test_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,6 @@ def test_info():
assert output == expected_output


def test_info_deprecate_table_to_data():
"""
Make sure that the old parameter "table" is supported and it reports a
warning.
"""
with pytest.warns(expected_warning=FutureWarning) as record:
output = info(table=POINTS_DATA) # pylint: disable=no-value-for-parameter
expected_output = (
f"{POINTS_DATA}: N = 20 "
"<11.5309/61.7074> "
"<-2.9289/7.8648> "
"<0.1412/0.9338>\n"
)
assert output == expected_output
assert len(record) == 1 # check that only one warning was raised


@pytest.mark.parametrize(
"table",
[
Expand Down

0 comments on commit e8ea414

Please sign in to comment.