reportcompiler.documents

documents.py

This module is responsible for the representation and handling of document specifications.

Classes

class reportcompiler.documents.DocumentSpecification(dir_path=None, repo_url=None, repo_branch='master', repo_relative_path='.', create=False)

Represents a document specification with its file structure and configuration.

Inheritance

Inheritance diagram of DocumentSpecification
fetch_allowed_var_values(doc_param)

Returns the allowed values for the document variables for the current document specification if specified in the configuration file.

Parameters:doc_param (OrderedDict) – Document variable to check, necessary when checking dependent variables
Returns:Dictionary with possible values of the variables specified in the document specification configuration. Variables dependent on others missing from doc_param are returned with value None.
Return type:dict
generate(doc_params=None, n_doc_workers=2, n_frag_workers=2, debug_mode=False, log_level=10)

Generates the documents with document variables doc_params from the current document specification.

Parameters:
  • doc_params (OrderedDict|list) – Document variables to generate documents
  • n_doc_workers (int) – Number of concurrent document-generating threads
  • n_frag_workers (int) – Number of concurrent fragment-generating threads (within each document-generating thread)
  • log_level (int) – Log level (e.g. logging.DEBUG, logging.WARNING, logging.ERROR, …)
main_template

Returns the main template filename.

Returns:main template filename
Return type:str