DocumentingCode - snoplusuk/echidna GitHub Wiki

Documenting code

Good documentation should include:

  • A short (one sentence) description of the module/class/method function.
  • And then additional information ...
  • For modules:
    • If an example script is included, Examples detailing usage instuctions
  • For classes:
    • List or Args in __init__
    • List of Attributes
  • For methods only:
    • Any additional Attributes
  • For methods and functions:
    • List of Args
    • What it Returns
    • Any Exceptions that may be raised
  • Checkout https://sphinxcontrib-napoleon.readthedocs.org/en/latest/example_google.html for many more examples of good documentation.