Repository navigation
docs(qvts): runnable QVTS demos, recordings test and handbook chapter - #1822
Merged
Merged
Conversation
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # docs/project/api-json-differential-baseline.json # docs/project/api-json-differential.md
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…orded baselines Co-Authored-By: jason.han <hanhuijun@gmail.com>
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
Runnable demos and a handbook chapter for OpenSysML's native QVTS (Query, View, Transformation for SysML v2) outcomes, used to drive the implementation against QVTS-Core and record where it differs. No query-engine behaviour changes: where a demo hits a deviation it records the current output with a note.
examples/qvts/— self-authoredlander.sysml,duplicates.sysmlandqueries.sysml(packageQVTSDemo) plus a README with nine sections: value and empty selection, name path errors, missing-feature path errors with fan-out listing every failing element, an unvalued feature (absent, not missing), model errors,tolerate, views of results (tables,OrderBy,-json, a-render-documenttable), reflection (WhereType exact, metamodel properties,Differ,-metamodel-table), and the RDF export a SPARQL query would read (-convert ttl). Each section gives the exact command, its output and its exit status, from recordings underexamples/qvts/expected/.tests/qvts— buildscmd/sysml, runs every command (CLI,-json, REPL via stdin,-render-document,-convert ttland-metamodel-tableexcerpts), compares against the recordings (-updatere-records), and checks that each README and guide output block equals its recording, preceded by its command and followed by its exit status.docs/guide/qvts.md— chapter 13: the three outcome kinds, running from the CLI, REPL and gRPC, the outcome record JSON, and current limits; added to the guide index and the MkDocs nav.examples/files: both corpus round-trip ratchets (53 → 56 committed files, allstable), the pilot differential baseline (only theexamplesroot moved:qvts/duplicates.sysmlgains four agreed duplicate-name warnings) and the api-json differential baseline and its doc page (only theexamplesroot moved).Issues found
Run on a fresh
make buildof develop and compared with QVTS-Core (qvts-core.md) and the QVTSexamples/expectedandnative/expectedrecordings.examples/qvts/lander.sysml:WhereType(source = Descendants(source = Named(qualifiedName = "Lander::lander")), type = "PartUsag");Project(source = Named(qualifiedName = "Lander::lander::cabin"), properties = ("mas"))and("isCompositee");RelatedElements(source = Named(qualifiedName = "Lander::positivePayload"), relationshipKind = "satisfy", direction = "incoming")references unknown classification PartUsag,references unknown property mas,does not support relationship kind "satisfy"); no outcome record in text,-jsonchecks[].outcomeor the gRPCQueryOutcomedetail.masgets no nearest;isCompositeegets "did you mean isComposite?" in the message onlyOfType/Feature/Relatedwith frontier (nearest metaclass, features, kinds) — §5.5, §5.3, §5.4, §6.2RelatedElements(..., relationshipKind = "satisfaction", direction = "sideways")operation related-elements does not support "sideways", exit 2, no recordRelated— §5.4Named(qualifiedName = ("Lander::lander", "Lander::landr", "Lander::lnder"))names no element Lander::landr …: the record lists only the first missing name (Lander::landr), notLander::lnderOrderBy(property = "mass", missing = "error", ...)over a part whosemassis unvaluedcannot evaluate feature mass of Lander::lander::scienceBay, exit 2, no recordmissing = "error"turns an absent key into a model error (multiplicity) — §5.7QVTSDemo::DoubleMassValue(two values for a[1]attribute)3.0, exit 0multiplicity— §2, §6.4docs/internals/design/query-outcomes.md)QVTSDemo::ToleratedMassProject,QVTSDemo::ToleratedMassFilter(none)(-json[]), identical to an unvalued cell; toleratedWhereFeaturedrops rows with no list of what was dropped-run-query … -jsonstatus: holdsand atable, but nooutcome: valuerecordOutcomeisvalue | pathError | modelError— §2RunDocumentQueryfailureQueryOutcomeas a status detail, but no shipped client (Go, Java, Julia, MATLAB, Node, Python, Rust, Jupyter kernel) decodes it outside generated codeQVTSDemo::MissingMassProjectfeatures: []forLander::lander::cabinEngine, thoughProject(properties = ("ownedFeature"))shows it owns two end features and inherits about a hundred (Links::BinaryLink::source, …)Differ(..., key = "elementIdd")at left; nearest: elementId—atnames a side, not an elementFrontier.atis an element — §6.3examples/expected/native/agreement.txtagainst developWhereFeatureover connections now fails closed (recording shows 2 rows), ambiguous names are model errors, name errors carry frontiers, every run prints✓ packagelinesHow it was verified
make build;go build ./...;go vet ./...;gofmt -l .(empty);git diff --checkgo test -count=1 ./tests/qvts/...go test -count=1 ./examples/... ./tests/corpus/...with the training, pilot and spec-example require variables setmake lint;python3 scripts/changelog.py check;make docs-counts(README, architecture, pilot-differential and testing-skill figures refreshed for the three new example files)go test -count=1 ./tests/hygiene/...;python3 scripts/check-doc-links.py(0 broken);make docs(strict)go -C tools test -count=1 ./referee/apijson/... ./oracle/baseline/...after regenerating both pilot differential baselinesChecklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)F4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/48fb44615f314413b6e104beee48bb23
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/48fb44615f314413b6e104beee48bb23?variant=devin
Requested by: @HuiJun