module documentation

Generate the API docs using pydoctor to be integrated into Sphinx build system.

This was designed to generate pydoctor HTML files as part of the Read The Docs build process.

Inside the Sphinx conf.py file you need to define the following configuration options:

  • pydoctor_url_path - defined the URL path to the API documentation You can use {rtd_version} to have the URL automatically updated based on Read The Docs build.
  • (private usage) a mapping with values URL path definition. Make sure each definition will produce a unique URL.
  • pydoctor_args - Sequence with all the pydoctor command line arguments used to trigger the build.
    • (private usage) a mapping with values as sequence of pydoctor command line arguments.

The following format placeholders are resolved for pydoctor_args at runtime:

  • {outdir} - the Sphinx output dir

You must call pydoctor with --quiet argument as otherwise any extra output is converted into Sphinx warnings.

Function on_build_finished Called when Sphinx build is done.
Function on_builder_inited Called to build the API documentation HTML files and inject our own intersphinx inventory object.
Function setup Called by Sphinx when the extension is initialized.
Variable logger Undocumented
Function _get_arguments Return the resolved arguments for pydoctor build.
Function _run_pydoctor Call pydoctor with arguments.
def on_build_finished(app: Sphinx, exception: Exception): (source)

Called when Sphinx build is done.

def on_builder_inited(app: Sphinx): (source)

Called to build the API documentation HTML files and inject our own intersphinx inventory object.

def setup(app: Sphinx) -> Mapping[str, Any]: (source)

Called by Sphinx when the extension is initialized.

Returns
Mapping[str, Any]The extension version and runtime options.

Undocumented

def _get_arguments(arguments: Sequence[str], placeholders: Mapping[str, str]) -> Sequence[str]: (source)

Return the resolved arguments for pydoctor build.

Parameters
arguments:Sequence[str]Sequence of proto arguments used to call pydoctor.
placeholders:Mapping[str, str]Undocumented
Returns
Sequence[str]Sequence with actual acguments use to call pydoctor.
def _run_pydoctor(name: str, arguments: Sequence[str]): (source)

Call pydoctor with arguments.

Parameters
name:strA human-readable description of this pydoctor build.
arguments:Sequence[str]Command line arguments used to call pydoctor.