sysmlpy 0.33.2__tar.gz → 0.33.3__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.
Files changed (147) hide show
  1. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/PKG-INFO +7 -1
  2. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/README.md +6 -0
  3. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/pyproject.toml +1 -1
  4. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/__init__.py +4 -2
  5. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/plantuml.py +319 -37
  6. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/LICENSE +0 -0
  7. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/__main__.py +0 -0
  8. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/antlr/README.md +0 -0
  9. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/antlr/SysMLv2Lexer.interp +0 -0
  10. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/antlr/SysMLv2Lexer.py +0 -0
  11. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/antlr/SysMLv2Lexer.tokens +0 -0
  12. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/antlr/SysMLv2Parser.interp +0 -0
  13. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/antlr/SysMLv2Parser.py +0 -0
  14. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/antlr/SysMLv2Parser.tokens +0 -0
  15. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/antlr/SysMLv2ParserListener.py +0 -0
  16. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/antlr/SysMLv2ParserVisitor.py +0 -0
  17. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
  18. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
  19. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
  20. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/antlr_parser.py +0 -0
  21. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/antlr_visitor.py +0 -0
  22. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/definition.py +0 -0
  23. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/examples/attribute_values.py +0 -0
  24. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/examples/part_attributes.py +0 -0
  25. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/examples/tuples_sequences.py +0 -0
  26. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/formatting.py +0 -0
  27. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/README.md +0 -0
  28. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.g4 +0 -0
  29. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
  30. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
  31. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
  32. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.g4 +0 -0
  33. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.interp +0 -0
  34. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.py +0 -0
  35. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.tokens +0 -0
  36. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/SysMLv2ParserListener.py +0 -0
  37. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/SysMLv2ParserVisitor.py +0 -0
  38. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/desc.xml +0 -0
  39. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/examples/camera.sysml +0 -0
  40. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/examples/toaster-system.sysml +0 -0
  41. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/examples/vehicle-model.sysml +0 -0
  42. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/antlr4/pom.xml +0 -0
  43. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/grammar/classes.py +0 -0
  44. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/LICENSE +0 -0
  45. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/README.md +0 -0
  46. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/__init__.py +0 -0
  47. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Analysis/AnalysisTooling.sysml +0 -0
  48. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml +0 -0
  49. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml +0 -0
  50. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Analysis/TradeStudies.sysml +0 -0
  51. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Cause and Effect/CausationConnections.sysml +0 -0
  52. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml +0 -0
  53. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Geometry/ShapeItems.sysml +0 -0
  54. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Geometry/SpatialItems.sysml +0 -0
  55. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Metadata/ImageMetadata.sysml +0 -0
  56. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml +0 -0
  57. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Metadata/ParametersOfInterestMetadata.sysml +0 -0
  58. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Metadata/RiskMetadata.sysml +0 -0
  59. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/ISQ.sysml +0 -0
  60. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml +0 -0
  61. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
  62. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml +0 -0
  63. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
  64. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/ISQChemistryMolecular.sysml +0 -0
  65. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/ISQCondensedMatter.sysml +0 -0
  66. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/ISQElectromagnetism.sysml +0 -0
  67. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/ISQInformation.sysml +0 -0
  68. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml +0 -0
  69. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml +0 -0
  70. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml +0 -0
  71. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/ISQThermodynamics.sysml +0 -0
  72. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/MeasurementRefCalculations.sysml +0 -0
  73. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/MeasurementReferences.sysml +0 -0
  74. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml +0 -0
  75. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/QuantityCalculations.sysml +0 -0
  76. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/SI.sysml +0 -0
  77. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml +0 -0
  78. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/TensorCalculations.sysml +0 -0
  79. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml +0 -0
  80. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/USCustomaryUnits.sysml +0 -0
  81. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Quantities and Units/VectorCalculations.sysml +0 -0
  82. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Requirement Derivation/DerivationConnections.sysml +0 -0
  83. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/domain/Requirement Derivation/RequirementDerivation.sysml +0 -0
  84. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/Base.kerml +0 -0
  85. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/BaseFunctions.kerml +0 -0
  86. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/BooleanFunctions.kerml +0 -0
  87. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/Clocks.kerml +0 -0
  88. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/CollectionFunctions.kerml +0 -0
  89. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/Collections.kerml +0 -0
  90. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/ComplexFunctions.kerml +0 -0
  91. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/ControlFunctions.kerml +0 -0
  92. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/ControlPerformances.kerml +0 -0
  93. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/DataFunctions.kerml +0 -0
  94. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml +0 -0
  95. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/IntegerFunctions.kerml +0 -0
  96. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/KerML.kerml +0 -0
  97. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/Links.kerml +0 -0
  98. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/Metaobjects.kerml +0 -0
  99. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/NaturalFunctions.kerml +0 -0
  100. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/NumericalFunctions.kerml +0 -0
  101. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/Objects.kerml +0 -0
  102. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/Observation.kerml +0 -0
  103. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/OccurrenceFunctions.kerml +0 -0
  104. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/Occurrences.kerml +0 -0
  105. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/Performances.kerml +0 -0
  106. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/RationalFunctions.kerml +0 -0
  107. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/RealFunctions.kerml +0 -0
  108. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/ScalarFunctions.kerml +0 -0
  109. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/ScalarValues.kerml +0 -0
  110. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/SequenceFunctions.kerml +0 -0
  111. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/SpatialFrames.kerml +0 -0
  112. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/StatePerformances.kerml +0 -0
  113. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/StringFunctions.kerml +0 -0
  114. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/Transfers.kerml +0 -0
  115. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/TransitionPerformances.kerml +0 -0
  116. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/TrigFunctions.kerml +0 -0
  117. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/Triggers.kerml +0 -0
  118. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/VectorFunctions.kerml +0 -0
  119. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/kernel/VectorValues.kerml +0 -0
  120. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Actions.sysml +0 -0
  121. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Allocations.sysml +0 -0
  122. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/AnalysisCases.sysml +0 -0
  123. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Attributes.sysml +0 -0
  124. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Calculations.sysml +0 -0
  125. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Cases.sysml +0 -0
  126. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Connections.sysml +0 -0
  127. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Constraints.sysml +0 -0
  128. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Flows.sysml +0 -0
  129. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Interfaces.sysml +0 -0
  130. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Items.sysml +0 -0
  131. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Metadata.sysml +0 -0
  132. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Parts.sysml +0 -0
  133. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Ports.sysml +0 -0
  134. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Requirements.sysml +0 -0
  135. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/StandardViewDefinitions.sysml +0 -0
  136. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/States.sysml +0 -0
  137. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/SysML.sysml +0 -0
  138. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/UseCases.sysml +0 -0
  139. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/VerificationCases.sysml +0 -0
  140. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/library/systems/Views.sysml +0 -0
  141. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/navigate.py +0 -0
  142. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/project.py +0 -0
  143. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/semantic.py +0 -0
  144. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/store.py +0 -0
  145. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/us_customary_units.txt +0 -0
  146. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/usage.py +0 -0
  147. {sysmlpy-0.33.2 → sysmlpy-0.33.3}/src/sysmlpy/validator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sysmlpy
3
- Version: 0.33.2
3
+ Version: 0.33.3
4
4
  Summary:
5
5
  License-File: LICENSE
6
6
  Author: Jon R. Fox (mycr0ft)
@@ -825,6 +825,12 @@ See [`docs/plantuml-examples/`](docs/plantuml-examples/) for all rendered exampl
825
825
 
826
826
  Rejected: `interface` as unquoted identifier (use `'interface'` per spec), guard after `then` in transitions (guard must precede `then` per spec).
827
827
 
828
+ - **v0.33.3** — Fix grid views for modern PlantUML, add two new views:
829
+ 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+.
830
+ 2. New `as_sequence_view()` — maps action flows and message passing onto PlantUML sequence diagram syntax (participant lifelines, `->` messages).
831
+ 3. New `as_case_view()` — maps actors and use cases onto PlantUML use-case diagram syntax.
832
+ 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`).
833
+
828
834
  ## Conformance
829
835
 
830
836
  **100% of 123 OMG XPect conformance tests pass** (123/123).
@@ -800,6 +800,12 @@ See [`docs/plantuml-examples/`](docs/plantuml-examples/) for all rendered exampl
800
800
 
801
801
  Rejected: `interface` as unquoted identifier (use `'interface'` per spec), guard after `then` in transitions (guard must precede `then` per spec).
802
802
 
803
+ - **v0.33.3** — Fix grid views for modern PlantUML, add two new views:
804
+ 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+.
805
+ 2. New `as_sequence_view()` — maps action flows and message passing onto PlantUML sequence diagram syntax (participant lifelines, `->` messages).
806
+ 3. New `as_case_view()` — maps actors and use cases onto PlantUML use-case diagram syntax.
807
+ 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`).
808
+
803
809
  ## Conformance
804
810
 
805
811
  **100% of 123 OMG XPect conformance tests pass** (123/123).
@@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api"
6
6
 
7
7
  [project]
8
8
  name = "sysmlpy"
9
- version = "0.33.2"
9
+ version = "0.33.3"
10
10
  description = ""
11
11
  authors = [{ name = "Jon R. Fox (mycr0ft)", email = "jon.fox@drfox.com" }]
12
12
  readme = "README.md"
@@ -17,11 +17,12 @@ __all__ = [
17
17
  "as_general_view", "as_package_view", "as_package_diagram_view", "as_block_definition_view", "as_internal_block_diagram",
18
18
  "as_parametric_view", "as_requirement_view",
19
19
  "as_tabular_view", "as_data_value_tabular_view", "as_relationship_matrix_view",
20
+ "as_sequence_view", "as_case_view",
20
21
  "analyze", "AnalysisResult", "SemanticIssue", "SemanticAnalyzer",
21
22
  "SysMLSyntaxError",
22
23
  ]
23
24
  __author__ = "Jon Fox"
24
- __version__ = "0.33.2"
25
+ __version__ = "0.33.3"
25
26
 
26
27
  from sysmlpy.usage import (
27
28
  Item, Attribute, Part, Port, Action, Reference, UseCase, Requirement, Interface, Message,
@@ -261,7 +262,8 @@ from sysmlpy.plantuml import (to_plantuml, PlantUMLGenerator,
261
262
  as_action_flow_view, as_interconnection_view, as_state_transition_view,
262
263
  as_general_view, as_package_view, as_package_diagram_view, as_block_definition_view, as_internal_block_diagram,
263
264
  as_parametric_view, as_requirement_view,
264
- as_tabular_view, as_data_value_tabular_view, as_relationship_matrix_view)
265
+ as_tabular_view, as_data_value_tabular_view, as_relationship_matrix_view,
266
+ as_sequence_view, as_case_view)
265
267
 
266
268
  from sysmlpy.semantic import analyze, AnalysisResult, SemanticIssue, SemanticAnalyzer
267
269
 
@@ -4301,20 +4301,31 @@ def _escape_html(text):
4301
4301
 
4302
4302
 
4303
4303
  def _format_table_rows_plantuml(header, rows):
4304
- """Format a PlantUML salt table from header and rows."""
4304
+ """Format a PlantUML table from header and rows using rectangle-based layout.
4305
+
4306
+ Uses rectangle elements with | separated labels connected by [hidden] edges,
4307
+ compatible with PlantUML 1.2024.7+ (unlike deprecated salt syntax).
4308
+ """
4305
4309
  lines = []
4306
- lines.append("salt")
4307
- lines.append("{")
4308
- lines.append("{")
4309
- # Header row with bold formatting
4310
- header_line = "|+" + "+|+".join([str(h).replace("|", "\\|") for h in header]) + "+|"
4311
- lines.append(header_line)
4312
- for row in rows:
4313
- safe_row = [str(c).replace("|", "\\|") for c in row]
4314
- row_line = "|" + "|".join(safe_row) + "|"
4315
- lines.append(row_line)
4316
- lines.append("}")
4317
- lines.append("}")
4310
+ if not rows:
4311
+ return lines
4312
+
4313
+ # Header row with bold labels
4314
+ safe_header = [str(h).replace("|", "\\|").replace('"', "''") for h in header]
4315
+ header_label = "<b>" + "|</b><b>".join(safe_header) + "</b>"
4316
+ lines.append(f'rectangle "{header_label}" as HEADER #LightGray')
4317
+
4318
+ # Data rows
4319
+ for i, row in enumerate(rows):
4320
+ safe_row = [str(c).replace("|", "\\|").replace('"', "''") for c in row]
4321
+ row_label = "|".join(safe_row)
4322
+ lines.append(f'rectangle "{row_label}" as R{i}')
4323
+
4324
+ # Connect rows with hidden lines for proper layout
4325
+ lines.append('HEADER -[hidden]- R0')
4326
+ for i in range(len(rows) - 1):
4327
+ lines.append(f'R{i} -[hidden]- R{i+1}')
4328
+
4318
4329
  return lines
4319
4330
 
4320
4331
 
@@ -4387,9 +4398,6 @@ def as_tabular_view(model, focus=None, style="bw", output_format="markdown",
4387
4398
  Presents exposed model elements in a table with configurable columns.
4388
4399
  Default columns: Name, Type, Kind, Parent, Typed By, Specializes.
4389
4400
 
4390
- NOTE: For PlantUML 1.2024.7+, use output_format="markdown" or "html" as
4391
- the PlantUML table syntax has changed. Markdown and HTML formats work universally.
4392
-
4393
4401
  Args:
4394
4402
  model: A sysmlpy Model instance
4395
4403
  focus: Optional element to focus on (lists its subtree)
@@ -4453,7 +4461,7 @@ def as_tabular_view(model, focus=None, style="bw", output_format="markdown",
4453
4461
  parts = css_lines + parts
4454
4462
  return "\n".join(parts)
4455
4463
 
4456
- # PlantUML output (default) - use salt component
4464
+ # PlantUML output rectangle-based table for modern PlantUML compatibility
4457
4465
  lines = []
4458
4466
  lines.append("@startuml")
4459
4467
  lines.append("")
@@ -4505,15 +4513,12 @@ def as_data_value_tabular_view(model, focus=None, style="bw",
4505
4513
  Presents attribute elements and their values in a table.
4506
4514
  Shows: parent element, attribute name, value, unit, and attribute type.
4507
4515
 
4508
- NOTE: For PlantUML 1.2024.7+, use output_format="markdown" or "html" as
4509
- the PlantUML table syntax has changed. Markdown and HTML formats work universally.
4510
-
4511
4516
  Args:
4512
4517
  model: A sysmlpy Model instance
4513
4518
  focus: Optional element to focus on (lists its subtree)
4514
4519
  style: "bw" (default) or "color"
4515
4520
  output_format: "markdown" (default), "html", or "plantuml"
4516
- include_units: Whether to show units (default True)
4521
+ include_units: If True, includes unit column (default True)
4517
4522
  custom_style: Optional style lines (PlantUML) or CSS (HTML)
4518
4523
 
4519
4524
  Returns:
@@ -4662,9 +4667,6 @@ def as_relationship_matrix_view(model, focus=None, style="bw",
4662
4667
  Each cell indicates the type of relationship (C=composite, T=typing,
4663
4668
  G=specialization, B=binding, F=flow, etc.).
4664
4669
 
4665
- NOTE: For PlantUML 1.2024.7+, use output_format="markdown" or "html" as
4666
- the PlantUML table syntax has changed. Markdown and HTML formats work universally.
4667
-
4668
4670
  Args:
4669
4671
  model: A sysmlpy Model instance
4670
4672
  focus: Optional element to focus on (lists its subtree)
@@ -4745,7 +4747,7 @@ def as_relationship_matrix_view(model, focus=None, style="bw",
4745
4747
  parts.append("<!-- Legend: " + ", ".join(f"{k}={v}" for k, v in RELATIONSHIP_LABELS.items()) + " -->")
4746
4748
  return "\n".join(parts)
4747
4749
 
4748
- # PlantUML output (default) - use salt matrix
4750
+ # PlantUML output rectangle-based matrix for modern PlantUML compatibility
4749
4751
  lines = []
4750
4752
  lines.append("@startuml")
4751
4753
  lines.append("")
@@ -4775,18 +4777,24 @@ def as_relationship_matrix_view(model, focus=None, style="bw",
4775
4777
  lines.append(f'title {title}')
4776
4778
  lines.append("")
4777
4779
 
4778
- # Build PlantUML salt matrix
4779
- lines.append("salt")
4780
- lines.append("{")
4781
- # Header row (empty corner + column names)
4782
- header_cells = '| ' + ' | '.join(f'<&question> {h}' if h else '?' for h in [''] + header)
4783
- lines.append(header_cells)
4784
- # Data rows
4785
- for row in matrix_rows:
4786
- safe_row = [str(c).replace("|", "\\|").replace('"', "''") for c in row]
4787
- row_cells = '| ' + ' | '.join(safe_row)
4788
- lines.append(row_cells)
4789
- lines.append("}")
4780
+ # Build matrix using rectangle-based layout
4781
+ if matrix_rows:
4782
+ # Header row — empty corner cell + column names
4783
+ safe_header = [str(h).replace("|", "\\|").replace('"', "''") for h in header]
4784
+ header_label = "<b>|</b><b>" + "</b>|<b>".join(safe_header) + "</b>"
4785
+ lines.append(f'rectangle "{header_label}" as MAT_HEADER #LightGray')
4786
+
4787
+ # Data rows
4788
+ for i, row in enumerate(matrix_rows):
4789
+ safe_row = [str(c).replace("|", "\\|").replace('"', "''") for c in row]
4790
+ row_label = "|".join(safe_row)
4791
+ lines.append(f'rectangle "{row_label}" as M{i}')
4792
+
4793
+ # Connect rows
4794
+ lines.append('MAT_HEADER -[hidden]- M0')
4795
+ for i in range(len(matrix_rows) - 1):
4796
+ lines.append(f'M{i} -[hidden]- M{i+1}')
4797
+
4790
4798
  lines.append("")
4791
4799
 
4792
4800
  # Legend
@@ -4799,3 +4807,277 @@ def as_relationship_matrix_view(model, focus=None, style="bw",
4799
4807
  lines.append("")
4800
4808
  lines.append("@enduml")
4801
4809
  return "\n".join(lines)
4810
+
4811
+
4812
+ # ============================================================
4813
+ # 7. Sequence View
4814
+ # ============================================================
4815
+
4816
+ def as_sequence_view(model, focus=None, elements=None, style="bw",
4817
+ auto_include_flows=True, custom_style=None):
4818
+ """Generate a Sequence Diagram View.
4819
+
4820
+ Maps SysML v2 action flows and message passing between parts/actions
4821
+ onto PlantUML sequence diagram syntax. Each part or action becomes a
4822
+ lifeline; flow connections and action successions become messages.
4823
+
4824
+ Args:
4825
+ model: A sysmlpy Model instance
4826
+ focus: Optional element to focus on (renders its subtree)
4827
+ elements: Optional list of specific elements to include
4828
+ style: "bw" (default) or "color"
4829
+ auto_include_flows: Auto-discover flows connected to selected elements
4830
+ custom_style: Optional PlantUML style lines to append
4831
+
4832
+ Returns:
4833
+ str: PlantUML text
4834
+ """
4835
+ lines = []
4836
+ lines.append("@startuml")
4837
+ lines.append("")
4838
+
4839
+ if style == "bw":
4840
+ lines.extend([
4841
+ "skinparam monochrome true",
4842
+ "skinparam defaultFontSize 12",
4843
+ "skinparam defaultFontName Helvetica",
4844
+ ])
4845
+ else:
4846
+ lines.extend([
4847
+ "skinparam defaultFontSize 12",
4848
+ "skinparam defaultFontName Helvetica",
4849
+ ])
4850
+
4851
+ if custom_style:
4852
+ lines.append("")
4853
+ lines.extend(custom_style)
4854
+
4855
+ lines.append("")
4856
+
4857
+ title = "Sequence View"
4858
+ if focus is not None:
4859
+ focus_name = getattr(focus, 'name', None) or "Focus"
4860
+ title = f"Sequence View \u2014 {focus_name}"
4861
+ elif elements is not None:
4862
+ title = f"Sequence View \u2014 Selected Elements ({len(elements)})"
4863
+ lines.append(f'title {title}')
4864
+ lines.append("")
4865
+
4866
+ # Collect participants (lifelines)
4867
+ gen = PlantUMLGenerator(model, style=style, focus=focus,
4868
+ elements=elements, max_depth=None,
4869
+ include_legend=False, show_external=True)
4870
+ gen._build_inclusion_set()
4871
+ gen._traverse(gen.model)
4872
+
4873
+ participants = []
4874
+ for alias, name, stereotype, elem, is_included in gen.elements:
4875
+ sysml_type = getattr(elem, 'sysml_type', '')
4876
+ if sysml_type in ('part', 'action', 'state'):
4877
+ participants.append((alias, name, sysml_type))
4878
+
4879
+ # Deduplicate by alias
4880
+ seen = set()
4881
+ participants = [p for p in participants if not (p[0] in seen or seen.add(p[0]))]
4882
+
4883
+ for alias, name, sysml_type in participants:
4884
+ lines.append(f'participant "{name}" as {alias}')
4885
+
4886
+ lines.append("")
4887
+
4888
+ # Collect messages from flow connections
4889
+ messages = []
4890
+ flow_connections = _extract_flow_connections(model)
4891
+ for from_names, to_names, flow_name, is_grammar_obj in flow_connections:
4892
+ if not from_names or not to_names:
4893
+ continue
4894
+ from_name = from_names[0] if isinstance(from_names, list) else from_names
4895
+ to_name = to_names[0] if isinstance(to_names, list) else to_names
4896
+ label = flow_name or ""
4897
+ # Find matching participant aliases
4898
+ from_alias = None
4899
+ to_alias = None
4900
+ for alias, name, _ in participants:
4901
+ if name == from_name:
4902
+ from_alias = alias
4903
+ if name == to_name:
4904
+ to_alias = alias
4905
+ if from_alias and to_alias:
4906
+ arrow = "->"
4907
+ msg_line = f'{from_alias} {arrow} {to_alias}'
4908
+ if label:
4909
+ msg_line += f' : {label}'
4910
+ messages.append(msg_line)
4911
+
4912
+ # Also add messages from action successions in grammar bodies
4913
+ _add_succession_messages(model, messages, participants)
4914
+
4915
+ if not messages:
4916
+ lines.append("note top of **Participants**")
4917
+ lines.append(" No interactions found.")
4918
+ lines.append("end note")
4919
+ else:
4920
+ lines.extend(messages)
4921
+
4922
+ lines.append("")
4923
+ lines.append("@enduml")
4924
+ return "\n".join(lines)
4925
+
4926
+
4927
+ def _add_succession_messages(model, messages, participants):
4928
+ """Scan grammar bodies for action successions and add as messages."""
4929
+ visited = set()
4930
+
4931
+ def _scan(element):
4932
+ elem_id = id(element)
4933
+ if elem_id in visited:
4934
+ return
4935
+ visited.add(elem_id)
4936
+
4937
+ grammar = getattr(element, 'grammar', None)
4938
+ if grammar and hasattr(grammar, 'body') and grammar.body:
4939
+ _scan_body(grammar.body, element)
4940
+
4941
+ for child in getattr(element, 'children', []):
4942
+ _scan(child)
4943
+
4944
+ def _scan_body(body, parent):
4945
+ for child in getattr(body, 'children', []):
4946
+ if child.__class__.__name__ in ('SuccessionMember', 'GuardedSuccession'):
4947
+ _extract_succession(child, parent)
4948
+ elif child.__class__.__name__ == 'DefinitionBodyItem':
4949
+ for inner in getattr(child, 'children', []):
4950
+ if inner.__class__.__name__ in ('SuccessionMember', 'GuardedSuccession'):
4951
+ _extract_succession(inner, parent)
4952
+ _scan_body(inner, parent)
4953
+ else:
4954
+ _scan_body(child, parent)
4955
+
4956
+ def _extract_succession(succ, parent):
4957
+ source_name = getattr(succ, 'source', None)
4958
+ target_name = getattr(succ, 'target', None)
4959
+ if not source_name or not target_name:
4960
+ if hasattr(succ, 'children') and succ.children:
4961
+ for c in succ.children:
4962
+ if hasattr(c, 'source') and c.source:
4963
+ source_name = c.source
4964
+ if hasattr(c, 'target') and c.target:
4965
+ target_name = c.target
4966
+ if source_name and target_name:
4967
+ from_alias = None
4968
+ to_alias = None
4969
+ for alias, name, _ in participants:
4970
+ if name == source_name:
4971
+ from_alias = alias
4972
+ if name == target_name:
4973
+ to_alias = alias
4974
+ if from_alias and to_alias:
4975
+ msg = f'{from_alias} -> {to_alias} : succession'
4976
+ if msg not in messages:
4977
+ messages.append(msg)
4978
+
4979
+ _scan(model)
4980
+
4981
+
4982
+ # ============================================================
4983
+ # 8. Case / Use-Case View
4984
+ # ============================================================
4985
+
4986
+ def as_case_view(model, focus=None, elements=None, style="bw",
4987
+ custom_style=None):
4988
+ """Generate a Case / Use-Case Diagram View.
4989
+
4990
+ Maps SysML v2 actions (as use cases) and external parts (as actors)
4991
+ onto PlantUML use-case diagram syntax.
4992
+
4993
+ Args:
4994
+ model: A sysmlpy Model instance
4995
+ focus: Optional element to focus on (renders its subtree)
4996
+ elements: Optional list of specific elements to include
4997
+ style: "bw" (default) or "color"
4998
+ custom_style: Optional PlantUML style lines to append
4999
+
5000
+ Returns:
5001
+ str: PlantUML text
5002
+ """
5003
+ lines = []
5004
+ lines.append("@startuml")
5005
+ lines.append("")
5006
+
5007
+ if style == "bw":
5008
+ lines.extend([
5009
+ "skinparam monochrome true",
5010
+ "skinparam defaultFontSize 12",
5011
+ "skinparam defaultFontName Helvetica",
5012
+ ])
5013
+ else:
5014
+ lines.extend([
5015
+ "skinparam defaultFontSize 12",
5016
+ "skinparam defaultFontName Helvetica",
5017
+ ])
5018
+
5019
+ if custom_style:
5020
+ lines.append("")
5021
+ lines.extend(custom_style)
5022
+
5023
+ lines.append("")
5024
+
5025
+ title = "Case View"
5026
+ if focus is not None:
5027
+ focus_name = getattr(focus, 'name', None) or "Focus"
5028
+ title = f"Case View \u2014 {focus_name}"
5029
+ elif elements is not None:
5030
+ title = f"Case View \u2014 Selected Elements ({len(elements)})"
5031
+ lines.append(f'title {title}')
5032
+ lines.append("")
5033
+
5034
+ # Collect elements
5035
+ gen = PlantUMLGenerator(model, style=style, focus=focus,
5036
+ elements=elements, max_depth=None,
5037
+ include_legend=False, show_external=True)
5038
+ gen._build_inclusion_set()
5039
+ gen._traverse(gen.model)
5040
+
5041
+ actors = []
5042
+ usecases = []
5043
+ for alias, name, stereotype, elem, is_included in gen.elements:
5044
+ sysml_type = getattr(elem, 'sysml_type', '')
5045
+ if sysml_type == 'part':
5046
+ parent = getattr(elem, 'parent', None)
5047
+ if parent and getattr(parent, 'sysml_type', '') != 'part':
5048
+ actors.append((alias, name))
5049
+ elif sysml_type == 'action':
5050
+ usecases.append((alias, name))
5051
+
5052
+ # Deduplicate
5053
+ seen = set()
5054
+ actors = [a for a in actors if not (a[0] in seen or seen.add(a[0]))]
5055
+ seen = set()
5056
+ usecases = [u for u in usecases if not (u[0] in seen or seen.add(u[0]))]
5057
+
5058
+ # System boundary
5059
+ focus_name = getattr(focus, 'name', None) if focus else None
5060
+ system_name = focus_name or "System"
5061
+ lines.append(f'rectangle "{system_name}" {{')
5062
+
5063
+ for alias, name in usecases:
5064
+ lines.append(f' usecase "{name}" as {alias}')
5065
+
5066
+ lines.append("}")
5067
+ lines.append("")
5068
+
5069
+ for alias, name in actors:
5070
+ lines.append(f'actor "{name}" as {alias}')
5071
+
5072
+ if not usecases and not actors:
5073
+ lines.append("note top of **Elements**")
5074
+ lines.append(" No use cases or actors found in this scope.")
5075
+ lines.append("end note")
5076
+ else:
5077
+ for a_alias, _ in actors:
5078
+ for u_alias, _ in usecases:
5079
+ lines.append(f'{a_alias} --> {u_alias}')
5080
+
5081
+ lines.append("")
5082
+ lines.append("@enduml")
5083
+ return "\n".join(lines)
File without changes
File without changes
File without changes