sysmlpy 0.26.0__tar.gz → 0.27.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/PKG-INFO +208 -60
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/README.md +207 -59
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/pyproject.toml +2 -2
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/__init__.py +9 -3
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/antlr_visitor.py +856 -28
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/definition.py +36 -21
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/classes.py +281 -183
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/plantuml.py +1320 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/usage.py +223 -7
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/LICENSE +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/__main__.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/antlr/README.md +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/antlr/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/antlr/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/antlr/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/antlr/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/antlr/SysMLv2Parser.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/antlr/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/antlr/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/antlr/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/antlr_parser.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/examples/attribute_values.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/examples/part_attributes.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/examples/tuples_sequences.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/formatting.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/README.md +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.g4 +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.g4 +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/desc.xml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/examples/camera.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/examples/toaster-system.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/examples/vehicle-model.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/grammar/antlr4/pom.xml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/LICENSE +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/README.md +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/__init__.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Analysis/AnalysisTooling.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Analysis/TradeStudies.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Cause and Effect/CausationConnections.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Geometry/ShapeItems.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Geometry/SpatialItems.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Metadata/ImageMetadata.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Metadata/ParametersOfInterestMetadata.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Metadata/RiskMetadata.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/ISQ.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/ISQChemistryMolecular.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/ISQCondensedMatter.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/ISQElectromagnetism.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/ISQInformation.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/ISQThermodynamics.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/MeasurementRefCalculations.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/MeasurementReferences.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/QuantityCalculations.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/SI.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/TensorCalculations.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/USCustomaryUnits.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Quantities and Units/VectorCalculations.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Requirement Derivation/DerivationConnections.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/domain/Requirement Derivation/RequirementDerivation.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/Base.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/BaseFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/BooleanFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/Clocks.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/CollectionFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/Collections.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/ComplexFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/ControlFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/ControlPerformances.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/DataFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/IntegerFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/KerML.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/Links.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/Metaobjects.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/NaturalFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/NumericalFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/Objects.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/Observation.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/OccurrenceFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/Occurrences.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/Performances.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/RationalFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/RealFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/ScalarFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/ScalarValues.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/SequenceFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/SpatialFrames.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/StatePerformances.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/StringFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/Transfers.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/TransitionPerformances.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/TrigFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/Triggers.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/VectorFunctions.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/kernel/VectorValues.kerml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Actions.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Allocations.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/AnalysisCases.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Attributes.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Calculations.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Cases.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Connections.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Constraints.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Flows.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Interfaces.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Items.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Metadata.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Parts.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Ports.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Requirements.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/StandardViewDefinitions.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/States.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/SysML.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/UseCases.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/VerificationCases.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/library/systems/Views.sysml +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/navigate.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/project.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/semantic.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/store.py +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/us_customary_units.txt +0 -0
- {sysmlpy-0.26.0 → sysmlpy-0.27.2}/src/sysmlpy/validator.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sysmlpy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.27.2
|
|
4
4
|
Summary: SysML v2.0 Parser
|
|
5
5
|
License: MIT License
|
|
6
6
|
|
|
@@ -59,9 +59,11 @@ The project had diverged so much from sysml2py that a new name, sysmlpy, was sel
|
|
|
59
59
|
|
|
60
60
|

|
|
61
61
|
|
|
62
|
-
**v0.
|
|
62
|
+
**v0.27.0:** General View (GV), Package View, and three GridView specializations (Tabular View, Data Value Tabular View, Relationship Matrix View) with PlantUML, Markdown, and HTML output. 108 PlantUML tests. All 68+ `NotImplementedError` stubs in `grammar/classes.py` replaced with graceful handling.
|
|
63
63
|
|
|
64
|
-
**v0.
|
|
64
|
+
**v0.26.0:** Action Flow View, Interconnection View, and State Transition View with auto-include of connected elements. Grammar-level flow scanning. 101 PlantUML tests.
|
|
65
|
+
|
|
66
|
+
**v0.19.0:** Semantic analysis engine with undefined symbol detection. Import resolution (namespace `::*`, membership, recursive `::*::**`). Symbol table with hierarchical scope resolution and qualified name lookup.
|
|
65
67
|
|
|
66
68
|
**v0.17.0:** 100% test suite pass rate (487/487). Cayley graph database storage backend via HTTP API. Full grammar round-trip coverage (56/56 tests). Programmatic API consistency fixes. NetworkXStore bug fix.
|
|
67
69
|
|
|
@@ -234,7 +236,7 @@ tree = classtree(model)
|
|
|
234
236
|
print(tree.dump())
|
|
235
237
|
```
|
|
236
238
|
|
|
237
|
-
**
|
|
239
|
+
**61 of 77 grammar round-trip tests pass** (61/77). All 61 non-control-flow tests pass (100%). The 16 deferred tests require action control-flow node classes (`IfNode`, `WhileLoopNode`, `ControlNode`, `SendNode`, `AcceptNode`, `TerminateNode`) not yet ported to `grammar/classes.py`. Covered categories: packages, parts, items, ports, interfaces, binding connectors, flow connections, all action forms (definition, shorthand, succession, decomposition), expressions, calculations, constraints, state definitions, requirements, analysis cases, and trade studies.
|
|
238
240
|
|
|
239
241
|
## Semantic Analysis
|
|
240
242
|
|
|
@@ -421,91 +423,237 @@ docker run -p 64210:64210 -v /data:/data --rm cayley/cayley -db boltdb -dbpath /
|
|
|
421
423
|
|
|
422
424
|
## PlantUML Visualizations
|
|
423
425
|
|
|
424
|
-
|
|
426
|
+
sysmlpy provides **17 view rendering functions** for generating diagrams from parsed SysML v2 models. Definitions render with sharp corners and usage elements with rounded corners. Relationships are differentiated by arrow style, thickness, and color — following the [official SysML v2 Pilot Implementation](https://github.com/Systems-Modeling/SysML-v2-Release) approach.
|
|
427
|
+
|
|
428
|
+
All functions support:
|
|
429
|
+
- `style="bw"` (default, journal-ready monochrome) or `style="color"`
|
|
430
|
+
- `focus=` to render only a specific element's subtree
|
|
431
|
+
- `custom_style=` for user-defined PlantUML style overrides
|
|
432
|
+
|
|
433
|
+
### Base Generator
|
|
425
434
|
|
|
426
435
|
```python
|
|
427
436
|
from sysmlpy import loads
|
|
428
437
|
from sysmlpy.plantuml import PlantUMLGenerator
|
|
429
438
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
part def BrakeSystem {
|
|
437
|
-
attribute padThickness : LengthValue;
|
|
438
|
-
}
|
|
439
|
-
|
|
439
|
+
model = loads("""
|
|
440
|
+
package Vehicle {
|
|
441
|
+
part def Wheel { attribute radius; attribute pressure; }
|
|
442
|
+
part def BrakeSystem { attribute padThickness; }
|
|
440
443
|
part def VehicleAssembly {
|
|
441
444
|
part frontLeft : Wheel;
|
|
442
445
|
part frontRight : Wheel;
|
|
443
446
|
part brakes : BrakeSystem;
|
|
444
447
|
}
|
|
445
|
-
|
|
446
448
|
part myVehicle : VehicleAssembly;
|
|
447
|
-
}
|
|
449
|
+
}
|
|
450
|
+
""")
|
|
448
451
|
|
|
449
|
-
|
|
450
|
-
gen = PlantUMLGenerator(model, title="Vehicle Structure")
|
|
452
|
+
gen = PlantUMLGenerator(model)
|
|
451
453
|
print(gen.generate())
|
|
452
454
|
```
|
|
453
455
|
|
|
454
|
-
|
|
456
|
+
With filtering:
|
|
455
457
|
|
|
456
|
-
```
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
458
|
+
```python
|
|
459
|
+
# Focus on a subtree, limit depth, or pick specific elements
|
|
460
|
+
gen = PlantUMLGenerator(model, focus=myVehicle, max_depth=3)
|
|
461
|
+
gen = PlantUMLGenerator(model, elements=[Wheel, BrakeSystem])
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
### Standard View Rendering Functions
|
|
465
|
+
|
|
466
|
+
#### Graphical Rendering — `as_graphical_rendering()`
|
|
467
|
+
Elements as shapes with full relationship arrows. The standard Structure/BDD view.
|
|
468
|
+
|
|
469
|
+

|
|
470
|
+
|
|
471
|
+
```python
|
|
472
|
+
from sysmlpy.plantuml import as_graphical_rendering
|
|
473
|
+
print(as_graphical_rendering(model, style="bw"))
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
#### General View (GV) — `as_general_view()`
|
|
477
|
+
Corresponds to SysML v2 ``GeneralView`` (short name ``gv``). The most general view — presents all model elements as a graph of nodes and edges. Renders parts, items, actions, states, ports, interfaces, requirements, constraints, flows, and relationships.
|
|
478
|
+
|
|
479
|
+

|
|
480
|
+
|
|
481
|
+
```python
|
|
482
|
+
from sysmlpy.plantuml import as_general_view
|
|
483
|
+
print(as_general_view(model, style="bw"))
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
#### Package View — `as_package_view()`
|
|
487
|
+
A GeneralView specialization that filters on Package containment. Renders the package hierarchy with nested rectangles and contained elements.
|
|
488
|
+
|
|
489
|
+

|
|
490
|
+
|
|
491
|
+
```python
|
|
492
|
+
from sysmlpy.plantuml import as_package_view
|
|
493
|
+
print(as_package_view(model, style="bw"))
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
#### Action Flow View (AFV) — `as_action_flow_view()`
|
|
497
|
+
Corresponds to SysML v2 ``ActionFlowView`` (short name ``afv``). Shows actions with their control and object flows. Auto-includes connected flow elements.
|
|
498
|
+
|
|
499
|
+

|
|
500
|
+
|
|
501
|
+
```python
|
|
502
|
+
from sysmlpy.plantuml import as_action_flow_view
|
|
503
|
+
print(as_action_flow_view(model, style="bw"))
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
#### Interconnection View (IV) — `as_interconnection_view()` / `as_interconnection_diagram()`
|
|
507
|
+
Corresponds to SysML v2 ``InterconnectionView`` (short name ``iv``). Focuses on connectors, bindings, and flow paths between ports and parts.
|
|
508
|
+
|
|
509
|
+

|
|
510
|
+
|
|
511
|
+
```python
|
|
512
|
+
from sysmlpy.plantuml import as_interconnection_view
|
|
513
|
+
print(as_interconnection_view(model, style="bw"))
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
#### State Transition View (STV) — `as_state_transition_view()`
|
|
517
|
+
Corresponds to SysML v2 ``StateTransitionView`` (short name ``stv``). State machine diagram with hierarchical states and transitions. Auto-includes connected transition elements.
|
|
518
|
+
|
|
519
|
+

|
|
520
|
+
|
|
521
|
+
```python
|
|
522
|
+
from sysmlpy.plantuml import as_state_transition_view
|
|
523
|
+
print(as_state_transition_view(model, style="bw"))
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
#### Tree Diagram — `as_tree_diagram()`
|
|
527
|
+
Hierarchical containment tree using nested PlantUML containers. Shows ownership hierarchy with sharp corners for definitions and rounded corners for usages.
|
|
528
|
+
|
|
529
|
+

|
|
530
|
+
|
|
531
|
+
```python
|
|
532
|
+
from sysmlpy.plantuml import as_tree_diagram
|
|
533
|
+
print(as_tree_diagram(model, style="bw"))
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
### Tabular View Rendering Functions
|
|
537
|
+
|
|
538
|
+
#### Element Table — `as_element_table()`
|
|
539
|
+
A simple tabular listing with columns Name, Type, Kind, and Parent.
|
|
540
|
+
|
|
541
|
+

|
|
542
|
+
|
|
543
|
+
```python
|
|
544
|
+
from sysmlpy.plantuml import as_element_table
|
|
545
|
+
print(as_element_table(model, style="bw"))
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
#### Textual Notation — `as_textual_notation()`
|
|
549
|
+
Indented text representation inside a PlantUML note, similar to the SysML v2 textual concrete syntax.
|
|
550
|
+
|
|
551
|
+

|
|
552
|
+
|
|
553
|
+
```python
|
|
554
|
+
from sysmlpy.plantuml import as_textual_notation
|
|
555
|
+
print(as_textual_notation(model, style="bw"))
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### GridView Specializations (Tabular, Data Value, Relationship Matrix)
|
|
559
|
+
|
|
560
|
+
Per the SysML v2 standard, ``GridView`` (short name ``grv``) presents exposed model elements and their relationships in a rectangular grid. It has three specializations, all supporting **three output formats**:
|
|
469
561
|
|
|
470
|
-
|
|
562
|
+
| Format | Use case |
|
|
563
|
+
|--------|----------|
|
|
564
|
+
| `"plantuml"` (default) | PlantUML table / salt matrix — embed in diagrams |
|
|
565
|
+
| `"markdown"` | Standard pipe table — for GitHub, MkDocs, or Jupyter |
|
|
566
|
+
| `"html"` | Rich `<table>` with CSS classes — for web dashboards |
|
|
471
567
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
rectangle "VehicleAssembly" as VehicleAssembly <<(D,#8B4513) part def>>
|
|
475
|
-
rectangle "myVehicle" as myVehicle <<(P,#32CD32) part>>
|
|
568
|
+
#### Tabular View — `as_tabular_view()`
|
|
569
|
+
Extensible table with configurable columns. Default columns: Name, Type, Kind, Parent, Typed By, Specializes.
|
|
476
570
|
|
|
477
|
-
|
|
478
|
-
VehicleAssembly *-- frontRight : owns
|
|
479
|
-
VehicleAssembly *-- brakes : owns
|
|
480
|
-
myVehicle --:|> VehicleAssembly : types
|
|
571
|
+

|
|
481
572
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
| <<(D,#8B4513) part def>> | Definition (type) |
|
|
486
|
-
| <<(P,#32CD32) part>> | Usage (instance) |
|
|
487
|
-
| --:|> | Feature typing |
|
|
488
|
-
| *-- | Composite containment |
|
|
489
|
-
endlegend
|
|
490
|
-
@enduml
|
|
573
|
+
```python
|
|
574
|
+
from sysmlpy.plantuml import as_tabular_view
|
|
575
|
+
print(as_tabular_view(model, output_format="markdown"))
|
|
491
576
|
```
|
|
492
577
|
|
|
493
|
-
|
|
578
|
+
Custom columns and other output formats:
|
|
494
579
|
|
|
495
|
-
|
|
580
|
+
```python
|
|
581
|
+
# HTML with specific columns
|
|
582
|
+
print(as_tabular_view(model,
|
|
583
|
+
columns=["Name", "Type", "Parent", "Typed By"],
|
|
584
|
+
output_format="html"))
|
|
585
|
+
|
|
586
|
+
# Markdown for documentation
|
|
587
|
+
print(as_tabular_view(model, output_format="markdown"))
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
#### Data Value Tabular View — `as_data_value_tabular_view()`
|
|
591
|
+
Attribute-specific version showing Element, Attribute, Value, Unit, and Type columns. Uses `Attribute.get_value()` for pint.Quantity extraction.
|
|
592
|
+
|
|
593
|
+

|
|
496
594
|
|
|
497
595
|
```python
|
|
498
|
-
|
|
499
|
-
|
|
596
|
+
from sysmlpy.plantuml import as_data_value_tabular_view
|
|
597
|
+
print(as_data_value_tabular_view(model, output_format="html"))
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
#### Relationship Matrix View — `as_relationship_matrix_view()`
|
|
601
|
+
Pairwise element×element matrix showing relationship types:
|
|
602
|
+
- **C** = Composite containment (parent → child)
|
|
603
|
+
- **S** = Shared (siblings)
|
|
604
|
+
- **T** = Typing
|
|
605
|
+
- **G** = Specialization (generalization)
|
|
606
|
+
- **B** = Binding, **F** = Flow, **R** = Redefinition, etc.
|
|
500
607
|
|
|
501
|
-
|
|
502
|
-
gen = PlantUMLGenerator(model, elements=["Wheel", "BrakeSystem"])
|
|
608
|
+

|
|
503
609
|
|
|
504
|
-
|
|
505
|
-
|
|
610
|
+
```python
|
|
611
|
+
from sysmlpy.plantuml import as_relationship_matrix_view
|
|
612
|
+
print(as_relationship_matrix_view(model, output_format="markdown"))
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
Type filtering and HTML output:
|
|
616
|
+
|
|
617
|
+
```python
|
|
618
|
+
# Only show part elements on rows
|
|
619
|
+
print(as_relationship_matrix_view(model,
|
|
620
|
+
row_type="part", output_format="html"))
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
### Color Style
|
|
624
|
+
|
|
625
|
+
All rendering functions accept `style="color"` for colored output with CSS-style backgrounds:
|
|
626
|
+
|
|
627
|
+
```python
|
|
628
|
+
from sysmlpy.plantuml import as_tabular_view
|
|
629
|
+
print(as_tabular_view(model, style="color"))
|
|
506
630
|
```
|
|
507
631
|
|
|
508
|
-
|
|
632
|
+

|
|
633
|
+
|
|
634
|
+
### Complete Example Gallery
|
|
635
|
+
|
|
636
|
+
See [`docs/plantuml-examples/`](docs/plantuml-examples/) for all 16 rendered example images, covering every view function.
|
|
637
|
+
|
|
638
|
+
| # | Example | View Type |
|
|
639
|
+
|---|---------|-----------|
|
|
640
|
+
| 1 | Usage vs Definition | Graphical |
|
|
641
|
+
| 2 | Relationship Arrows | Graphical |
|
|
642
|
+
| 3 | Vehicle Structure | Graphical (BW) |
|
|
643
|
+
| 4 | Black-and-White Style | Graphical (BW) |
|
|
644
|
+
| 5 | Requirements | Graphical |
|
|
645
|
+
| 6 | Interconnection | Interconnection View |
|
|
646
|
+
| 7 | General View (GV) | General View |
|
|
647
|
+
| 8 | Package View | Package View |
|
|
648
|
+
| 9 | Action Flow View (AFV) | Action Flow View |
|
|
649
|
+
| 10 | State Transition View (STV) | State Transition View |
|
|
650
|
+
| 11 | Tree Diagram | Tree Diagram |
|
|
651
|
+
| 12 | Element Table | Element Table |
|
|
652
|
+
| 13 | Textual Notation | Textual Notation |
|
|
653
|
+
| 14 | Tabular View (GridView) | Tabular View |
|
|
654
|
+
| 15 | Data Value Tabular View (GridView) | Data Value View |
|
|
655
|
+
| 16 | Relationship Matrix (GridView) | Relationship Matrix |
|
|
656
|
+
| 17 | Tabular View — Color | Tabular View (color) |
|
|
509
657
|
|
|
510
658
|
## Conformance
|
|
511
659
|
|
|
@@ -14,9 +14,11 @@ The project had diverged so much from sysml2py that a new name, sysmlpy, was sel
|
|
|
14
14
|
|
|
15
15
|

|
|
16
16
|
|
|
17
|
-
**v0.
|
|
17
|
+
**v0.27.0:** General View (GV), Package View, and three GridView specializations (Tabular View, Data Value Tabular View, Relationship Matrix View) with PlantUML, Markdown, and HTML output. 108 PlantUML tests. All 68+ `NotImplementedError` stubs in `grammar/classes.py` replaced with graceful handling.
|
|
18
18
|
|
|
19
|
-
**v0.
|
|
19
|
+
**v0.26.0:** Action Flow View, Interconnection View, and State Transition View with auto-include of connected elements. Grammar-level flow scanning. 101 PlantUML tests.
|
|
20
|
+
|
|
21
|
+
**v0.19.0:** Semantic analysis engine with undefined symbol detection. Import resolution (namespace `::*`, membership, recursive `::*::**`). Symbol table with hierarchical scope resolution and qualified name lookup.
|
|
20
22
|
|
|
21
23
|
**v0.17.0:** 100% test suite pass rate (487/487). Cayley graph database storage backend via HTTP API. Full grammar round-trip coverage (56/56 tests). Programmatic API consistency fixes. NetworkXStore bug fix.
|
|
22
24
|
|
|
@@ -189,7 +191,7 @@ tree = classtree(model)
|
|
|
189
191
|
print(tree.dump())
|
|
190
192
|
```
|
|
191
193
|
|
|
192
|
-
**
|
|
194
|
+
**61 of 77 grammar round-trip tests pass** (61/77). All 61 non-control-flow tests pass (100%). The 16 deferred tests require action control-flow node classes (`IfNode`, `WhileLoopNode`, `ControlNode`, `SendNode`, `AcceptNode`, `TerminateNode`) not yet ported to `grammar/classes.py`. Covered categories: packages, parts, items, ports, interfaces, binding connectors, flow connections, all action forms (definition, shorthand, succession, decomposition), expressions, calculations, constraints, state definitions, requirements, analysis cases, and trade studies.
|
|
193
195
|
|
|
194
196
|
## Semantic Analysis
|
|
195
197
|
|
|
@@ -376,91 +378,237 @@ docker run -p 64210:64210 -v /data:/data --rm cayley/cayley -db boltdb -dbpath /
|
|
|
376
378
|
|
|
377
379
|
## PlantUML Visualizations
|
|
378
380
|
|
|
379
|
-
|
|
381
|
+
sysmlpy provides **17 view rendering functions** for generating diagrams from parsed SysML v2 models. Definitions render with sharp corners and usage elements with rounded corners. Relationships are differentiated by arrow style, thickness, and color — following the [official SysML v2 Pilot Implementation](https://github.com/Systems-Modeling/SysML-v2-Release) approach.
|
|
382
|
+
|
|
383
|
+
All functions support:
|
|
384
|
+
- `style="bw"` (default, journal-ready monochrome) or `style="color"`
|
|
385
|
+
- `focus=` to render only a specific element's subtree
|
|
386
|
+
- `custom_style=` for user-defined PlantUML style overrides
|
|
387
|
+
|
|
388
|
+
### Base Generator
|
|
380
389
|
|
|
381
390
|
```python
|
|
382
391
|
from sysmlpy import loads
|
|
383
392
|
from sysmlpy.plantuml import PlantUMLGenerator
|
|
384
393
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
part def BrakeSystem {
|
|
392
|
-
attribute padThickness : LengthValue;
|
|
393
|
-
}
|
|
394
|
-
|
|
394
|
+
model = loads("""
|
|
395
|
+
package Vehicle {
|
|
396
|
+
part def Wheel { attribute radius; attribute pressure; }
|
|
397
|
+
part def BrakeSystem { attribute padThickness; }
|
|
395
398
|
part def VehicleAssembly {
|
|
396
399
|
part frontLeft : Wheel;
|
|
397
400
|
part frontRight : Wheel;
|
|
398
401
|
part brakes : BrakeSystem;
|
|
399
402
|
}
|
|
400
|
-
|
|
401
403
|
part myVehicle : VehicleAssembly;
|
|
402
|
-
}
|
|
404
|
+
}
|
|
405
|
+
""")
|
|
403
406
|
|
|
404
|
-
|
|
405
|
-
gen = PlantUMLGenerator(model, title="Vehicle Structure")
|
|
407
|
+
gen = PlantUMLGenerator(model)
|
|
406
408
|
print(gen.generate())
|
|
407
409
|
```
|
|
408
410
|
|
|
409
|
-
|
|
411
|
+
With filtering:
|
|
410
412
|
|
|
411
|
-
```
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
413
|
+
```python
|
|
414
|
+
# Focus on a subtree, limit depth, or pick specific elements
|
|
415
|
+
gen = PlantUMLGenerator(model, focus=myVehicle, max_depth=3)
|
|
416
|
+
gen = PlantUMLGenerator(model, elements=[Wheel, BrakeSystem])
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### Standard View Rendering Functions
|
|
420
|
+
|
|
421
|
+
#### Graphical Rendering — `as_graphical_rendering()`
|
|
422
|
+
Elements as shapes with full relationship arrows. The standard Structure/BDD view.
|
|
423
|
+
|
|
424
|
+

|
|
425
|
+
|
|
426
|
+
```python
|
|
427
|
+
from sysmlpy.plantuml import as_graphical_rendering
|
|
428
|
+
print(as_graphical_rendering(model, style="bw"))
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
#### General View (GV) — `as_general_view()`
|
|
432
|
+
Corresponds to SysML v2 ``GeneralView`` (short name ``gv``). The most general view — presents all model elements as a graph of nodes and edges. Renders parts, items, actions, states, ports, interfaces, requirements, constraints, flows, and relationships.
|
|
433
|
+
|
|
434
|
+

|
|
435
|
+
|
|
436
|
+
```python
|
|
437
|
+
from sysmlpy.plantuml import as_general_view
|
|
438
|
+
print(as_general_view(model, style="bw"))
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
#### Package View — `as_package_view()`
|
|
442
|
+
A GeneralView specialization that filters on Package containment. Renders the package hierarchy with nested rectangles and contained elements.
|
|
443
|
+
|
|
444
|
+

|
|
445
|
+
|
|
446
|
+
```python
|
|
447
|
+
from sysmlpy.plantuml import as_package_view
|
|
448
|
+
print(as_package_view(model, style="bw"))
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
#### Action Flow View (AFV) — `as_action_flow_view()`
|
|
452
|
+
Corresponds to SysML v2 ``ActionFlowView`` (short name ``afv``). Shows actions with their control and object flows. Auto-includes connected flow elements.
|
|
453
|
+
|
|
454
|
+

|
|
455
|
+
|
|
456
|
+
```python
|
|
457
|
+
from sysmlpy.plantuml import as_action_flow_view
|
|
458
|
+
print(as_action_flow_view(model, style="bw"))
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
#### Interconnection View (IV) — `as_interconnection_view()` / `as_interconnection_diagram()`
|
|
462
|
+
Corresponds to SysML v2 ``InterconnectionView`` (short name ``iv``). Focuses on connectors, bindings, and flow paths between ports and parts.
|
|
463
|
+
|
|
464
|
+

|
|
465
|
+
|
|
466
|
+
```python
|
|
467
|
+
from sysmlpy.plantuml import as_interconnection_view
|
|
468
|
+
print(as_interconnection_view(model, style="bw"))
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
#### State Transition View (STV) — `as_state_transition_view()`
|
|
472
|
+
Corresponds to SysML v2 ``StateTransitionView`` (short name ``stv``). State machine diagram with hierarchical states and transitions. Auto-includes connected transition elements.
|
|
473
|
+
|
|
474
|
+

|
|
475
|
+
|
|
476
|
+
```python
|
|
477
|
+
from sysmlpy.plantuml import as_state_transition_view
|
|
478
|
+
print(as_state_transition_view(model, style="bw"))
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
#### Tree Diagram — `as_tree_diagram()`
|
|
482
|
+
Hierarchical containment tree using nested PlantUML containers. Shows ownership hierarchy with sharp corners for definitions and rounded corners for usages.
|
|
483
|
+
|
|
484
|
+

|
|
485
|
+
|
|
486
|
+
```python
|
|
487
|
+
from sysmlpy.plantuml import as_tree_diagram
|
|
488
|
+
print(as_tree_diagram(model, style="bw"))
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
### Tabular View Rendering Functions
|
|
492
|
+
|
|
493
|
+
#### Element Table — `as_element_table()`
|
|
494
|
+
A simple tabular listing with columns Name, Type, Kind, and Parent.
|
|
495
|
+
|
|
496
|
+

|
|
497
|
+
|
|
498
|
+
```python
|
|
499
|
+
from sysmlpy.plantuml import as_element_table
|
|
500
|
+
print(as_element_table(model, style="bw"))
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
#### Textual Notation — `as_textual_notation()`
|
|
504
|
+
Indented text representation inside a PlantUML note, similar to the SysML v2 textual concrete syntax.
|
|
505
|
+
|
|
506
|
+

|
|
507
|
+
|
|
508
|
+
```python
|
|
509
|
+
from sysmlpy.plantuml import as_textual_notation
|
|
510
|
+
print(as_textual_notation(model, style="bw"))
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
### GridView Specializations (Tabular, Data Value, Relationship Matrix)
|
|
514
|
+
|
|
515
|
+
Per the SysML v2 standard, ``GridView`` (short name ``grv``) presents exposed model elements and their relationships in a rectangular grid. It has three specializations, all supporting **three output formats**:
|
|
424
516
|
|
|
425
|
-
|
|
517
|
+
| Format | Use case |
|
|
518
|
+
|--------|----------|
|
|
519
|
+
| `"plantuml"` (default) | PlantUML table / salt matrix — embed in diagrams |
|
|
520
|
+
| `"markdown"` | Standard pipe table — for GitHub, MkDocs, or Jupyter |
|
|
521
|
+
| `"html"` | Rich `<table>` with CSS classes — for web dashboards |
|
|
426
522
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
rectangle "VehicleAssembly" as VehicleAssembly <<(D,#8B4513) part def>>
|
|
430
|
-
rectangle "myVehicle" as myVehicle <<(P,#32CD32) part>>
|
|
523
|
+
#### Tabular View — `as_tabular_view()`
|
|
524
|
+
Extensible table with configurable columns. Default columns: Name, Type, Kind, Parent, Typed By, Specializes.
|
|
431
525
|
|
|
432
|
-
|
|
433
|
-
VehicleAssembly *-- frontRight : owns
|
|
434
|
-
VehicleAssembly *-- brakes : owns
|
|
435
|
-
myVehicle --:|> VehicleAssembly : types
|
|
526
|
+

|
|
436
527
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
| <<(D,#8B4513) part def>> | Definition (type) |
|
|
441
|
-
| <<(P,#32CD32) part>> | Usage (instance) |
|
|
442
|
-
| --:|> | Feature typing |
|
|
443
|
-
| *-- | Composite containment |
|
|
444
|
-
endlegend
|
|
445
|
-
@enduml
|
|
528
|
+
```python
|
|
529
|
+
from sysmlpy.plantuml import as_tabular_view
|
|
530
|
+
print(as_tabular_view(model, output_format="markdown"))
|
|
446
531
|
```
|
|
447
532
|
|
|
448
|
-
|
|
533
|
+
Custom columns and other output formats:
|
|
449
534
|
|
|
450
|
-
|
|
535
|
+
```python
|
|
536
|
+
# HTML with specific columns
|
|
537
|
+
print(as_tabular_view(model,
|
|
538
|
+
columns=["Name", "Type", "Parent", "Typed By"],
|
|
539
|
+
output_format="html"))
|
|
540
|
+
|
|
541
|
+
# Markdown for documentation
|
|
542
|
+
print(as_tabular_view(model, output_format="markdown"))
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
#### Data Value Tabular View — `as_data_value_tabular_view()`
|
|
546
|
+
Attribute-specific version showing Element, Attribute, Value, Unit, and Type columns. Uses `Attribute.get_value()` for pint.Quantity extraction.
|
|
547
|
+
|
|
548
|
+

|
|
451
549
|
|
|
452
550
|
```python
|
|
453
|
-
|
|
454
|
-
|
|
551
|
+
from sysmlpy.plantuml import as_data_value_tabular_view
|
|
552
|
+
print(as_data_value_tabular_view(model, output_format="html"))
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
#### Relationship Matrix View — `as_relationship_matrix_view()`
|
|
556
|
+
Pairwise element×element matrix showing relationship types:
|
|
557
|
+
- **C** = Composite containment (parent → child)
|
|
558
|
+
- **S** = Shared (siblings)
|
|
559
|
+
- **T** = Typing
|
|
560
|
+
- **G** = Specialization (generalization)
|
|
561
|
+
- **B** = Binding, **F** = Flow, **R** = Redefinition, etc.
|
|
455
562
|
|
|
456
|
-
|
|
457
|
-
gen = PlantUMLGenerator(model, elements=["Wheel", "BrakeSystem"])
|
|
563
|
+

|
|
458
564
|
|
|
459
|
-
|
|
460
|
-
|
|
565
|
+
```python
|
|
566
|
+
from sysmlpy.plantuml import as_relationship_matrix_view
|
|
567
|
+
print(as_relationship_matrix_view(model, output_format="markdown"))
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
Type filtering and HTML output:
|
|
571
|
+
|
|
572
|
+
```python
|
|
573
|
+
# Only show part elements on rows
|
|
574
|
+
print(as_relationship_matrix_view(model,
|
|
575
|
+
row_type="part", output_format="html"))
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
### Color Style
|
|
579
|
+
|
|
580
|
+
All rendering functions accept `style="color"` for colored output with CSS-style backgrounds:
|
|
581
|
+
|
|
582
|
+
```python
|
|
583
|
+
from sysmlpy.plantuml import as_tabular_view
|
|
584
|
+
print(as_tabular_view(model, style="color"))
|
|
461
585
|
```
|
|
462
586
|
|
|
463
|
-
|
|
587
|
+

|
|
588
|
+
|
|
589
|
+
### Complete Example Gallery
|
|
590
|
+
|
|
591
|
+
See [`docs/plantuml-examples/`](docs/plantuml-examples/) for all 16 rendered example images, covering every view function.
|
|
592
|
+
|
|
593
|
+
| # | Example | View Type |
|
|
594
|
+
|---|---------|-----------|
|
|
595
|
+
| 1 | Usage vs Definition | Graphical |
|
|
596
|
+
| 2 | Relationship Arrows | Graphical |
|
|
597
|
+
| 3 | Vehicle Structure | Graphical (BW) |
|
|
598
|
+
| 4 | Black-and-White Style | Graphical (BW) |
|
|
599
|
+
| 5 | Requirements | Graphical |
|
|
600
|
+
| 6 | Interconnection | Interconnection View |
|
|
601
|
+
| 7 | General View (GV) | General View |
|
|
602
|
+
| 8 | Package View | Package View |
|
|
603
|
+
| 9 | Action Flow View (AFV) | Action Flow View |
|
|
604
|
+
| 10 | State Transition View (STV) | State Transition View |
|
|
605
|
+
| 11 | Tree Diagram | Tree Diagram |
|
|
606
|
+
| 12 | Element Table | Element Table |
|
|
607
|
+
| 13 | Textual Notation | Textual Notation |
|
|
608
|
+
| 14 | Tabular View (GridView) | Tabular View |
|
|
609
|
+
| 15 | Data Value Tabular View (GridView) | Data Value View |
|
|
610
|
+
| 16 | Relationship Matrix (GridView) | Relationship Matrix |
|
|
611
|
+
| 17 | Tabular View — Color | Tabular View (color) |
|
|
464
612
|
|
|
465
613
|
## Conformance
|
|
466
614
|
|
|
@@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "sysmlpy"
|
|
9
|
-
version = "0.
|
|
9
|
+
version = "0.27.2"
|
|
10
10
|
description = "SysML v2.0 Parser"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name="Jon R. Fox (mycr0ft)", email="jon.fox@drfox.com" },
|
|
@@ -114,7 +114,7 @@ build_command = "pip install poetry && poetry build"
|
|
|
114
114
|
|
|
115
115
|
[tool.poetry]
|
|
116
116
|
name = "sysmlpy"
|
|
117
|
-
version = "0.
|
|
117
|
+
version = "0.27.2"
|
|
118
118
|
description = ""
|
|
119
119
|
authors = ["Jon R. Fox (mycr0ft) <jon.fox@drfox.com>"]
|
|
120
120
|
readme = "README.md"
|