Documentation

Overview

Teaching: 30 min
Exercises: 40 min
Questions
  • How can we document out module?

Objectives
  • Run the lesson checking script and interpret its output correctly.

  • Explain in-code documentation

  • Explain documentation tools like Read The Docs

This episode discusses documentation strategies.

Documentation must be provided to allow for use, development, and maintenance of the code. Documentation is often overlooked by developers since it is tedious and boring, however good documentation is an extremely good habit to develop.

The documentation typically involves several components:

Documentation should be kept up to date with changes in the code, which is not an easy task for large, fast-moving codebases. However, slightly out-of-date documentation is generally preferable to no documentation.

It is recommended that the examples provided within the documentation are compiled and/or run regularly (if possible, as part of the testing of the software) to ensure that it does not become neglected and out-of-date, confusing users.

In-code documentation

README documentation

RTD for complex modules

When you want to improve your documentation strategies use RTD

Key Points

  • Some documentation is better than no documentation