feat: metamodel visualization - #686
Merged
AlexanderLanin merged 16 commits intoAug 5, 2026
Merged
Conversation
a-zw
requested review from
AlexanderLanin,
MaximilianSoerenPollak,
dcalavrezo-qorix and
nradakovic
as code owners
August 4, 2026 11:21
Contributor
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //src:license-checkStatus: Click to expand output |
Contributor
|
The created documentation from the pull request is available at: docu-html |
There was a problem hiding this comment.
Pull request overview
Adds a generated “metamodel visualization” documentation bundle (RST + Mermaid) and extends the Bazel docs bundle/mount pipeline so Sphinx can mount generated (non-source-tree) files in addition to regular documentation sources.
Changes:
- Introduces a Bazel
genrule+ Python generator to emitindex.rstand a Mermaid class diagram for the metamodel. - Extends bundle/manifest plumbing (
DocsBundleInfo, mounts manifest JSON, Python resolver) with adatafield to carry generated outputs. - Updates
score_mountsto mount parent directories of generated files andscore_sphinx_bundleto enable Mermaid d3 zoom.
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/extensions/score_sphinx_bundle/init.py | Sets default Mermaid config (mermaid_d3_zoom). |
| src/extensions/score_mounts/_resolver.py | Extends mount manifest parsing to include data paths. |
| src/extensions/score_mounts/init.py | Adds resolution/mounting of generated “data” files from the manifest. |
| src/extensions/score_metamodel/docs/generate_metamodel_rst.py | New generator producing RST + Mermaid diagram from metamodel.yaml. |
| src/extensions/score_metamodel/docs/BUILD | New Bazel targets to generate and bundle the metamodel visualization docs. |
| docs.bzl | Extends docs_bundle() macro to accept data dependencies. |
| bzl/mount_rules.bzl | Emits data paths into the mounts manifest JSON. |
| bzl/bundle_rules.bzl | Propagates data through DocsBundleInfo / entries for generated-file support. |
| BUILD | Mounts the new metamodel docs bundle into the main docs tree. |
Suppressed comments (1)
bzl/bundle_rules.bzl:249
- Pure-data bundles also set
entry.datato a list (own_data), but downstream code expects a depset (mount manifest generation calls.to_list()). Makeentry.dataa depset here as well to keep the entry schema consistent.
elif own_data:
# Pure data bundle: create an entry so the data files appear in the manifest.
entries.append(struct(
runtime_path = "",
src_root = "",
mount_at = "",
attach_to = "",
entry_doc = ctx.attr.entry_doc,
external = False,
repository = ctx.label.workspace_name,
data = own_data,
))
a-zw
force-pushed
the
metamodel-overview
branch
from
August 4, 2026 14:51
bed4959 to
3e9057d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.
Suppressed comments (2)
src/extensions/score_mounts/init.py:92
- The bazel run fallback maps execroot-relative data paths to bazel-bin by hard-coding the configuration segment ("bazel-out/k8-fastbuild/bin/"). This will fail for other configs/platforms (e.g. k8-opt, darwin_arm64-fastbuild). Strip up to the first "/bin/" segment instead so the mapping works across Bazel output configs.
walk_file = (
ws_root
/ "bazel-bin"
/ data_file.removeprefix("bazel-out/k8-fastbuild/bin/")
)
src/extensions/score_mounts/init.py:103
- Data mounts are deduplicated purely by directory path. If two bundles reference data files that resolve to the same directory but have different mount points, the later mount is silently dropped, producing an incomplete/incorrect mount list. At minimum, detect this conflict and fail fast instead of ignoring it.
walk_dir = walk_file.parent
if str(walk_dir) not in data_mounts:
data_mounts[str(walk_dir)] = spec
return data_mounts
AlexanderLanin
approved these changes
Aug 5, 2026
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
Adds a visualization of the metamodel as docs_as_code implements it.
Result visible here: https://eclipse-score.github.io/docs-as-code/pr-686/reference/metamodel/index.html
Also, adapts the bundle mechanism to support generated files.
🚨 Impact Analysis
✅ Checklist