Open JesseTG opened 7 months ago
I can't understand from the description and screenshots what the problem is. Aren't libretro.api
and libretro.driver
on the same level of depth and aren't both being included in the toctree
? Within that structure what exactly is missing?
Do you mean that you were to have 2 children (libretro.api
and libretro.driver
) within the top level package libretro
and the subpackages are being listed with incorrect nestings and levels of depth? What seems to be happening is that you have docs for individual modules at the same level as docs for packages. There's nothing wrong with that. You also make extensive use of __all__
but in the base package's __init__.py
you only include the subpackages not the modules inside the top-level package. I'm unsure how autosummary would behave in that case.
I can't understand from the description and screenshots what the problem is. Aren't
libretro.api
andlibretro.driver
on the same level of depth and aren't both being included in thetoctree
?
Yes, that's correct.
Within that structure what exactly is missing?
libretro.driver
should have doc pages for the submodules that it contains. It doesn't; they're not even generated.
Do you mean that you were to have 2 children (
libretro.api
andlibretro.driver
) within the top level packagelibretro
and the subpackages are being listed with incorrect nestings and levels of depth?
No, libretro.driver
is the only offender. All other packages are correctly nested (e.g. libretro.core
is a single module not nested in api
or driver
).
What seems to be happening is that you have docs for individual modules at the same level as docs for packages. There's nothing wrong with that.
I agree, that's not the issue I'm facing.
You also make extensive use of
__all__
but in the base package's__init__.py
you only include the subpackages not the modules inside the top-level package.
You mean this base package? I'm not sure what you mean here, could you elaborate?
I don't believe this...renaming the offending package from libretro.driver
to libretro.impl
works around the issue!
Is the string driver
special at all?
Using the name libretro.drivers
also works as expected.
@thegamecracks was looking into this and offered this insight:
Describe the bug
I'm trying to generate API documentation from this repository using
sphinx.ext.autosummary
. However, the contents oflibretro.driver
are not being processed.Here are some more details:
__init__.py
that consists solely offrom .subpackage import *
statements.__all__
.libretro
namespace, and callingfrom libretro import *
imports everything successfully.How to Reproduce
jtg/sphinx-bug
branchvenv
with theSphinx
andsphinx-autobuild
packages installedvenv
and run this command:sphinx-autobuild -j auto --ignore "./docs/libretro/*" --keep-going -T docs build/docs
ArrayAudioDriver
. You won't find it.conf.py
is defined here, andindex.rst
is defined here.Environment Information
Sphinx extensions
The most recent commit in my repo has
sphinx.ext.doctest
andsphinx.ext.duration
, but the issue occurs even when those are excluded.