0

My project has several packages and submodules. All of them have docstrings, so I'd like to automatically generate recursive sphinx documentation for all the project.

I see there are autodoc and autosummary extensions, but I can't make them work and I can't find clear guides about this.

Any hint?

bad_coder
  • 11,289
  • 20
  • 44
  • 72
user1403546
  • 1,680
  • 4
  • 22
  • 43
  • http://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html to generate stub files, assuming your project's packages are Python packages. – Steve Piercy Apr 02 '20 at 14:06
  • Similar questions: https://stackoverflow.com/q/46341816/407651, https://stackoverflow.com/q/25549321/407651 – mzjn Apr 03 '20 at 05:26
  • Perhaps you can use this extension: https://pypi.org/project/sphinx-autopackagesummary/ – mzjn Apr 03 '20 at 06:47

1 Answers1

0

From version 3.1, if you're happy to use sphinx.ext.autosummary to display summary tables, you can use the new :recursive: option to automatically detect every module in your package, however deeply nested, and automatically generate documentation for every attribute, class, function and exception in that module.

See my answer here, with example code and results: https://stackoverflow.com/a/62613202/12014259

James Leedham
  • 2,064
  • 1
  • 10
  • 11