-
Notifications
You must be signed in to change notification settings - Fork 224
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
Figure.grdcontour: Deprecate parameter "interval" to "levels" (FutureWarning since v0.12.0, will be removed in v0.16.0) #3209
Conversation
interval=250, | ||
grid=grid, | ||
) | ||
fig.grdcontour(annotation=1000, levels=250, grid=grid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please update this example to always put grid
as the first parameter?
fig.grdcontour(annotation=1000, levels=250, grid=grid) | |
fig.grdcontour(grid=grid, annotation=1000, levels=250) |
fig.grdcontour( | ||
annotation=1000, | ||
interval=250, | ||
levels=250, | ||
grid=grid, | ||
limit=[-4000, -2000], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code block and many others can be rewritten into a single line after we set the line length limit to 88 characters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I should find the time to make both updates. Should these be included in this PR, or better in separate PR and have this PR for the deprecation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Let's keep this PR small.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just submitted PR #3212 for working on this.
Description of proposed changes
This PR deprecate the parameter
interval
tolevels
(C) forFigur.grdcontour
.Then this alias is consistent with
Figure.contour
, the GMT documentation, and matplolib (details on the discussion at #1042 (comment)).Fixes #1042 (partly)
Preview: https://pygmt-dev--3209.org.readthedocs.build/en/3209/api/generated/pygmt.Figure.grdcontour.html
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash command is:
/format
: automatically format and lint the code