Skip to content

feat: run Sphinx without generated configuration - #863

Open
AlexanderLanin wants to merge 2 commits into
stack/pr0-join-pathfrom
stack/pr1-config-free-sphinx
Open

AlexanderLanin wants to merge 2 commits into
stack/pr0-join-pathfrom
stack/pr1-config-free-sphinx

Conversation

@AlexanderLanin

@AlexanderLanin AlexanderLanin commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Why

Documentation builds without a checked-in conf.py currently materialize a generated configuration file. This is an unnecessary build artifact and makes configuration transport depend on a generated file path. Sphinx supports configuration-free execution with structured command-line overrides, so the build should use that mechanism directly.

What changed

The generated conf.py template and rule were removed. Needs actions and the CLI now support configuration-free Sphinx execution through SPHINX_CONFIG_OPTS and -C, while checked-in conf.py support remains available. The related documentation and regression expectations were updated.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Package-appended external URLs break integration links, and the default metamodel overrides checked-in configuration.

Review effort: Balanced
Findings: 2 High severity

Open (2)
What changed in this PR

Replaces generated Sphinx configuration files with structured CLI overrides while preserving checked-in conf.py support.

Changes:

  • Adds configuration-free Sphinx execution using -C and SPHINX_CONFIG_OPTS.
  • Propagates structured configuration through Bazel bundle providers.
  • Removes generated configuration artifacts and updates documentation and expectations.
File Description
BUILD Stops exporting the removed template.
default_conf.py.tpl Removes the generated configuration template.
docs.bzl Produces structured Sphinx configuration.
bzl/​bundle_rules.bzl Adds configuration providers and option serialization.
bzl/​needs_rules.bzl Supports configuration-free Needs actions.
docs/​reference/​bazel_macros.rst Documents configuration-free behavior.
src/​docs_cli/​README.md Documents the new environment contract.
src/​docs_cli/​cli.py Selects -C and forwards overrides.
src/​docs_cli/​main_test.py Tests configuration-free arguments.
src/​extensions/​score_sphinx_bundle/​__init__.py Registers project_url.
src/​extensions/​score_metamodel/​external_needs.py Preserves existing registrations and exports URLs.
src/​extensions/​score_metamodel/​tests/​test_external_needs.py Updates exporter test terminology.
src/​tests/​docs_bzl/​expected_outputs.py Removes the generated-config expectation.
basic_docs/​_expected/​generated_config.py Removes the obsolete generated artifact.
basic_docs/​_expected/​needs_json/​needs.json Updates expected project URL.
subdirectory_bundle/​producer/​_expected/​needs_json/​needs.json Updates expected producer URL.
subdirectory_bundle/​consumer/​_expected/​needs_json/​needs.json Updates expected consumer URL.
reference_integration/​_expected/​needs_local.json Updates expected integration URL.
reference_integration/​score_platform/​_expected/​needs_json/​needs.json Updates expected platform URL.
reference_integration/​modern_module/​_expected/​needs_json/​needs.json Updates expected module URL.
reference_integration/​legacy_module/​_expected/​needs_json/​needs.json Updates expected module URL.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread bzl/needs_rules.bzl Outdated
Comment thread docs.bzl Outdated
Comment thread bzl/bundle_rules.bzl Outdated
@AlexanderLanin
AlexanderLanin force-pushed the stack/pr1-config-free-sphinx branch from ce5c5ab to 1f9eff9 Compare September 26, 2026 10:32
@github-actions

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants