Page MenuHomeSoftware Heritage

Consistent documentation for Python modules
Closed, MigratedEdits Locked

Description

(Most of) Our python modules have extensive docstrings, but no way of rendering them as webpages, which is useful to get a quick reference.

I did a quick test of http://sphinxcontrib-napoleon.readthedocs.org/en/latest/ which seems to not make a complete mess of our Google-style docstrings.

We need to decide on a consistent way of generating/writing our technical documentation, and then apply it.

Event Timeline

olasd changed the visibility from "All Users" to "Public (No Login Required)".May 13 2016, 5:09 PM
zack changed the task status from Open to Work in Progress.Aug 30 2017, 2:04 PM
zack claimed this task.

This is now partly done thanks to the following ingredients:

  • the new swh-docs module, that contains
    1. a swh.docs python module that export a common Sphinx configuration that all our modules can use, possibly overriding it on a local basis
    2. logics for fetching Sphinx documents from all other Python modules and generating a single (html, or other) documentation bundle
  • a skeleton in swh-py-template of a docs/ dir, that allows modules to generate their own piece of documentation, independently from the single big documentation bundle
    • the skeleton has been applied and committed in all our modules
    • the skeleton uses behind the scenes sphinx-apidoc to generate the .rst documents that correspond to our exported python modules
    • additional, module-specific documentation can be locally added in each module, following the usual Sphinx conventions, only the "apidoc" subdir is autogenerated

What is missing is… fixing all Sphinx errors that our docstrings, which up to now were absolutely not tested :-), spit out.