Skip to content

chore: prepare needs templates - #762

Merged
AlexanderLanin merged 2 commits into
eclipse-score:mainfrom
etas-contrib:needs_templates
Aug 26, 2026
Merged

chore: prepare needs templates#762
AlexanderLanin merged 2 commits into
eclipse-score:mainfrom
etas-contrib:needs_templates

Conversation

@AlexanderLanin

Copy link
Copy Markdown
Member

Preparationm for needs_templates

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.

Pull request overview

This PR prepares shared Sphinx-Needs templates and wires them into the score_sphinx_bundle extension so the extension can locate templates at runtime. It also hardens some metamodel parsing/validation logic.

Changes:

  • Adds a src/needs_templates Bazel filegroup and an example .need template.
  • Adds the templates as a data dependency of score_sphinx_bundle and sets needs_template_folder from the extension’s location.
  • Improves error handling for external needs JSON parsing and adjusts the ID-length check logic for example_feature IDs.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/needs_templates/example.need Adds a sample Sphinx-Needs template file.
src/needs_templates/BUILD Exposes .need templates via a public Bazel filegroup.
src/extensions/score_sphinx_bundle/BUILD Ships templates alongside the extension via Bazel data.
src/extensions/score_sphinx_bundle/init.py Derives and sets needs_template_folder from __file__.
src/extensions/score_metamodel/external_needs.py Adds JSON parse error handling for Bazel-provided DATA.
src/extensions/score_metamodel/checks/attributes_format.py Fixes parts[1] indexing hazard and updates warning message logic.

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

Comment thread src/extensions/score_sphinx_bundle/__init__.py
Comment thread src/extensions/score_metamodel/external_needs.py
Comment thread src/extensions/score_metamodel/checks/attributes_format.py Outdated
Comment thread src/extensions/score_metamodel/checks/attributes_format.py
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Alexander Lanin <alex@lanin.de>

@MaximilianSoerenPollak MaximilianSoerenPollak left a comment

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.

Done together in a call.
First PR to build next stuff.

Approved.

@github-actions

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //src:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 93083099-603e-4914-a644-e9ee1ff08504
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: src
WARNING: Target pattern parsing failed.
ERROR: Skipping '//src:license-check': no such target '//src:license-check': target 'license-check' not declared in package 'src' defined by /home/runner/work/docs-as-code/docs-as-code/src/BUILD
ERROR: no such target '//src:license-check': target 'license-check' not declared in package 'src' defined by /home/runner/work/docs-as-code/docs-as-code/src/BUILD
INFO: Elapsed time: 5.464s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

@AlexanderLanin
AlexanderLanin merged commit ec4a3e7 into eclipse-score:main Aug 26, 2026
16 of 17 checks passed
@AlexanderLanin
AlexanderLanin deleted the needs_templates branch August 26, 2026 16:32
@github-actions

Copy link
Copy Markdown
Contributor

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

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.

3 participants