-
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
Add inline code examples in data processing module docstrings #1686
Comments
Regarding the CI issue raised in #1666 (comment), here are two options:
|
@GenericMappingTools/pygmt-maintainers Should this only be for data processing modules that can't be as easily demonstrated as a plotting function, or should there be in-line examples for all of our modules? My vote is for all of them. |
Sounds good to me. |
Ok with doing inline examples for all, but maybe prioritize those that don't already have a gallery example first. E.g. don't do |
Looking through the examples in the GMT documentation and PyGMT tests, a few of them call remote datasets without using a PyGMT function (e.g. |
For tests, IMO it doesn't matter much. For user-facing examples I think it would be better to update |
Are there any gridded datasets with holes in them to use for an example for |
Looking through https://oceania.generic-mapping-tools.org/cache/, |
Thanks @meghanrjones! |
There's now a better file to use - |
As first discussed in this comment, module docstrings should contain inline code examples to show a working example of the module with the correct syntax without needing to find an example page.
To prevent example functions from being run in tests, add
_doctest_skip__ = [MODULE NAME]
under the import statements.Are you willing to help implement and maintain this feature? Yes
The text was updated successfully, but these errors were encountered: