OMS-NetZero / FAIR-pro

Finite Amplitude Impulse-Response simple climate-carbon-cycle model repository with more functions for users who are comfortable with Python
Apache License 2.0
3 stars 0 forks source link

Docstrings #3

Open znicholls opened 7 years ago

znicholls commented 7 years ago

NOTES FROM PEP 257 https://www.python.org/dev/peps/pep-0257/ The docstring for a module should generally list the classes, exceptions and functions (and any other objects) that are exported by the module, with a one-line summary of each. (These summaries generally give less detail than the summary line in the object's docstring.) The docstring for a package (i.e., the docstring of the package's init.py module) should also list the modules and subpackages exported by the package.

The docstring for a class should summarize its behavior and list the public methods and instance variables. If the class is intended to be subclassed, and has an additional interface for subclasses, this interface should be listed separately (in the docstring). The class constructor should be documented in the docstring for its init method. Individual methods should be documented by their own docstring.

The docstring for a function or method should summarize its behavior and document its arguments, return value(s), side effects, exceptions raised, and restrictions on when it can be called (all if applicable). Optional arguments should be indicated. It should be documented whether keyword arguments are part of the interface.