canonical / canonical/charmlibs
Improve reference docs build
- Dominant language
- Python
- Stars
- 5
- Forks
- 28
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 24
Description
Building reference docs for all the libraries currently involves multiple `sphinx` passes as the libraries in `main` may well have conflicting dependencies, and we don't necessarily want to try and change that, so we build the reference docs for each library in a separate virtual environment.
There's a big downside to this: it's quite slow, and has at least `O(mn)` complexity, where `m` is the number of packages we build reference docs for, and `n` is the total size of the non package reference docs. It would be nice to speed this up.
It's also a little bit feature incomplete. To carry the built reference docs over to the final build, we save the sphinx doctree objects in the first passes, and restore them in the final pass. For whatever reason, this means that:
1. Package reference docs pages are missing the RHS TOC.
2. Deep internal links to package reference docs aren't working properly.
---
Possibly the cleanest way to resolve this would be to make a contribution to Sphinx upstream to let us render the `autodoc` content to rST on disk instead of having to manipulate and cache in-memory Sphinx objects.
Contributor guide
Research direction
Start by examining the Sphinx/autodoc reference-doc build and its separate virtual-environment passes. Investigate the doctree carry-over behavior, focusing on missing RHS TOCs and broken deep internal links; done means faster builds with those reference-doc features working correctly, potentially through an upstream Sphinx contribution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100