Doxygen
The doxygen macro runs Doxygen using a project-owned Doxyfile. The project
configuration remains authoritative for generated formats, output locations, and
warning behavior. cikit collects metadata, registers the results, and creates an
RST report suitable for Sphinx.
Dependencies
The doxygen executable is required. The project must provide a Doxyfile;
Doxyfile is also the default configuration path.
Features
Doxygen version metric and documentation generation time
optional project metadata overlay (name, version, brief description)
discovery and registration of enabled documentation formats as folder artifacts
optional tag-file registration
warning counting and command/warning log artifacts
RST report with summary, documentation links, and existing timeline artifacts
Typical usage
from pathlib import Path
from cikit.macros import doxygen
doxygen.gather_doxygen_meta(env)
outputs = doxygen.generate(env, config=Path("Doxyfile"))
doxygen.write_rst(env)
By default, generate() does not override any project settings. Setting
project_meta=True creates a temporary Doxygen configuration overlay for
PROJECT_NAME, PROJECT_NUMBER, and PROJECT_BRIEF, using available cikit
project metadata without modifying the original file.
Enabled outputs such as HTML, XML, LaTeX, RTF, man pages, DocBook, and SQLite are registered as folder artifacts. The RST report links directly to generated HTML and XML entry points when available and lists other folder artifacts. A configured Doxygen tag file is registered as a build artifact.
generate() returns a dictionary mapping enabled output formats to their
registered folder artifacts. For example, outputs["html"] accesses the HTML
artifact when HTML generation is enabled. HTML uses the first eligible
index.* file (excluding JavaScript and CSS), XML uses index.xml when
present, and other formats have no entry point. See Artifacts
for the folder artifact model.
Warnings are counted from the configured warning log (when present) or the
corresponding process stream. Only messages containing a warning: marker
are counted; custom WARN_FORMAT values without this marker cannot be counted
reliably. The project’s WARN_* settings are left unchanged. Execution logs
are retained even when Doxygen returns a non-zero exit code, while output folders
are registered only after a successful run.
The built-in cikit doxygen command additionally creates a warnings badge
and can generate a warnings timeline.