Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend Figure.timestamp and remove timestamp (U) alias from all plotting methods #2135

Merged
merged 14 commits into from
Mar 5, 2023
11 changes: 11 additions & 0 deletions pygmt/helpers/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,17 @@ def new_module(*args, **kwargs):
f"Use long-form parameter '{long_alias}' instead."
)
warnings.warn(msg, category=SyntaxWarning, stacklevel=2)

# timestamp (U) is deprecated since v0.8.0.
seisman marked this conversation as resolved.
Show resolved Hide resolved
if "U" in kwargs or "timestamp" in kwargs:
if "timestamp" in kwargs:
kwargs["U"] = kwargs.pop("timestamp")
msg = (
"Parameter 'U' and 'timestamp' is deprecated since v0.8.0. "
"Use Figure.timestamp() instead."
seisman marked this conversation as resolved.
Show resolved Hide resolved
)
warnings.warn(msg, category=SyntaxWarning, stacklevel=2)

return module_func(*args, **kwargs)

new_module.aliases = aliases
Expand Down
2 changes: 0 additions & 2 deletions pygmt/src/basemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
F="box",
Td="rose",
Tm="compass",
U="timestamp",
V="verbose",
X="xshift",
Y="yshift",
Expand Down Expand Up @@ -82,7 +81,6 @@ def basemap(self, **kwargs):
compass : str
Draws a map magnetic rose on the map at the location defined by the
reference and anchor points
{timestamp}
{verbose}
{xyshift}
{panel}
Expand Down