Skip to main content
`Ctrl`+`K`

# doxysphinx.doxygen

The doxygen module contains classes and functions specific to doxygen.

## Attributes

`ConfigDict` |

## Classes

`DoxyOutput` | Class to summarize the strings of the console output and error streams.
`DoxygenSettingsValidator` | Validate doxygen settings for compatibility with doxysphinx.
`DoxygenOutputPathValidator` | Validates doxygen html output paths.

## Functions

`read_doxyconfig`(→ ConfigDict) | Read doxyconfig and get full doxygen configuration (also with default values).
`read_js_data_file`(→ Any) | Read a doxygen javascript data file (e.g. menudata.js) and returns the data as json structure.

## Module Contents

doxysphinx.doxygen.ConfigDict

class doxysphinx.doxygen.DoxyOutput

  Class to summarize the strings of the console output and error streams.

  out: str
  err: str

doxysphinx.doxygen.read_doxyconfig(doxyfile: pathlib.Path, doxygen_exe: str, doxygen_cwd: pathlib.Path) → ConfigDict

  Read doxyconfig and get full doxygen configuration (also with default values).

  Supplement the doxygen configuration file with the default doxygen configuration and return the final key value pairs as a dict.

  Parameters:

    - doxyfile – the doxygen configuration file to read

    - doxygen_exe – in case one wants to execute doxygen from another directory.

  Returns:

    a dict representing all key-value pairs defined in the final configuration (including warnings from the console output). The value can either be a single value or a list.

class doxysphinx.doxygen.DoxygenSettingsValidator

  Validate doxygen settings for compatibility with doxysphinx.

  Doxysphinx requires some settings to be present/set in a specific way.

  mandatory_settings

    A dictionary containing mandatory settings for the doxygen config. The values of OUTPUT_DIRECTORY and GENERATE_TAGFILE will be set after instantiation and validation of the filepaths.

  optional_settings

    A dictionary containing further optional settings for the doxygen config.

  validation_errors: List[str] = []

    List of the validation errors including the doxyflag with its used and the correct value.

  absolute_out: pathlib.Path

    Absolute path of the output directory.

  validation_msg = ''

    Validation errors merged in one string.

  validate(config: ConfigDict, sphinx_source_dir: pathlib.Path, doxygen_cwd: pathlib.Path) → bool

    Validate the doxygen configuration regarding the output directory, mandatory and optional settings.

    Parameters:

      - config – the imported doxyfile.

      - sphinx_source_dir – the sphinx directory (necessary for output directory validation).

      - doxygen_cwd – the directory for doxygen, paths from doxyfile are relative from here

    Returns:

      False, if there is a deviation to the defined mandatory or optional settings.

doxysphinx.doxygen.read_js_data_file(js_data_file: pathlib.Path) → Any

  Read a doxygen javascript data file (e.g. menudata.js) and returns the data as json structure.

  Parameters:

    js_data_file – The doxygen js data file to use.

  Returns:

    a json like dict of the data.

class doxysphinx.doxygen.DoxygenOutputPathValidator

  Validates doxygen html output paths.

  validation_msg: str = ''
  validate(doxygen_html_output: pathlib.Path) → bool

    Validate a doxygen html output path.

    This is just meant to catch typos in paths etc. It will just check if a “doxygen.css” file is existing In the html output path.

    Parameters:

      doxygen_html_output – The path where doxygen generates its html file to.

    Returns:

      True if the path is valid else false.