You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: build multiversion CLI pages from each version's own source (OSMO-6482) (#1156)
* docs: build multiversion CLI pages from each version's own source (OSMO-6482)
The multiversion docs build rendered every version's CLI autodoc/argparse
pages against main's live parser. Older release branches that still ship
commands removed on main (e.g. release/6.3's `osmo bucket`/`osmo dataset`)
therefore failed with `NavigationException`, blocking the build.
Render each version from its own checked-out `src` instead, so each release's
CLI pages reflect the parser it shipped, with no per-release freezing:
- docs/conf.py: resolve the version being built from sphinx-multiversion's
`-D smv_metadata_path` / `-D smv_current_version` (set for both the html and
markdown passes) and prepend that version's tree to sys.path. If a legacy
branch's source cannot be imported in this venv, fall back to the working-tree
src so the build still succeeds.
- docs/_extensions/module_aliasing.py: skip an `osmo.*` alias when its module
cannot be imported, instead of aborting the whole build.
- .github/workflows/docs-deploy.yaml: install release/6.3's src requirements so
its parser imports during the build.
* docs: render per-version CLI via sphinx-multiversion 0.2.7 SOURCEDIR
Adopt the simpler review suggestion now that the sphinx-multiversion fork
0.2.7 passes the environment (including SPHINX_MULTIVERSION_SOURCEDIR) to the
markdown pass as well. conf.py can then resolve each version's checked-out
`src` from that env var alone, instead of parsing the build metadata.
- docs/conf.py: prefer the per-version checkout (SPHINX_MULTIVERSION_SOURCEDIR,
falling back to cwd) for `src.*` imports.
- docs/Makefile: add --run-markdown-build to build-multiversion (markdown is
opt-in in 0.2.7).
- docs/locked_requirements.txt: bump the sphinx-multiversion fork to v0.2.7.
* docs: trim verbose comments (review nits)
---------
Co-authored-by: samuelhanono-Nvidia <shanononahmad@nvidia.com>
0 commit comments