sysmlpy 0.53.0__tar.gz → 0.53.1__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.53.0 → sysmlpy-0.53.1}/PKG-INFO +17 -126
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/README.md +16 -125
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/pyproject.toml +1 -1
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/__init__.py +1 -1
- sysmlpy-0.53.1/src/sysmlpy/antlr/SysMLv2Parser.interp +928 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/antlr/SysMLv2Parser.py +4168 -4176
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.g4 +1 -1
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/classes.py +241 -1
- sysmlpy-0.53.0/src/sysmlpy/antlr/SysMLv2Parser.interp +0 -928
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/LICENSE +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/__main__.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/antlr/README.md +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/antlr/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/antlr/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/antlr/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/antlr/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/antlr/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/antlr/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/antlr_parser.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/antlr_visitor.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/boxes_view.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/definition.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/examples/attribute_values.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/examples/part_attributes.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/examples/tuples_sequences.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/formatting.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/README.md +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.g4 +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/desc.xml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/examples/camera.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/examples/toaster-system.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/examples/vehicle-model.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/grammar/antlr4/pom.xml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/LICENSE +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/README.md +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/__init__.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Analysis/AnalysisTooling.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Analysis/TradeStudies.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Cause and Effect/CausationConnections.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Geometry/ShapeItems.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Geometry/SpatialItems.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Metadata/ImageMetadata.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Metadata/ParametersOfInterestMetadata.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Metadata/RiskMetadata.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/ISQ.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/ISQChemistryMolecular.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/ISQCondensedMatter.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/ISQElectromagnetism.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/ISQInformation.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/ISQThermodynamics.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/MeasurementRefCalculations.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/MeasurementReferences.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/QuantityCalculations.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/SI.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/TensorCalculations.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/USCustomaryUnits.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Quantities and Units/VectorCalculations.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Requirement Derivation/DerivationConnections.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/domain/Requirement Derivation/RequirementDerivation.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/Base.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/BaseFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/BooleanFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/Clocks.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/CollectionFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/Collections.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/ComplexFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/ControlFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/ControlPerformances.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/DataFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/IntegerFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/KerML.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/Links.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/Metaobjects.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/NaturalFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/NumericalFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/Objects.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/Observation.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/OccurrenceFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/Occurrences.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/Performances.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/RationalFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/RealFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/ScalarFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/ScalarValues.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/SequenceFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/SpatialFrames.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/StatePerformances.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/StringFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/Transfers.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/TransitionPerformances.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/TrigFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/Triggers.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/VectorFunctions.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/kernel/VectorValues.kerml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Actions.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Allocations.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/AnalysisCases.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Attributes.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Calculations.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Cases.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Connections.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Constraints.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Flows.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Interfaces.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Items.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Metadata.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Parts.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Ports.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Requirements.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/StandardViewDefinitions.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/States.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/SysML.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/UseCases.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/VerificationCases.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/library/systems/Views.sysml +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/navigate.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/plantuml.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/project.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/semantic.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/store.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/us_customary_units.txt +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/usage.py +0 -0
- {sysmlpy-0.53.0 → sysmlpy-0.53.1}/src/sysmlpy/validator.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sysmlpy
|
|
3
|
-
Version: 0.53.
|
|
3
|
+
Version: 0.53.1
|
|
4
4
|
Summary:
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Author: Jon R. Fox (mycr0ft)
|
|
@@ -26,6 +26,8 @@ Description-Content-Type: text/markdown
|
|
|
26
26
|
# sysmlpy
|
|
27
27
|
[](https://badge.fury.io/py/sysmlpy)[](https://pypi.python.org/pypi/sysmlpy/)[](https://lbesson.mit-license.org/)
|
|
28
28
|
|
|
29
|
+

|
|
30
|
+
|
|
29
31
|
## Description
|
|
30
32
|
sysmlpy is an open source pure Python library for constructing python-based
|
|
31
33
|
classes consistent with the [SysML v2.0 standard](https://github.com/Systems-Modeling/SysML-v2-Release).
|
|
@@ -37,45 +39,21 @@ and dropped the textX parser in favor of [an ANTLR4 parser grammar](https://gith
|
|
|
37
39
|
changed our unit library to pint.
|
|
38
40
|
The project had diverged so much from sysml2py that a new name, sysmlpy, was selected.
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
**v0.39.0:** Redefined-Usage name resolution — `attribute :>> exampleAttribute = ...;` previously dumped the name correctly but exposed a UUID sentinel via `attribute.name`. Two new helpers surface the user-visible identifier without changing the historical `self.name` semantics: `Usage.redefined_name` (last identifier segment of the first re-declaration chain — `Redefinitions` / `Subsettings` / `References`) and `Usage.display_name` (UUID-aware user-meaningful name). `get_value()`, `dump()`, and `get_child()` continue to work unchanged. New `tests/redefined_name_test.py` (6 tests) — the original two-package `DummyDefinitionModel` / `DummyUsageModel` round-trips and the helper properties are exercised.
|
|
49
|
-
|
|
50
|
-
**v0.38.0:** Partial-parse recovery — opt-in entry points surface whatever did parse when the input has syntax errors, instead of aborting with `SysMLSyntaxError`. New `PartialParseError` exception carries `.errors`, `.partial` (the visitor dict), and `.source`. `loads_partial(text)` / `load_partial(text)` raise `PartialParseError` on errors and return cleanly on success. Strict `loads` / `load` are unchanged. Motivating case: `validation/valid/Import_Visibility_Valid.sysml` (XPECT expects the visibility-less `import ScalarValues;` to be rejected). Now round-trips the three valid imports and drops the broken one. New `tests/partial_test.py` (6 tests). 391/391 fast-suite tests passing; conformance unchanged.
|
|
51
|
-
|
|
52
|
-
**v0.37.0:** Round-trip / corpus-load fixes surfaced by benchmarking against gosysml (the Go port — `github.com/mycr0ft/gosysml`). Implicit-package wrap could swallow its own closing brace when the source ended with a line comment and no trailing newline (e.g. `Subsetting_OwningType.sysml`); `AnnotatingElement` now dispatches `MetadataFeature` and `TextualRepresentation` (they were crashing on `NoneType`); three missing grammar classes (`InitialNodeMember`, `ActionTargetSuccessionMember`, `GuardedSuccessionMember`) now match the visitor's emitted dicts and round-trip `first X; then Y;` / `if c then X else Y;` / `succession S first A1 if c then A2;` chains inside action bodies; `TriggerExpression` now extracts the `WHEN argumentExpressionMember` branch and degrades gracefully on empty arguments; control-node names (`merge m`, `decide`, etc.) flow through; nested `ref action a : A;` usages keep their `ref` prefix; `BinaryInterfacePart.dump()` degrades gracefully on 0/1-end interface parts (graceful-fallback contract). Corpus parity with gosysml: **122/123** files round-trip cleanly (the lone remaining failure, `Import_Visibility_Valid.sysml`, has an XPECT header that *expects* its syntax error). Grammar round-trip suite: **96/96 passing**.
|
|
53
|
-
|
|
54
|
-
**v0.36.0:** Boxes-backed state-machine visualizer — `as_state_transition_view_boxes()`, `render_state_transition_view()`, `render_state_transition_view_svg()` produce native UML `«state»` shapes, initial pseudostate, final bullseye, and orthogonal routing via the optional [`boxes`](https://github.com/mycr0ft/boxes) package. Handles `done`, guards, shorthand `accept X then Y`, dotted feature chains (`S2.S3`), composite states, `parallel` regions, entry/do/exit attributes. 19 new boxes_view tests. Also fixes the INCOSE flashlight `interface … connect … { perform …; }` parse crash in `grammar/classes.py`.
|
|
55
|
-
|
|
56
|
-
**v0.31.0:** Documentation overhaul — all docs rewritten to showcase the modern public API. New Model Parsing and Model Navigation sections. Semantic Analysis updated with `AnalysisResult`. Grammar round-trip: 77/77 (100%). 211 core tests passing.
|
|
57
|
-
|
|
58
|
-
**v0.32.4:** Fixed `Attribute.usage_dump()` calling `dump(child=True)` (returns str) when it should call `_get_definition(child="DefinitionBody")` (returns dict). Broke inline anonymous attribute usages with nested children.
|
|
59
|
-
|
|
60
|
-
**v0.32.3:** Fixed `Model.load()` silently dropping top-level elements declared after a semicolon-terminated package (e.g. `package P;\npart def Vehicle {...}`). Also handles `UsageElement` siblings.
|
|
61
|
-
|
|
62
|
-
**v0.32.2:** Added `docs/TODO.md` stub (was a dangling symlink, broke mkdocs build).
|
|
63
|
-
|
|
64
|
-
**v0.32.1:** Fixed critical round-trip data loss bug — `Usage.load_from_grammar()` in `usage.py` silently dropped definition-type children (`part def`, `item def`, etc.) when mixed with usage-type children in the same body, due to an incorrect `hasattr(child, 'body')` guard. Nested structures with mixed definition/usage children now survive parse → dump → parse round-trip correctly.
|
|
65
|
-
|
|
66
|
-
**v0.28.0:** Complete Gap 4 coverage — SysML v2 view types now implemented (144 PlantUML tests).
|
|
42
|
+
> **⚠️ Constraints are changing.** Upcoming releases (v0.54+) overhaul how
|
|
43
|
+
> constraint, calc, and expression bodies are validated: names inside
|
|
44
|
+
> expressions will be **resolved against the symbol table** (v0.54.0),
|
|
45
|
+
> followed by operand type checking and unit-dimension compatibility via
|
|
46
|
+
> pint (v0.55.0). Models that parse cleanly today may start producing
|
|
47
|
+
> semantic errors once this lands. Track progress in
|
|
48
|
+
> [docs/DEVELOPMENT_PLAN.md](docs/DEVELOPMENT_PLAN.md).
|
|
67
49
|
|
|
68
|
-
**
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
**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.
|
|
75
|
-
|
|
76
|
-
**v0.16.0:** 100% grammar round-trip test coverage (56/56). Analysis case usage, trade study, calculation redefinition, and case body member support. Import visibility defaults to private per SysML v2 spec.
|
|
50
|
+
> **Scope reminder** — a green parse result means the file **parsed
|
|
51
|
+
> syntactically**. Names inside constraint bodies and other OCL-style
|
|
52
|
+
> expressions are not yet resolved by the semantic analyzer, so a
|
|
53
|
+
> document that names an undefined symbol inside an `assert constraint
|
|
54
|
+
> { ... }` will still parse cleanly. See [STATUS.md §Known Issues](STATUS.md#known-issues).
|
|
77
55
|
|
|
78
|
-
|
|
56
|
+
For release history, see [CHANGELOG.md](CHANGELOG.md).
|
|
79
57
|
|
|
80
58
|
## Requirements
|
|
81
59
|
sysmlpy requires the following Python packages:
|
|
@@ -104,12 +82,6 @@ Multiple installation methods are supported by sysmlpy, including:
|
|
|
104
82
|
|
|
105
83
|
Documentation can be found [here.](https://mycr0ft.github.io/sysmlpy/)
|
|
106
84
|
|
|
107
|
-
> **Scope reminder** — a green parse result means the file **parsed
|
|
108
|
-
> syntactically**. Names inside constraint bodies and other OCL-style
|
|
109
|
-
> expressions are not yet resolved by the semantic analyzer, so a
|
|
110
|
-
> document that names an undefined symbol inside an `assert constraint
|
|
111
|
-
> { ... }` will still parse cleanly. See [STATUS.md §Known Issues](STATUS.md#known-issues).
|
|
112
|
-
|
|
113
85
|
### Basic Usage
|
|
114
86
|
|
|
115
87
|
Build models programmatically using the public API:
|
|
@@ -345,7 +317,7 @@ tree = classtree(model)
|
|
|
345
317
|
print(tree.dump())
|
|
346
318
|
```
|
|
347
319
|
|
|
348
|
-
**All
|
|
320
|
+
**All 143 grammar round-trip tests pass** (100%). 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, control flow (if/else, while, loop, fork, join, decision, send, accept, terminate), trade studies, views, viewpoints, render states, portion usages, and annotations.
|
|
349
321
|
|
|
350
322
|
## Semantic Analysis
|
|
351
323
|
|
|
@@ -786,87 +758,6 @@ See [`docs/plantuml-examples/`](docs/plantuml-examples/) for all rendered exampl
|
|
|
786
758
|
| 15 | Relationship Matrix (GridView) | Relationship Matrix |
|
|
787
759
|
| 16 | Tabular View — Color | Tabular View (color) |
|
|
788
760
|
|
|
789
|
-
## Changelog
|
|
790
|
-
|
|
791
|
-
- **v0.36.3** — Fix view (and other prefixed-usage) body children being
|
|
792
|
-
dropped from the public API tree. `Package.load_from_grammar` built
|
|
793
|
-
`View` objects manually without calling `load_from_grammar`, so
|
|
794
|
-
`view.attributes` (and all other typed accessors) returned `[]` even
|
|
795
|
-
when the view body contained attributes, parts, etc. Now calls
|
|
796
|
-
`View().load_from_grammar(...)` matching `Part` and other usages.
|
|
797
|
-
Also fixes `Usage.load_from_grammar` (declaration branch) and
|
|
798
|
-
`Usage._ensure_body` to handle prefixed usages whose body lives on
|
|
799
|
-
`grammar.body` rather than `grammar.usage.completion.body.body`.
|
|
800
|
-
|
|
801
|
-
- **v0.36.2** — Preserve short name, doc, and nested children in
|
|
802
|
-
`Requirement.dump()`/`load_from_grammar`. Three gaps in the public
|
|
803
|
-
`Requirement` class were dropping data the parser had captured:
|
|
804
|
-
`declaredShortName` was never propagated, `doc /* … */` nodes were
|
|
805
|
-
walked past, and `dump()` never iterated `self.children` so nested
|
|
806
|
-
`requirement` usages were omitted from output.
|
|
807
|
-
|
|
808
|
-
- **v0.36.1** — Populate nested requirement children in
|
|
809
|
-
`Requirement.load_from_grammar`. Previously the body walk stubbed out
|
|
810
|
-
`DefinitionBodyItem` with `pass`, so nested requirements were parsed
|
|
811
|
-
by the grammar but dropped from the public object tree.
|
|
812
|
-
|
|
813
|
-
- **v0.36.0** — Boxes-backed state-machine visualizer:
|
|
814
|
-
`as_state_transition_view_boxes()`, `render_state_transition_view()`,
|
|
815
|
-
`render_state_transition_view_svg()` produce native UML `«state»`
|
|
816
|
-
shapes, initial pseudostate, final bullseye, and orthogonal routing
|
|
817
|
-
via the optional [`boxes`](https://github.com/mycr0ft/boxes) package.
|
|
818
|
-
19 new boxes_view tests. Also fixes the INCOSE flashlight
|
|
819
|
-
`interface … connect … { perform …; }` parse crash.
|
|
820
|
-
|
|
821
|
-
- **v0.32.5** — Fix double-space in dump output when `:>>` (redefinition) or
|
|
822
|
-
`: ` (typing) appears after `attribute`, `part`, or other usage keywords.
|
|
823
|
-
Root cause: `Redefinitions.keyword` and `TypedBy.keyword` had leading spaces
|
|
824
|
-
that doubled the separator in `AttributeUsage.dump()` and similar join points.
|
|
825
|
-
|
|
826
|
-
- **v0.33.0** — Fix three parser issues from PARSING_ISSUES.md:
|
|
827
|
-
1. `subject` with qualified name (e.g. `subject SystemGateway::System_Driver;`) now parses and round-trips inside requirement def bodies.
|
|
828
|
-
2. `guard` keyword now accepted as alternative to `if` in transition guard expressions (e.g. `transition first A guard condition then B;`).
|
|
829
|
-
3. `render state` directives with `shape`, `color`, `show`, and `annotation` sub-directives now parse and round-trip inside `view def` and `view` bodies.
|
|
830
|
-
|
|
831
|
-
Also: `rendering` usage now supported inside definition bodies (previously silently dropped), `RenderingUsage` dispatch added to `Package.load_from_grammar`, `ViewRenderingMember`/`ViewRenderingUsage` grammar classes added, `ViewDefinitionBody`/`ViewBody` grammar classes replace `DefinitionBody` for view contexts.
|
|
832
|
-
|
|
833
|
-
- **v0.33.1** — Fix `guard` keyword preservation in round-trip: `GuardExpressionMember.get_definition()` now includes the `keyword` field so `guard` is no longer silently converted to `if` on dump.
|
|
834
|
-
|
|
835
|
-
- **v0.33.2** — Fix two user-reported bugs:
|
|
836
|
-
1. `PerformedActionUsage` regression: `get_definition()` no longer references non-existent `self.keyword` and `self.children` attributes.
|
|
837
|
-
2. Double-quoted strings now accepted in `annotation` directives per SysML v2 spec (string literals use `"..."`, single quotes `'...'` are for escaped names only).
|
|
838
|
-
|
|
839
|
-
Rejected: `interface` as unquoted identifier (use `'interface'` per spec), guard after `then` in transitions (guard must precede `then` per spec).
|
|
840
|
-
|
|
841
|
-
- **v0.33.3** — Fix grid views for modern PlantUML, add two new views:
|
|
842
|
-
1. PlantUML grid views (`as_tabular_view`, `as_data_value_tabular_view`, `as_relationship_matrix_view`) replaced deprecated salt syntax with rectangle-based layout, compatible with PlantUML 1.2024.7+.
|
|
843
|
-
2. New `as_sequence_view()` — maps action flows and message passing onto PlantUML sequence diagram syntax (participant lifelines, `->` messages).
|
|
844
|
-
3. New `as_case_view()` — maps actors and use cases onto PlantUML use-case diagram syntax.
|
|
845
|
-
4. Added `docs/GUARDS.md` documenting guard condition syntax for confused users (canonical keyword is `if`, transition order is `accept` before `if` before `do` before `then`).
|
|
846
|
-
|
|
847
|
-
- **v0.33.4** — Fix `timeslice`/`snapshot`/`individual` parsing and PlantUML rendering:
|
|
848
|
-
1. `portionUsage` and `individualUsage` were silently dropped from nested body definitions (visitor gaps in `_visit_nested_occurrence_usage`, `_visit_nested_usage`).
|
|
849
|
-
2. Added `PortionUsage` grammar class and dispatch in `StructureUsageElement.__init__`.
|
|
850
|
-
3. Added `_make_portion_usage_prefix()` to extract prefix info from `PortionUsageContext`.
|
|
851
|
-
4. Added `load_from_grammar` handler for `PortionUsage` in `usage.py`.
|
|
852
|
-
5. PlantUML `_get_stereotype()` now includes `individual`/`timeslice`/`snapshot` prefixes (e.g. `<<timeslice part>>`, `<<individual part>>`).
|
|
853
|
-
|
|
854
|
-
- **v0.34.0** — Remove deprecated SysML v1.x diagram functions — BREAKING:
|
|
855
|
-
1. Removed `as_block_definition_view()`, `as_internal_block_diagram()`, `as_parametric_view()`, `as_requirement_view()`, `as_package_diagram_view()`.
|
|
856
|
-
2. Removed orphan helpers: `_extract_constraint_parameters()`, `_extract_requirement_relationships()`, `_extract_connection_endpoints()`.
|
|
857
|
-
3. Added `as_browser_view()` using PlantUML `@startwbs` syntax for hierarchical model tree.
|
|
858
|
-
4. Removed 34 corresponding tests.
|
|
859
|
-
5. All standard SysML v2 views remain: GV, IV, AV, STV, SV, GRV, BV, GEV.
|
|
860
|
-
|
|
861
|
-
- **v0.33.6** — Fix library import resolution with custom library paths:
|
|
862
|
-
1. Threaded `lib_roots` through `build_from_model()` → `_resolve_imports()` → `_resolve_membership_import()` / `_resolve_namespace_import()` for `LibrarySymbolIndex` fallback.
|
|
863
|
-
2. `import CustomTypes::*` now resolves correctly when `CustomTypes` is in a user-provided library path.
|
|
864
|
-
|
|
865
|
-
- **v0.33.5** — Fix `DefaultInterfaceEnd` keyword injection:
|
|
866
|
-
1. Removed spurious `part` keyword from interface ends without explicit `part`/`item`/`port` prefix.
|
|
867
|
-
2. Bare `end e1 : Type;` now round-trips correctly as `end e1: Type;` (no extraneous `part`).
|
|
868
|
-
3. 3 previously-failing interface round-trip grammar tests now pass.
|
|
869
|
-
|
|
870
761
|
## Conformance
|
|
871
762
|
|
|
872
763
|
**100% of 123 OMG XPect conformance tests pass** (123/123).
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# sysmlpy
|
|
2
2
|
[](https://badge.fury.io/py/sysmlpy)[](https://pypi.python.org/pypi/sysmlpy/)[](https://lbesson.mit-license.org/)
|
|
3
3
|
|
|
4
|
+

|
|
5
|
+
|
|
4
6
|
## Description
|
|
5
7
|
sysmlpy is an open source pure Python library for constructing python-based
|
|
6
8
|
classes consistent with the [SysML v2.0 standard](https://github.com/Systems-Modeling/SysML-v2-Release).
|
|
@@ -12,45 +14,21 @@ and dropped the textX parser in favor of [an ANTLR4 parser grammar](https://gith
|
|
|
12
14
|
changed our unit library to pint.
|
|
13
15
|
The project had diverged so much from sysml2py that a new name, sysmlpy, was selected.
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
**v0.39.0:** Redefined-Usage name resolution — `attribute :>> exampleAttribute = ...;` previously dumped the name correctly but exposed a UUID sentinel via `attribute.name`. Two new helpers surface the user-visible identifier without changing the historical `self.name` semantics: `Usage.redefined_name` (last identifier segment of the first re-declaration chain — `Redefinitions` / `Subsettings` / `References`) and `Usage.display_name` (UUID-aware user-meaningful name). `get_value()`, `dump()`, and `get_child()` continue to work unchanged. New `tests/redefined_name_test.py` (6 tests) — the original two-package `DummyDefinitionModel` / `DummyUsageModel` round-trips and the helper properties are exercised.
|
|
24
|
-
|
|
25
|
-
**v0.38.0:** Partial-parse recovery — opt-in entry points surface whatever did parse when the input has syntax errors, instead of aborting with `SysMLSyntaxError`. New `PartialParseError` exception carries `.errors`, `.partial` (the visitor dict), and `.source`. `loads_partial(text)` / `load_partial(text)` raise `PartialParseError` on errors and return cleanly on success. Strict `loads` / `load` are unchanged. Motivating case: `validation/valid/Import_Visibility_Valid.sysml` (XPECT expects the visibility-less `import ScalarValues;` to be rejected). Now round-trips the three valid imports and drops the broken one. New `tests/partial_test.py` (6 tests). 391/391 fast-suite tests passing; conformance unchanged.
|
|
26
|
-
|
|
27
|
-
**v0.37.0:** Round-trip / corpus-load fixes surfaced by benchmarking against gosysml (the Go port — `github.com/mycr0ft/gosysml`). Implicit-package wrap could swallow its own closing brace when the source ended with a line comment and no trailing newline (e.g. `Subsetting_OwningType.sysml`); `AnnotatingElement` now dispatches `MetadataFeature` and `TextualRepresentation` (they were crashing on `NoneType`); three missing grammar classes (`InitialNodeMember`, `ActionTargetSuccessionMember`, `GuardedSuccessionMember`) now match the visitor's emitted dicts and round-trip `first X; then Y;` / `if c then X else Y;` / `succession S first A1 if c then A2;` chains inside action bodies; `TriggerExpression` now extracts the `WHEN argumentExpressionMember` branch and degrades gracefully on empty arguments; control-node names (`merge m`, `decide`, etc.) flow through; nested `ref action a : A;` usages keep their `ref` prefix; `BinaryInterfacePart.dump()` degrades gracefully on 0/1-end interface parts (graceful-fallback contract). Corpus parity with gosysml: **122/123** files round-trip cleanly (the lone remaining failure, `Import_Visibility_Valid.sysml`, has an XPECT header that *expects* its syntax error). Grammar round-trip suite: **96/96 passing**.
|
|
28
|
-
|
|
29
|
-
**v0.36.0:** Boxes-backed state-machine visualizer — `as_state_transition_view_boxes()`, `render_state_transition_view()`, `render_state_transition_view_svg()` produce native UML `«state»` shapes, initial pseudostate, final bullseye, and orthogonal routing via the optional [`boxes`](https://github.com/mycr0ft/boxes) package. Handles `done`, guards, shorthand `accept X then Y`, dotted feature chains (`S2.S3`), composite states, `parallel` regions, entry/do/exit attributes. 19 new boxes_view tests. Also fixes the INCOSE flashlight `interface … connect … { perform …; }` parse crash in `grammar/classes.py`.
|
|
30
|
-
|
|
31
|
-
**v0.31.0:** Documentation overhaul — all docs rewritten to showcase the modern public API. New Model Parsing and Model Navigation sections. Semantic Analysis updated with `AnalysisResult`. Grammar round-trip: 77/77 (100%). 211 core tests passing.
|
|
32
|
-
|
|
33
|
-
**v0.32.4:** Fixed `Attribute.usage_dump()` calling `dump(child=True)` (returns str) when it should call `_get_definition(child="DefinitionBody")` (returns dict). Broke inline anonymous attribute usages with nested children.
|
|
34
|
-
|
|
35
|
-
**v0.32.3:** Fixed `Model.load()` silently dropping top-level elements declared after a semicolon-terminated package (e.g. `package P;\npart def Vehicle {...}`). Also handles `UsageElement` siblings.
|
|
36
|
-
|
|
37
|
-
**v0.32.2:** Added `docs/TODO.md` stub (was a dangling symlink, broke mkdocs build).
|
|
38
|
-
|
|
39
|
-
**v0.32.1:** Fixed critical round-trip data loss bug — `Usage.load_from_grammar()` in `usage.py` silently dropped definition-type children (`part def`, `item def`, etc.) when mixed with usage-type children in the same body, due to an incorrect `hasattr(child, 'body')` guard. Nested structures with mixed definition/usage children now survive parse → dump → parse round-trip correctly.
|
|
40
|
-
|
|
41
|
-
**v0.28.0:** Complete Gap 4 coverage — SysML v2 view types now implemented (144 PlantUML tests).
|
|
17
|
+
> **⚠️ Constraints are changing.** Upcoming releases (v0.54+) overhaul how
|
|
18
|
+
> constraint, calc, and expression bodies are validated: names inside
|
|
19
|
+
> expressions will be **resolved against the symbol table** (v0.54.0),
|
|
20
|
+
> followed by operand type checking and unit-dimension compatibility via
|
|
21
|
+
> pint (v0.55.0). Models that parse cleanly today may start producing
|
|
22
|
+
> semantic errors once this lands. Track progress in
|
|
23
|
+
> [docs/DEVELOPMENT_PLAN.md](docs/DEVELOPMENT_PLAN.md).
|
|
42
24
|
|
|
43
|
-
**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
**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.
|
|
50
|
-
|
|
51
|
-
**v0.16.0:** 100% grammar round-trip test coverage (56/56). Analysis case usage, trade study, calculation redefinition, and case body member support. Import visibility defaults to private per SysML v2 spec.
|
|
25
|
+
> **Scope reminder** — a green parse result means the file **parsed
|
|
26
|
+
> syntactically**. Names inside constraint bodies and other OCL-style
|
|
27
|
+
> expressions are not yet resolved by the semantic analyzer, so a
|
|
28
|
+
> document that names an undefined symbol inside an `assert constraint
|
|
29
|
+
> { ... }` will still parse cleanly. See [STATUS.md §Known Issues](STATUS.md#known-issues).
|
|
52
30
|
|
|
53
|
-
|
|
31
|
+
For release history, see [CHANGELOG.md](CHANGELOG.md).
|
|
54
32
|
|
|
55
33
|
## Requirements
|
|
56
34
|
sysmlpy requires the following Python packages:
|
|
@@ -79,12 +57,6 @@ Multiple installation methods are supported by sysmlpy, including:
|
|
|
79
57
|
|
|
80
58
|
Documentation can be found [here.](https://mycr0ft.github.io/sysmlpy/)
|
|
81
59
|
|
|
82
|
-
> **Scope reminder** — a green parse result means the file **parsed
|
|
83
|
-
> syntactically**. Names inside constraint bodies and other OCL-style
|
|
84
|
-
> expressions are not yet resolved by the semantic analyzer, so a
|
|
85
|
-
> document that names an undefined symbol inside an `assert constraint
|
|
86
|
-
> { ... }` will still parse cleanly. See [STATUS.md §Known Issues](STATUS.md#known-issues).
|
|
87
|
-
|
|
88
60
|
### Basic Usage
|
|
89
61
|
|
|
90
62
|
Build models programmatically using the public API:
|
|
@@ -320,7 +292,7 @@ tree = classtree(model)
|
|
|
320
292
|
print(tree.dump())
|
|
321
293
|
```
|
|
322
294
|
|
|
323
|
-
**All
|
|
295
|
+
**All 143 grammar round-trip tests pass** (100%). 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, control flow (if/else, while, loop, fork, join, decision, send, accept, terminate), trade studies, views, viewpoints, render states, portion usages, and annotations.
|
|
324
296
|
|
|
325
297
|
## Semantic Analysis
|
|
326
298
|
|
|
@@ -761,87 +733,6 @@ See [`docs/plantuml-examples/`](docs/plantuml-examples/) for all rendered exampl
|
|
|
761
733
|
| 15 | Relationship Matrix (GridView) | Relationship Matrix |
|
|
762
734
|
| 16 | Tabular View — Color | Tabular View (color) |
|
|
763
735
|
|
|
764
|
-
## Changelog
|
|
765
|
-
|
|
766
|
-
- **v0.36.3** — Fix view (and other prefixed-usage) body children being
|
|
767
|
-
dropped from the public API tree. `Package.load_from_grammar` built
|
|
768
|
-
`View` objects manually without calling `load_from_grammar`, so
|
|
769
|
-
`view.attributes` (and all other typed accessors) returned `[]` even
|
|
770
|
-
when the view body contained attributes, parts, etc. Now calls
|
|
771
|
-
`View().load_from_grammar(...)` matching `Part` and other usages.
|
|
772
|
-
Also fixes `Usage.load_from_grammar` (declaration branch) and
|
|
773
|
-
`Usage._ensure_body` to handle prefixed usages whose body lives on
|
|
774
|
-
`grammar.body` rather than `grammar.usage.completion.body.body`.
|
|
775
|
-
|
|
776
|
-
- **v0.36.2** — Preserve short name, doc, and nested children in
|
|
777
|
-
`Requirement.dump()`/`load_from_grammar`. Three gaps in the public
|
|
778
|
-
`Requirement` class were dropping data the parser had captured:
|
|
779
|
-
`declaredShortName` was never propagated, `doc /* … */` nodes were
|
|
780
|
-
walked past, and `dump()` never iterated `self.children` so nested
|
|
781
|
-
`requirement` usages were omitted from output.
|
|
782
|
-
|
|
783
|
-
- **v0.36.1** — Populate nested requirement children in
|
|
784
|
-
`Requirement.load_from_grammar`. Previously the body walk stubbed out
|
|
785
|
-
`DefinitionBodyItem` with `pass`, so nested requirements were parsed
|
|
786
|
-
by the grammar but dropped from the public object tree.
|
|
787
|
-
|
|
788
|
-
- **v0.36.0** — Boxes-backed state-machine visualizer:
|
|
789
|
-
`as_state_transition_view_boxes()`, `render_state_transition_view()`,
|
|
790
|
-
`render_state_transition_view_svg()` produce native UML `«state»`
|
|
791
|
-
shapes, initial pseudostate, final bullseye, and orthogonal routing
|
|
792
|
-
via the optional [`boxes`](https://github.com/mycr0ft/boxes) package.
|
|
793
|
-
19 new boxes_view tests. Also fixes the INCOSE flashlight
|
|
794
|
-
`interface … connect … { perform …; }` parse crash.
|
|
795
|
-
|
|
796
|
-
- **v0.32.5** — Fix double-space in dump output when `:>>` (redefinition) or
|
|
797
|
-
`: ` (typing) appears after `attribute`, `part`, or other usage keywords.
|
|
798
|
-
Root cause: `Redefinitions.keyword` and `TypedBy.keyword` had leading spaces
|
|
799
|
-
that doubled the separator in `AttributeUsage.dump()` and similar join points.
|
|
800
|
-
|
|
801
|
-
- **v0.33.0** — Fix three parser issues from PARSING_ISSUES.md:
|
|
802
|
-
1. `subject` with qualified name (e.g. `subject SystemGateway::System_Driver;`) now parses and round-trips inside requirement def bodies.
|
|
803
|
-
2. `guard` keyword now accepted as alternative to `if` in transition guard expressions (e.g. `transition first A guard condition then B;`).
|
|
804
|
-
3. `render state` directives with `shape`, `color`, `show`, and `annotation` sub-directives now parse and round-trip inside `view def` and `view` bodies.
|
|
805
|
-
|
|
806
|
-
Also: `rendering` usage now supported inside definition bodies (previously silently dropped), `RenderingUsage` dispatch added to `Package.load_from_grammar`, `ViewRenderingMember`/`ViewRenderingUsage` grammar classes added, `ViewDefinitionBody`/`ViewBody` grammar classes replace `DefinitionBody` for view contexts.
|
|
807
|
-
|
|
808
|
-
- **v0.33.1** — Fix `guard` keyword preservation in round-trip: `GuardExpressionMember.get_definition()` now includes the `keyword` field so `guard` is no longer silently converted to `if` on dump.
|
|
809
|
-
|
|
810
|
-
- **v0.33.2** — Fix two user-reported bugs:
|
|
811
|
-
1. `PerformedActionUsage` regression: `get_definition()` no longer references non-existent `self.keyword` and `self.children` attributes.
|
|
812
|
-
2. Double-quoted strings now accepted in `annotation` directives per SysML v2 spec (string literals use `"..."`, single quotes `'...'` are for escaped names only).
|
|
813
|
-
|
|
814
|
-
Rejected: `interface` as unquoted identifier (use `'interface'` per spec), guard after `then` in transitions (guard must precede `then` per spec).
|
|
815
|
-
|
|
816
|
-
- **v0.33.3** — Fix grid views for modern PlantUML, add two new views:
|
|
817
|
-
1. PlantUML grid views (`as_tabular_view`, `as_data_value_tabular_view`, `as_relationship_matrix_view`) replaced deprecated salt syntax with rectangle-based layout, compatible with PlantUML 1.2024.7+.
|
|
818
|
-
2. New `as_sequence_view()` — maps action flows and message passing onto PlantUML sequence diagram syntax (participant lifelines, `->` messages).
|
|
819
|
-
3. New `as_case_view()` — maps actors and use cases onto PlantUML use-case diagram syntax.
|
|
820
|
-
4. Added `docs/GUARDS.md` documenting guard condition syntax for confused users (canonical keyword is `if`, transition order is `accept` before `if` before `do` before `then`).
|
|
821
|
-
|
|
822
|
-
- **v0.33.4** — Fix `timeslice`/`snapshot`/`individual` parsing and PlantUML rendering:
|
|
823
|
-
1. `portionUsage` and `individualUsage` were silently dropped from nested body definitions (visitor gaps in `_visit_nested_occurrence_usage`, `_visit_nested_usage`).
|
|
824
|
-
2. Added `PortionUsage` grammar class and dispatch in `StructureUsageElement.__init__`.
|
|
825
|
-
3. Added `_make_portion_usage_prefix()` to extract prefix info from `PortionUsageContext`.
|
|
826
|
-
4. Added `load_from_grammar` handler for `PortionUsage` in `usage.py`.
|
|
827
|
-
5. PlantUML `_get_stereotype()` now includes `individual`/`timeslice`/`snapshot` prefixes (e.g. `<<timeslice part>>`, `<<individual part>>`).
|
|
828
|
-
|
|
829
|
-
- **v0.34.0** — Remove deprecated SysML v1.x diagram functions — BREAKING:
|
|
830
|
-
1. Removed `as_block_definition_view()`, `as_internal_block_diagram()`, `as_parametric_view()`, `as_requirement_view()`, `as_package_diagram_view()`.
|
|
831
|
-
2. Removed orphan helpers: `_extract_constraint_parameters()`, `_extract_requirement_relationships()`, `_extract_connection_endpoints()`.
|
|
832
|
-
3. Added `as_browser_view()` using PlantUML `@startwbs` syntax for hierarchical model tree.
|
|
833
|
-
4. Removed 34 corresponding tests.
|
|
834
|
-
5. All standard SysML v2 views remain: GV, IV, AV, STV, SV, GRV, BV, GEV.
|
|
835
|
-
|
|
836
|
-
- **v0.33.6** — Fix library import resolution with custom library paths:
|
|
837
|
-
1. Threaded `lib_roots` through `build_from_model()` → `_resolve_imports()` → `_resolve_membership_import()` / `_resolve_namespace_import()` for `LibrarySymbolIndex` fallback.
|
|
838
|
-
2. `import CustomTypes::*` now resolves correctly when `CustomTypes` is in a user-provided library path.
|
|
839
|
-
|
|
840
|
-
- **v0.33.5** — Fix `DefaultInterfaceEnd` keyword injection:
|
|
841
|
-
1. Removed spurious `part` keyword from interface ends without explicit `part`/`item`/`port` prefix.
|
|
842
|
-
2. Bare `end e1 : Type;` now round-trips correctly as `end e1: Type;` (no extraneous `part`).
|
|
843
|
-
3. 3 previously-failing interface round-trip grammar tests now pass.
|
|
844
|
-
|
|
845
736
|
## Conformance
|
|
846
737
|
|
|
847
738
|
**100% of 123 OMG XPect conformance tests pass** (123/123).
|
|
@@ -25,7 +25,7 @@ __all__ = [
|
|
|
25
25
|
"render_state_transition_view_svg", "boxes_view",
|
|
26
26
|
]
|
|
27
27
|
__author__ = "Jon Fox"
|
|
28
|
-
__version__ = "0.53.
|
|
28
|
+
__version__ = "0.53.1"
|
|
29
29
|
|
|
30
30
|
from sysmlpy.usage import (
|
|
31
31
|
Item, Attribute, Part, Port, Action, Reference, UseCase, Requirement, Interface, Message,
|