Repository navigation
feat(cli): sysml -metamodel-table writes the pinned metamodel's table as JSON for generators outside the module - #1609
Merged
Conversation
… as JSON for generators outside the module Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
NicolasRouquette
marked this pull request as ready for review
October 28, 2026 03:04
…etamodel-table writes a finite bound as is Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…re states it Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…o RPC answers the table) Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
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.
What and why
sysml -metamodel-tablewrites the committed metamodel table (internal/translate/rdf/ontology/table.go, generated from the pilot'sSysML.ecoreatscripts/pilot-pin.sh) as one JSON record:metamodel(the ecore namespace date),pilotTag,pilotCommit,classes(name,abstract,parents),properties(name,definingClass,kindobject|datatype,rangeas a metaclass or enumeration name or a datatype IRI,lower,upperwith -1 unbounded,ordered,nonunique,derived,default,redefines,subsets,opposite) andenumerations(name,literals).It is the sibling of
-metaclass-graph, with the same "own run, no model" rule, and exists so generators outside this module follow the same table the API-JSON and RDF writers do: the first consumer is the QVTS reflection generator in Open-MBEE/qvts, which emitsreflection.sysml/reflection-compare.sysmlfrom it and re-emits them when the pilot pin moves.ontology.CurrentTable()/MarshalTable()(table_json.go) are the record; the CLI only writes it.Specification basis
Tooling: no SysML v2 clause, no row of
docs/project/spec-compliance.mdmoves. The table itself is unchanged.How it was verified
internal/translate/rdf/ontology/table_json_test.go: spelling of an ordered many object property (Element::ownedRelationship→Relationship, upper -1), a datatype property (Element::declaredName→xsd:string), an enumeration range (Feature::direction→FeatureDirectionKind), a Boolean default, and the header.cmd/sysml/metamodel_table_test.go: the output parses back to the table with its counts and header; a model file,-convert,-metaclass-graphand-frombeside it are refused with the same wording as-metaclass-graph's;-owrites the bytes stdout carries; the input file is untouched.go build ./...,go vet,gofmtclean;make changelog-check;make manregeneratedpackaging/man/man1/sysml.1,make man-checkpasses.Checklist
make testandmake lintpass locally (packages touched; full tier in CI)docs/reference/cli.md,docs/reference/rdf-mapping.md§ Metaclass hierarchy graph)changes/unreleased/metamodel-table.added.mdLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/18ad47adf36f44e9b6824a4472f9678d
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/18ad47adf36f44e9b6824a4472f9678d?variant=devin
Requested by: @NicolasRouquette