run_sphinx#
- documenteer.sphinxrunner.run_sphinx(root_dir, job_count=1, warnings_as_errors=False, nitpicky=False)#
Run the Sphinx build process.
- Parameters:
root_dir (str) – Root directory of the Sphinx project and content source. This directory contains both the root
index.rstfile and theconf.pyconfiguration file.job_count (int) – Number of cores to run the Sphinx build with (
-jflag)warnings_as_errors (bool) – If
True, treat Sphinx warnings as errors (-Wflag).nitpicky (bool) – If
True, activate Sphinx’s nitpicky mode (-nflag).
- Returns:
status – Sphinx status code.
0is expected. Greater than0indicates an error.- Return type:
int
Notes
This function implements similar internals to Sphinx’s own
sphinx-buildcommand. Most configurations are hard-coded to defaults appropriate for building stack documentation, but flexibility can be added later as needs are identified.