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

Use extlinks for linking GMT docs, and get rid of gmt_module_docs decorator #294

Merged
merged 4 commits into from
Mar 15, 2019

Conversation

seisman
Copy link
Member

@seisman seisman commented Mar 14, 2019

Description of proposed changes

In this PR, I use extlinks to insert links to GMT documentation, instead of the gmt_module_docs decorator.

:gmt-docs:`coast.html`

will be rendered as https://www.generic-mapping-tools.org/gmt/latest/coast.html.

It's more flexible than the decorator and it can link to any GMT documentations. Thus, we can get rid of the gmt_module_docs decorator.

The only side-effect I know is that help(pygmt.Figure.coast) in interactive mode shows the raw RST string, rather then the link to GMT site.

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

@seisman seisman changed the title WIP: Use extlinks for linking GMT docs, and get rid of gmt_module_docs decorator Use extlinks for linking GMT docs, and get rid of gmt_module_docs decorator Mar 15, 2019
@seisman seisman requested a review from leouieda March 15, 2019 00:06
Copy link
Member

@leouieda leouieda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 perfect! I hadn't thought of doing it only on the sphinx side. This is fine and users of the raw docstring don't usually click on many links anyway. Better than having that messy decorator.

@leouieda leouieda merged commit 2b802d6 into master Mar 15, 2019
@leouieda leouieda deleted the link-gmt-docs branch March 15, 2019 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants