-
Notifications
You must be signed in to change notification settings - Fork 232
Add inline example for grdcut #1689
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
Conversation
Co-authored-by: Meghan Jones <[email protected]>
The example looks nice! Do you want to figure out the CI separation mentioned here as part of this RFC? |
@meghanrjones I decided to use |
It's nice that the doctest comments are not included in the rendered html docs: https://pygmt-5z64fvi6h-gmt.vercel.app/api/generated/pygmt.grdcut.html#pygmt.grdcut. |
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.
Looks good to me!
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.
The example looks nice!
Do you want to figure out the CI separation mentioned here as part of this RFC?@meghanrjones I decided to use
# doctest: +SKIP
; I think the better long term solution is to edit the makefile, but I don't want to go outside the scope of this PR.It's nice that the doctest comments are not included in the rendered html docs: https://pygmt-5z64fvi6h-gmt.vercel.app/api/generated/pygmt.grdcut.html#pygmt.grdcut.
Wow, very handy that they hide the # doctest: +SKIP
comment! So much for overthinking. Let's hope that Sphinx keeps this as a 'feature' rather than a 'bug' 😆
Is there any way to skip the entire code block using a single directive? |
The example I found online involves wrapping the example in a function, and then calling that function but then adding |
Example to create a new grid from an input grid using pygmt.grdcut. Co-authored-by: Meghan Jones <[email protected]>Create a new grid from an input grid
This PR adds an inline code example to the docstring for
grdcut
.Addresses #1686
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 commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version