The rstGeneration module

The rstGeneration module contains classes and functions which provide the ability to generate a single reStructured text formatted file for each of the modules contained within a main Python project.

The RstOptions class

Inheritance diagram of pyamp.documentation.rstGeneration.RstOptions

class pyamp.documentation.rstGeneration.RstOptions(inheritance=True, overwrite=False, extension='.rst', ignoredModules=None, modifiedDirectory='_modified')[source]

The RstOptions class encapsulates all the options that can be passed to the RST generation class to configure the generated output.

  • inheritance – True to include inheritance diagrams for each class

  • overwrite – True to overwrite existing files

  • extension – The extension to use for generated files

  • ingoreModules – The list of modules to ignore (i.e., no RST files

    will be created for these modules)

  • modifiedDirectory – The modified directory

The RstModuleDirectory class

Inheritance diagram of pyamp.documentation.rstGeneration.RstModuleDirectory

class pyamp.documentation.rstGeneration.RstModuleDirectory(moduleName, subFiles, subDirectories, logData=None)[source]

The RstModuleDirectory encapsulates the functionality of writing a file in reStructured text format for a given Python module which is a directory containing one or more Python sub-modules.

  • moduleName – The name of the module which contains this module
  • subFiles – The list of sub-file modules for this module
  • subDirectories – The list of sub-directory module for this module
  • – The LogData object

The RstBase class

Inheritance diagram of pyamp.documentation.rstGeneration.RstBase

class pyamp.documentation.rstGeneration.RstBase(moduleName, logData=None)[source]

The RstBase class provides the base functionality used to create RstFiles based off of Python modules. It takes a module name and provides the ability to write the output in reStructured text format.

  • moduleName – The name of the module which contains this module
  • logData – The LogData object
contentFunctions

The contentFunctions property should be set to a list of class function names. These functions will be called, in order, to return a list of lines to add to the final generated file.

Each content function takes an RstOptions object as its only parameter, and should return a list of strings.

write(directory, options)[source]

Generate the reStructured text formatted file for this Python module.

  • directory – The output directory in which to write the file
  • options – The RstOptions to use when generating the file

The RstModule class

Inheritance diagram of pyamp.documentation.rstGeneration.RstModule

class pyamp.documentation.rstGeneration.RstModule(moduleName, logData=None)[source]

The RstModule class encapsulates the functionality of writing a file in reStructured text format for a given Python module which is a single Python file.

  • moduleName – The name of the module which contains this module
  • logData – The LogData object

Table Of Contents

Previous topic

The documentation module

Next topic

The logging module

This Page