Reputation: 13
I'm working in a large repo with ~100 individual folders, each with 20-30 sub-folders, each of which contain their own .py folders. Currently I have to create the .rst file for each file using the sphinx-apidoc command, then add the path to the conf.py file then add the .rst file to the index.rst file. Is there anyway of automating this so that all of this is done with just a couple of commands.
Upvotes: 1
Views: 859
Reputation: 15035
The sphinx-autodoc
extension states that it will document Python packages. Python packages in turn require that their files (modules) be contained within a directory, and that each directory contain a file with the name of __init__.py
.
After you have properly set up your files and directories, then Sphinx can import them and run sphinx-autodoc
as expected.
Upvotes: 1