-
Notifications
You must be signed in to change notification settings - Fork 130
Description
Starting with Sphinx 8.1, the docs build gets spammed with lines like:
qiskit-experiments/docs/stubs/qiskit_experiments.library.characterization.FineXDrag.rst: document is referenced in multiple toctrees: ['apidocs/library', 'apidocs/mod_characterization'], selecting: apidocs/mod _characterization <- stubs/qiskit_experiments.library.characterization.FineXDrag
The reason is that we have been following a pattern of putting every experiment into the toctree of qiskit_experiments/library/__init__.py
and qiskit_experiments/library/<submodule>/__init__.py
. The toctree is supposed to be tree-like so the nodes should only be at the end of one branch but we have them at the end of two. Sphinx uses the tree structure to decide which part of the table of contents to expand when a given page is viewed (see sphinx-doc/sphinx#12888). Can still link to the experiments from both the library and submodule landing pages but they should only appear in the toctree for one or the other (probably only the submodule).