Skip to content

refactor: reorganize the documentation CLI - #811

Merged
AlexanderLanin merged 1 commit into
eclipse-score:mainfrom
etas-contrib:sphinxdocs2
Sep 9, 2026
Merged

refactor: reorganize the documentation CLI#811
AlexanderLanin merged 1 commit into
eclipse-score:mainfrom
etas-contrib:sphinxdocs2

Conversation

@AlexanderLanin

Copy link
Copy Markdown
Member

Why

The documentation CLI is a distinct runtime used by every docs() command, but keeping it in the top-level src package makes its Bazel ownership and integration contract difficult to discover and extend. Giving it a dedicated package makes the CLI boundary explicit and provides focused regression coverage for the behavior that depends on Bazel-provided configuration.

What changed

  • Move the CLI implementation and dirty-build tests into src/docs_cli.
  • Add a dedicated Bazel package with the CLI entry point, test targets, source aggregation, and package documentation.
  • Update docs.bzl to use the packaged entry point for all interactive documentation commands.
  • Add coverage for action dispatch, cache invalidation, failed builds, runfiles resolution, and mounted bundle watch directories.
  • Update related documentation and test references to the new CLI location.

Comment on lines +33 to +43
@pytest.fixture
def docs_workspace(fs: FFS, monkeypatch: pytest.MonkeyPatch) -> Path:
"""Create the minimal workspace environment used by ``cli.main``."""
monkeypatch.setenv("BUILD_WORKSPACE_DIRECTORY", str(_WORKSPACE))
monkeypatch.setenv("PACKAGE_DIR", "component")
monkeypatch.setenv("SOURCE_DIRECTORY", "docs")
monkeypatch.setenv("DATA", "[]")
fs.create_dir(_WORKSPACE / "component")
for name in ("MODULE.bazel", "MODULE.bazel.lock", "component/BUILD"):
fs.create_file(_WORKSPACE / name, contents="stable")
return _WORKSPACE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it test the mock then or does it acutally test implementation details?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a fixture for the other tests. no test here. it's just the common setup portion for all testcases.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-811: https://eclipse-score.github.io/docs-as-code/pr-811/

@AlexanderLanin
AlexanderLanin merged commit 9b80e1c into eclipse-score:main Sep 9, 2026
20 checks passed
@AlexanderLanin
AlexanderLanin deleted the sphinxdocs2 branch September 9, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants