Skip to content

feat: module verification report / complex templates - #763

Draft
AlexanderLanin wants to merge 6 commits into
mainfrom
ver
Draft

feat: module verification report / complex templates#763
AlexanderLanin wants to merge 6 commits into
mainfrom
ver

Conversation

@AlexanderLanin

@AlexanderLanin AlexanderLanin commented Aug 26, 2026

Copy link
Copy Markdown
Member

@github-actions

github-actions Bot commented Aug 26, 2026

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: 75746fc9-7fa3-4e68-84cd-cf46a981e319
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.435s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

@github-actions

Copy link
Copy Markdown
Contributor

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

@AlexanderLanin AlexanderLanin changed the title initial version complex templates Aug 27, 2026
@AlexanderLanin AlexanderLanin changed the title complex templates feat: module verification report / complex templates Aug 27, 2026
@AlexanderLanin
AlexanderLanin requested a lite review from Copilot August 27, 2026 20:57

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 adds infrastructure for complex Sphinx-Needs .need templates (including graph traversal and a post-merge re-render pass) and introduces an initial “tiny” module verification report template that generates real Sphinx sections for navigation/ToC.

Changes:

  • Added a new score_sphinx_needs_templates Sphinx extension that (a) registers the shared templates folder, (b) exposes a linked_needs() helper, and (c) re-reads pages with marked post_templates after parallel Needs collection is merged.
  • Added a complex mod_ver_report_tiny.need template that builds feature/component sections and summary tables/pies from the Need graph.
  • Wired the new extension into the Sphinx bundle and added a new auto_mod_ver_report need type.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/needs_templates/mod_ver_report_tiny.need New complex post-template for module verification reports with feature/component sections and statistics.
src/extensions/score_sphinx_needs_templates/README.md Documents the new extension behavior and the linked_needs helper.
src/extensions/score_sphinx_needs_templates/BUILD Bazel target for the new extension, including templates as runtime data.
src/extensions/score_sphinx_needs_templates/init.py Implements template folder discovery, linked_needs, and the marked-page second read.
src/extensions/score_sphinx_bundle/BUILD Drops direct template data dependency and depends on the new templates extension instead.
src/extensions/score_sphinx_bundle/init.py Loads score_sphinx_needs_templates and removes bundle-local template folder config.
src/extensions/score_metamodel/metamodel.yaml Adds auto_mod_ver_report need type.
src/BUILD Exposes the new extension’s sources at the top-level filegroup.
Suppressed comments (1)

src/needs_templates/mod_ver_report_tiny.need:259

  • Same as above: these needpie filters depend on locals()/len(), which may not be available in Sphinx-Needs filter expressions. Using direct boolean checks on the backlink fields is simpler and avoids evaluation errors.
         type == "comp_req" and "{{ component_id }}" in satisfied_by and ("fully_verifies_back" in locals() and len(fully_verifies_back) > 0)
         type == "comp_req" and "{{ component_id }}" in satisfied_by and ("partially_verifies_back" in locals() and len(partially_verifies_back) > 0) and not ("fully_verifies_back" in locals() and len(fully_verifies_back) > 0)
         type == "comp_req" and "{{ component_id }}" in satisfied_by and not ("fully_verifies_back" in locals() and len(fully_verifies_back) > 0) and not ("partially_verifies_back" in locals() and len(partially_verifies_back) > 0)

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

Comment on lines +131 to +133
type == "feat_req" and "{{ feature_id }}" in satisfied_by and ("fully_verifies_back" in locals() and len(fully_verifies_back) > 0)
type == "feat_req" and "{{ feature_id }}" in satisfied_by and ("partially_verifies_back" in locals() and len(partially_verifies_back) > 0) and not ("fully_verifies_back" in locals() and len(fully_verifies_back) > 0)
type == "feat_req" and "{{ feature_id }}" in satisfied_by and not ("fully_verifies_back" in locals() and len(fully_verifies_back) > 0) and not ("partially_verifies_back" in locals() and len(partially_verifies_back) > 0)

pages_to_rerender = sorted(complex_post_template_docs)
for docname in pages_to_rerender:
app.events.emit("env-purge-doc", env, docname)
@AlexanderLanin
AlexanderLanin marked this pull request as draft August 27, 2026 21:26
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