streamalert icon indicating copy to clipboard operation
streamalert copied to clipboard

Improvement [docs]: Build API reference docs with sphinx

Open ryandeivert opened this issue 7 years ago • 0 comments

Background

Determine whether it would be beneficial to build reference documentation with sphinx that could get published on RTD.

Description

Other projects publish reference guides (see: here) that can be helpful for users to both understand the code base and to use your modules more easily.

The main difference between our project and the one linked to is that we have chosen to use Google style docstrings in lieu of the Sphinx style docstrings.

The good news is, there is a sphinx extension by the name of sphinxcontrib.napoleon that adds support for parsing Google style docstrings to build reference docs.

Desired Change

  1. Clean up the code base so that:
  • [ ] Only methods or properties that should be publicly accessible on a class are defined as such. All methods/properties that should not have an external interface should be prefixed with _. In most of our classes, the vast majority of the methods can be converted to protected or private, as there are very few functions that need to be accessible outside of the class itself.
  • [ ] All public method docstrings are complete and accurate.
  1. Generate reference docs on the most relevant classes/methods that users may interact with using a combination of our current sphinx documentation and the sphinxcontrib.napoleon extension. We can choose what modules get docs generated for them through the rst .. automodule:: directive.

ryandeivert avatar Jan 17 '18 19:01 ryandeivert