Simplest way to run Sphinx on one python file
python, python-sphinx
Solution
Sphinx processes reST files (not Python files directly). Those files may contain references to Python modules (when you use autodoc). My experience is that if only a single Python module has been modified since the last complete output build, Sphinx does not regenerate everything; only the reST file that "pulls in" that particular Python module is processed. There is a message saying `updating environment: 0 added, 1 changed, 0 removed`.
To explicitly process a single reST file, specify it as an argument to `sphinx-build`:
sphinx-build -b html -d _build/doctrees . _build/html your_filename.rst
Problem
We have a Sphinx configuration that'll generate a slew of HTML documents for our whole codebase. Sometimes, I'm working on one file and I just would like to see the HTML output from that file to make sure I got the syntax right without running the whole suite. I looked for the simplest command I could run in a terminal to run sphinx on this one file and I'm sure the info's out there but I didn't see it.