chore: prepare needs templates - #762
Conversation
There was a problem hiding this comment.
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_templatesBazelfilegroupand an example.needtemplate. - Adds the templates as a
datadependency ofscore_sphinx_bundleand setsneeds_template_folderfrom the extension’s location. - Improves error handling for external needs JSON parsing and adjusts the ID-length check logic for
example_featureIDs.
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.
MaximilianSoerenPollak
left a comment
There was a problem hiding this comment.
Done together in a call.
First PR to build next stuff.
Approved.
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //src:license-checkStatus: Click to expand output |
|
Documentation preview for this pull request is available at: |
Preparationm for needs_templates