Repository navigation
Move the plain modules to sphinx/_scripts and split the unit suites - #18
Merged
Merged
Conversation
sphinx/_extensions held two kinds of module: Sphinx extensions, each with a setup(), and plain modules that the extensions share. adequacy, doxygen_parser, needs_fields, rst_builders and twister_reader have no setup() and are never in the extension list. Move them to sphinx/_scripts, as the safety docset did with its own doc/_extensions and doc/_scripts. zdocs_conf.py and the API document put both folders on sys.path; module names do not change. The unit tests split the same way. sphinx/_scripts/_tests holds the tests that import only _scripts modules (doxygen_parser, rst_builders, twister_reader). A test that imports an extension stays in sphinx/_extensions/_tests, also test_adequacy, which tests the testcoverage directive too. The fixtures of both are now in sphinx/_fixtures, and each test file computes that path itself: two conftest modules make "from conftest import" ambiguous. pytest.ini at the root loads the sphinx.testing plugin and selects both folders, so "python3 -m pytest -q" runs all 403 tests. pytest accepts pytest_plugins only in a top-level conftest, which neither one is in a run of both. Each folder still runs alone. The API reference gets a page for the moved modules. README, ADR 0003, the test how-to and the architecture page give the new layout. Unit 403 (88 + 315), acceptance 321/321, zdocs docs 0 warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tobias Kaestner <tobias.kaestner@inovex.de>
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.
sphinx/_extensionsholds two kinds of module: Sphinx extensions, each with asetup(), and plain modules that the extensions share. This PR moves the plain modules (adequacy, doxygen_parser, needs_fields, rst_builders, twister_reader) tosphinx/_scripts. The module names do not change, becausezdocs_conf.pyand the API document put both folders onsys.path.The unit tests are split in the same way, and the fixtures move to
sphinx/_fixtures.pytest.iniat the root selects both suites, sopython3 -m pytest -qruns all tests. Each folder also runs alone.The README, ADR 0003, the test how-to, the architecture page and the API reference describe the new layout.
This PR does not change behavior. It was part of #13 and is now separate so that it can be reviewed on its own (review comment on #13).
Checks: unit 403, acceptance 321/321, zdocs docs 0 warnings.
🤖 Generated with Claude Code