sphinx-doc / sphinx-doc/sphinx

Option to only build autosummary stubs for rst files explicitly listed in a toctree

Open
#9,896 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

extensions:autosummary internals:toctree type:enhancement
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
We use sphinx to document openpnm. The entire documentation takes ~40 min (much faster if done using -j auto though) to build. For testing purposes, when changing the source files, it becomes almost impractical to see in real time how the changes get rendered.

Describe the solution you'd like
Add an option to be placed in conf.py to only generate autosummary stubs that are explicitly listed in a toctree.

Describe alternatives you've considered
Currently, the workaround we use is to manually rename the rst files (like mymodule.rst to mymodule.rst.foo) for all modules except the one we're changing. This way, sphinx doesn't try to generate stubs for all modules, but rather only for the one we desire.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the autosummary and toctree documentation, then locate how autosummary is configured through conf.py and how it selects rst files. Define the option so only stubs for files explicitly listed in a toctree are generated, and verify that unrelated module stubs are skipped while the selected ones still build.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.