sphinx-doc / sphinx-doc/sphinx
`sphinx.ext.autosummary` does not process a subpackage, even though it imports without errors
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
I'm trying to generate API documentation from this repository using sphinx.ext.autosummary. However, the contents of libretro.driver are not being processed.
Here are some more details:
- Each package has an
__init__.pythat consists solely offrom .subpackage import *statements. - All modules list their public symbols in
__all__. - Sphinx does not emit any errors, as far as I can tell.
- The package's entire public API is exposed through the
libretronamespace, and callingfrom libretro import *imports everything successfully. - Here's a screenshot illustrating the issue:
How to Reproduce
- Clone the aforementioned repository
- Check out the
jtg/sphinx-bugbranch - Set up a
venvwith theSphinxandsphinx-autobuildpackages installed - Activate the
venvand run this command:sphinx-autobuild -j auto --ignore "./docs/libretro/*" --keep-going -T docs build/docs - Open the docs in-browser and look for documentation for a class named
ArrayAudioDriver. You won't find it.
conf.py is defined here, and index.rst is defined here.
Environment Information
Platform: win32; (Windows-10-10.0.19045-SP0)
Python version: 3.12.3 (tags/v3.12.3:f6650f9, Apr 9 2024, 14:05:25) [MSC v.1938 64 bit (AMD64)])
Python implementation: CPython
Sphinx version: 7.2.6
Docutils version: 0.20.1
Jinja2 version: 3.1.3
Pygments version: 2.17.2
Sphinx extensions
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
]
The most recent commit in my repo has sphinx.ext.doctest and sphinx.ext.duration, but the issue occurs even when those are excluded.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked libretro.py reproduction, especially docs/conf.py and docs/index.rst, and run the provided sphinx-autobuild command with sphinx.ext.autodoc and sphinx.ext.autosummary enabled. Trace why the libretro.driver subpackage is skipped despite imports and all, then verify that the generated documentation includes ArrayAudioDriver without errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100