Maybe you could try the following:
- Ensure your modules which you're trying to document have an
__init__.py file so you can import them as appropriate later on. In your case, your tools and modules directories need __init__.py files.
- Make sure all your modules which you're documenting have been set-up with proper
sphinx annotations:
module_1.py:
"""
.. module:: module_1
:platform: Unix, Windows
:synopsis: A useful module indeed.
"""
def public_fn_with_sphinxy_docstring(name, state=None):
"""This function does something.
:param name: The name to use.
:type name: str.
:param state: Current state to be in.
:type state: bool.
:returns: int -- the return code.
:raises: AttributeError, KeyError
"""
return 0
- Create a new
.rst file, maybe called code.rst, which includes the modules you wish to document. Then reference this new .rst file within your index.rst:
code.rst:
Documentation for the Code
**************************
.. automodule:: an_example_pypi_project
module #1 -- auto members
=========================
This is something I want to say that is not in the docstring.
.. automodule:: an_example_pypi_project.module_1
:members:
index.rst:
.. toctree::
:maxdepth: 2
:caption: Contents:
# other rst files you're including in your sphinx docs
code.rst
Here is a really nice explanation and tutorial if you want to check this out as well. Hopefully that helps!