Respect user configuration#428
Merged
MaximilianSoerenPollak merged 5 commits intoeclipse-score:mainfrom Mar 3, 2026
Merged
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run //src:license-checkStatus: Click to expand output |
Contributor
MaximilianSoerenPollak
left a comment
There was a problem hiding this comment.
Some questions that came to mind.
But overall looks like a good approach. 💯
Contributor
|
Also error in the build documentation: |
There was a problem hiding this comment.
Pull request overview
This PR updates the Sphinx extension bundle to avoid overwriting user-provided conf.py settings, introducing a shared helper for “set default only if user didn’t set it” behavior.
Changes:
- Add
config_setdefault()helper (and unit tests) to only set Sphinx config values when they were not explicitly set by the user. - Update multiple extensions to use
config_setdefault()and/or merge-with-precedence patterns instead of overwriting config values. - Adjust several config assignments to extend existing lists/dicts rather than replacing them.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/helper_lib/__init__.py |
Adds config_setdefault() helper based on Sphinx _raw_config. |
src/helper_lib/test_helper_lib.py |
Adds unit tests validating config_setdefault() behavior. |
src/extensions/score_sync_toml/__init__.py |
Uses config_setdefault() and merges list-like config values instead of overwriting. |
src/extensions/score_sphinx_bundle/__init__.py |
Uses config_setdefault() and mutates existing config structures rather than replacing them. |
src/extensions/score_plantuml.py |
Avoids overwriting PlantUML-related config values; attempts to respect user config. |
src/extensions/score_metamodel/__init__.py |
Switches from overwriting sphinx-needs config lists to extending them; uses config_setdefault() for some flags. |
src/extensions/score_layout/__init__.py |
Merges layout/theme-related dict configs so user entries take precedence. |
src/extensions/score_draw_uml_funcs/__init__.py |
Populates needs_render_context via setdefault to avoid overriding user keys. |
src/extensions/score_source_code_linker/__init__.py |
Uses setdefault to avoid overwriting needs_string_links entries. |
|
The created documentation from the pull request is available at: docu-html |
MaximilianSoerenPollak
approved these changes
Mar 3, 2026
Contributor
MaximilianSoerenPollak
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks for the work.
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.
📌 Description
Don't blindly overwrite user configuration.
Instead set configuration only when not set before.
Fixes #416
🚨 Impact Analysis
✅ Checklist