xicsrt_doc

xicsrt.tools.xicsrt_doc

A set of tools to help with automatic API documentation of XICSRT.

Description

XICSRT uses sphinx for documentation, and API docs are based on the idea of code self documentation though python doc strings. This module contains a set of decorators and helper function to aid in self documentation.

The most important part of this module is the @dochelper decorator which should be used for all element classes.

Todo

  • The config docstrings should all be indented follow the help() standard.
  • Would it be helpful to show which inherited class the options came from?
dochelper(cls)[source]

A functional wrapper for the DocHelper class. Intended to be used as a decorator.

This decorator does the following:

  1. Adds a ‘Configuration Options’ section to the class docstring that contains all options defined in default_config and any class ancestors.
class DocHelper(cls)[source]

A class to help generate docstrings for XICSRT.

This is expected to be used through the @dochelper class decorator.

update_class_docstring(cls)[source]

Update the class docstring. This method does the following: 1. Creates a new section ‘Configuration Options’ which contains

combined documentation for all config options defined in any ancestor.

Private Members