Skip to content

Move the plain modules to sphinx/_scripts and split the unit suites - #18

Merged
tobiaskaestner merged 1 commit into
mainfrom
tkaestner/scripts-modules
Oct 13, 2026
Merged

tobiaskaestner merged 1 commit into
mainfrom
tkaestner/scripts-modules

Conversation

@tobiaskaestner

Copy link
Copy Markdown
Contributor

sphinx/_extensions holds two kinds of module: Sphinx extensions, each with a setup(), and plain modules that the extensions share. This PR moves the plain modules (adequacy, doxygen_parser, needs_fields, rst_builders, twister_reader) to sphinx/_scripts. The module names do not change, because zdocs_conf.py and the API document put both folders on sys.path.

The unit tests are split in the same way, and the fixtures move to sphinx/_fixtures. pytest.ini at the root selects both suites, so python3 -m pytest -q runs 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

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>
@tobiaskaestner
tobiaskaestner added this pull request to stack #19 October 13, 2026 19:09
@tobiaskaestner
tobiaskaestner merged commit 1e305ee into main Oct 13, 2026
2 checks passed
@tobiaskaestner
tobiaskaestner deleted the tkaestner/scripts-modules branch October 26, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant