Skip to content

Improve the docstring of the pygmt package #1012

@seisman

Description

@seisman
import pygmt
help(pygmt)

If you run the above commands in a Python interpreter, you will see a help page like:

Help on package pygmt:

NAME
    pygmt

DESCRIPTION
    # pylint: disable=missing-docstring
    #
    # The main API for PyGMT.
    #
    # All of PyGMT is operated on a "modern mode session" (new to GMT6). When you
    # import the pygmt library, a new session will be started automatically. The
    # session will be closed when the current Python process terminates. Thus, the
    # Python API does not expose the `gmt begin` and `gmt end` commands.

PACKAGE CONTENTS
    clib (package)
    datasets (package)
    exceptions
    figure
    helpers (package)
    modules
    session_management
    sphinx_gallery
    src (package)
    tests (package)

The description part is not helpful.

For comparison, you can run help(numpy), help(pandas) or help(matplotlib) to see what the docstrings of other packages look like.

We should improve the docstring of the pygmt package by updating https://github.com/GenericMappingTools/pygmt/blob/master/pygmt/__init__.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions