Repository navigation
ElkEngine: in-process diagram layout; SVG conformance gate - #54
Merged
Merged
Conversation
Formatter::Elk builds an Elkrb::Graph from the document (a node per classifier labelled with name, definition and members; edges for associations and class parents), lays it out in-process through Elkrb::LayoutEngine (pure-Ruby ELK, layered algorithm) and renders standalone SVG (nodes as rounded rects with text labels, edges as polylines with per-type arrow markers). No external tools. The `lutaml generate --layout elk` CLI option selects it; graphviz remains the default. elkrb is a soft dependency (Gemfile-only for now): without it, Formatter::Elk raises with installation guidance — whether to promote it to a gemspec dependency is a separate decision. The marker vocabulary lives in ElkSvgMarkers; the renderer emits conformance-shaped SVG (well-formed XML, escaped text, marker defs).
…#52) Every full-document RS 3001 corpus fixture renders through the ELK engine and validates against svg_conform's base profile in CI, so engine or platform regressions surface as spec failures. Runs wherever the svg_conform gem is present (skipped otherwise); nokogiri joins the Gemfile as svg_conform's lutaml-model XML adapter requirement. Also: the graph builder scopes entity collection defensively (packages lack `primitives`).
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.
Closes #51. Closes #52.
#51 ElkEngine — in-process diagram layout via elkrb (pure-Ruby ELK):
Formatter::Elkbuilds anElkrb::Graphfrom the document (a node per classifier labelled with name/definition/members; edges for associations and class parents), lays it out throughElkrb::LayoutEngine(layered) and renders standalone SVG — nodes as rounded rects with text labels, edges as polylines with per-member_end_typearrow markerslutaml generate --layout elkselects it; graphviz remains the default — zero behavior change for existing usersFormatter::Elkraises with installation guidance without it. Whether to promote it into the gemspec is a separate decision — noted for reviewElkSvgMarkers; the SVG emitter is the piece elkrb itself lacks#52 conformance gate — every full-document RS 3001 corpus fixture renders through the ELK engine and validates against svg_conform's base profile in CI; nokogiri joins the Gemfile as svg_conform's adapter requirement. Skips cleanly where the gem is absent.
685→713 examples (5 ELK + 25 gates), 0 failures; lint clean on all new files; matrix runs with
dotabsent exercised the in-process path.