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

Add documentation for common options/parameter in the "Technical Reference" section #3843

Open
4 of 28 tasks
seisman opened this issue Mar 11, 2025 · 2 comments
Open
4 of 28 tasks
Labels
documentation Improvements or additions to documentation help wanted Helping hands are appreciated

Comments

@seisman
Copy link
Member

seisman commented Mar 11, 2025

GMT modules have common options (e.g., -J/-R/-V), which are aliased to standardized parameters in PyGMT (e.g., projection, region, verbose). Currently, the docstrings for some parameters are lengthy and take up a significant portion of the documentation pages, making it harder to focus on module-specific options.

To improve readability, I propose moving the detailed explanations of these common parameters to a dedicated page in the "Technical Reference" section. In the wrapper documentation, their descriptions can be condensed, with a link to the full explanation.

For example, currently, the verbose has docstrings like below

Image

and it can be simplified to:

verbose  
    Select verbosity level. [See detailed explanation.]

This approach reduces the documentation length of wrappers, and makes wrapper-specific parameters more prominent.

TODO list

Here is a complete list of GMT common options (https://docs.generic-mapping-tools.org/latest/std-opts.html).

@seisman seisman added the discussions Need more discussion before taking further actions label Mar 11, 2025
@yvonnefroehlich
Copy link
Member

yvonnefroehlich commented Mar 14, 2025

This approach seems to be similar to what is done in the GMT docs:
Image

If I understand it correctly, this would replace the entries in the decorators file. And we can consider this to avoid writing duplicate code in Figure.meca and Figure.cope.

@seisman
Copy link
Member Author

seisman commented Mar 18, 2025

If I understand it correctly, this would replace the entries in the decorators file.

No, it won't replace the entries but can simplify them.

And we can consider this to avoid writing duplicate code in Figure.meca and Figure.cope.

This "Common parameters" page should only be used for common parameters shared by all GMT modules, so it won't solve the issue for Figure.meca/Figure.coupe.

@seisman seisman added documentation Improvements or additions to documentation help wanted Helping hands are appreciated and removed discussions Need more discussion before taking further actions labels Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Helping hands are appreciated
Projects
None yet
Development

No branches or pull requests

2 participants