Sphinx/Autodoc TOC not listing subpackages

457 Views Asked by At

I have a small repository of the following structure:

|- doc/
    |- conf.py
    |- index.rst
    |- ...
|- src/dashtutorial/
    |- __init__.py
    |- data/
    |   |- __init__.py
    |   |- types.py
    |- gui/
        |- __init__.py
        |- components/
        |   |- __init__.py
        |   |- ...
        |- ...
    |- ...

I'm using sphinx's sphinx-apidoc and napoleon and I can successfully build the documentation and view the html output.

However, for some reason, I see no TOC/package paths in the side bar (I'm using the rtd theme). All contents are there, I can use the index or search page to maneuver to every content of the documentation. Once I moved to a content, only the current package is displayed in the side bar.

The resulting modules.rst file only lists the root/main package dashtutorial.

src
===

.. toctree::
   :maxdepth: 4

   dashtutorial

This is the index.rst file:

.. Dash Tutorial documentation master file, created by
   sphinx-quickstart on Fri Jul  8 10:54:39 2022.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

Welcome to Dash Tutorial's documentation!
=========================================

.. toctree::
   :maxdepth: 4
   :caption: Contents:



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

I inserted all paths in the conf.py:

import os
import sys
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../src/'))
sys.path.insert(0, os.path.abspath('../src/dashtutorial/'))
sys.path.insert(0, os.path.abspath('../src/dashtutorial/data/'))
sys.path.insert(0, os.path.abspath('../src/dashtutorial/gui/'))
sys.path.insert(0, os.path.abspath('../src/dashtutorial/gui/components/'))

EDIT: After running make clean and make html, I receive ...\modules.rst: WARNING: document isn't included in any toctree

EDIT2: Is there anything essential to subpackages building the basic TOC structure, that I'm missing?

0

There are 0 best solutions below