🧪🤖 Integrate RTD w/ the tox workflow tool natively#809
Merged
webknjaz merged 3 commits intoansible:develfrom Apr 1, 2026
Merged
🧪🤖 Integrate RTD w/ the tox workflow tool natively#809webknjaz merged 3 commits intoansible:develfrom
webknjaz merged 3 commits intoansible:develfrom
Conversation
This patch replaces the project-coupled version computation method with a standardized lookup of the installed project version using `importlib.metadata`. It also loads the project name from a standard PEP 621 configuration location. The change also makes both available as RST substitutions.
This updates the workflow tool to be in line with other maintained tox-based projects. And the change also includes an optimization that speeds up local documentation rebuilds for any documents that render version information. The tox env has been renamed from `docs` to `build-docs` and it now prints out instructions for viewing the built docs site locally. Finally, the Sphinx invocation command runs in a stricter mode and allows the caller to pass custom arguments at the end.
6a59d05 to
0e3f492
Compare
This change wires all the Sphinx invocations in RTD via tox, making it rely on the same centralized automation that contributors would use locally and GHA may run as CI.
2baa156 to
45502fc
Compare
Backport to release_3.1: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply e94e544 on top of patchback/backports/release_3.1/e94e544b9a003040efde05023ea755d01ee302d9/pr-809 Backporting merged PR #809 into devel
🤖 @patchback |
Backport to release_3.0: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply e94e544 on top of patchback/backports/release_3.0/e94e544b9a003040efde05023ea755d01ee302d9/pr-809 Backporting merged PR #809 into devel
🤖 @patchback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change wires all the Sphinx invocations in RTD via tox, making it rely on the same centralized automation that contributors would use locally and GHA may run as CI.
To achieve that, the PR includes a few additional behind-the-scenes improvements borrowed from other projects I co-maintain and occasionally sync infra across (like
ansible/awx-pluginset al).The installed package metadata is now read into the Sphinx config, dropping the project-specific version discovery invocation. Even its name is loaded from the PEP 621 config rather than being hardcoded. Both are exposed as RST substitutions.
The tox env has been renamed from
docstobuild-docsand it now prints out instructions for viewing the built docs site locally. The infrastructure includes an optimizationthat speeds up local documentation rebuilds for any documents that render version information.Finally, the Sphinx invocation command runs in a stricter mode and allows the caller to pass custom arguments at the end, which is relied on in the RTD env but is not significant in the dev envs.