Skip to content

Improve the docstring of the pygmt package - #1016

Merged
seisman merged 13 commits into
masterfrom
improve-pygmt-docstring
Mar 10, 2021
Merged

Improve the docstring of the pygmt package#1016
seisman merged 13 commits into
masterfrom
improve-pygmt-docstring

Conversation

@michaelgrund

@michaelgrund michaelgrund commented Mar 7, 2021

Copy link
Copy Markdown
Member

Based on #1012, here's a first suggestion (partly influced by the pandas docstring) for improving the docstring which is displayed when running import pygmt followed by help(pygmt). Open for discussions, improvements and other ideas.

Description of proposed changes

Fixes #

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.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

Based on #1012, here's a first suggestion for improving the docstring which is displayed when running ``import pygmt``  followed by ``help(pygmt)``.
@michaelgrund michaelgrund added the documentation Improvements or additions to documentation label Mar 7, 2021
@michaelgrund michaelgrund added this to the 0.3.1 milestone Mar 7, 2021
@michaelgrund michaelgrund linked an issue Mar 7, 2021 that may be closed by this pull request
@michaelgrund
michaelgrund marked this pull request as draft March 7, 2021 17:52
@michaelgrund

Copy link
Copy Markdown
Member Author

/format

@michaelgrund

Copy link
Copy Markdown
Member Author

Do we need the pylint: disable=missing-docstring in the first line ?

@michaelgrund

Copy link
Copy Markdown
Member Author

/format

@michaelgrund
michaelgrund requested a review from a team March 7, 2021 19:19
Comment thread pygmt/__init__.py Outdated
Comment thread pygmt/__init__.py Outdated
Comment thread pygmt/__init__.py Outdated
Comment thread pygmt/__init__.py Outdated
Comment thread pygmt/__init__.py
Comment thread pygmt/__init__.py Outdated
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@seisman
seisman marked this pull request as ready for review March 9, 2021 16:08

@seisman seisman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me.

@core-man

core-man commented Mar 9, 2021

Copy link
Copy Markdown
Member

Great~ I think it's good.

@maxrjones maxrjones left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice! Just one tiny comment

Comment thread pygmt/__init__.py Outdated
Co-authored-by: Meghan Jones <meghanj@hawaii.edu>
@seisman
seisman merged commit 88d5b0e into master Mar 10, 2021
@seisman
seisman deleted the improve-pygmt-docstring branch March 10, 2021 04:28
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Yao Jiayuan <coreman.seism@gmail.com>
Co-authored-by: Meghan Jones <meghanj@hawaii.edu>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve the docstring of the pygmt package

5 participants