sysmlpy 0.36.1__tar.gz → 0.36.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.36.1 → sysmlpy-0.36.2}/PKG-INFO +1 -1
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/pyproject.toml +1 -1
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/__init__.py +1 -1
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/usage.py +75 -4
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/LICENSE +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/README.md +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/__main__.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/README.md +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/SysMLv2Parser.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr_parser.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr_visitor.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/boxes_view.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/definition.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/examples/attribute_values.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/examples/part_attributes.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/examples/tuples_sequences.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/formatting.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/README.md +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.g4 +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.g4 +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/desc.xml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/examples/camera.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/examples/toaster-system.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/examples/vehicle-model.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/antlr4/pom.xml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/grammar/classes.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/LICENSE +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/README.md +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/__init__.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Analysis/AnalysisTooling.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Analysis/TradeStudies.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Cause and Effect/CausationConnections.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Geometry/ShapeItems.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Geometry/SpatialItems.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Metadata/ImageMetadata.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Metadata/ParametersOfInterestMetadata.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Metadata/RiskMetadata.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQ.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQChemistryMolecular.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQCondensedMatter.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQElectromagnetism.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQInformation.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQThermodynamics.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/MeasurementRefCalculations.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/MeasurementReferences.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/QuantityCalculations.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/SI.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/TensorCalculations.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/USCustomaryUnits.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/VectorCalculations.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Requirement Derivation/DerivationConnections.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Requirement Derivation/RequirementDerivation.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/Base.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/BaseFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/BooleanFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/Clocks.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/CollectionFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/Collections.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/ComplexFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/ControlFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/ControlPerformances.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/DataFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/IntegerFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/KerML.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/Links.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/Metaobjects.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/NaturalFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/NumericalFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/Objects.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/Observation.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/OccurrenceFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/Occurrences.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/Performances.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/RationalFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/RealFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/ScalarFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/ScalarValues.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/SequenceFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/SpatialFrames.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/StatePerformances.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/StringFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/Transfers.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/TransitionPerformances.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/TrigFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/Triggers.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/VectorFunctions.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/VectorValues.kerml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Actions.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Allocations.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/AnalysisCases.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Attributes.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Calculations.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Cases.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Connections.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Constraints.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Flows.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Interfaces.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Items.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Metadata.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Parts.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Ports.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Requirements.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/StandardViewDefinitions.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/States.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/SysML.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/UseCases.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/VerificationCases.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/systems/Views.sysml +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/navigate.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/plantuml.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/project.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/semantic.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/store.py +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/us_customary_units.txt +0 -0
- {sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/validator.py +0 -0
|
@@ -24,7 +24,7 @@ __all__ = [
|
|
|
24
24
|
"render_state_transition_view_svg", "boxes_view",
|
|
25
25
|
]
|
|
26
26
|
__author__ = "Jon Fox"
|
|
27
|
-
__version__ = "0.36.
|
|
27
|
+
__version__ = "0.36.2"
|
|
28
28
|
|
|
29
29
|
from sysmlpy.usage import (
|
|
30
30
|
Item, Attribute, Part, Port, Action, Reference, UseCase, Requirement, Interface, Message,
|
|
@@ -2585,7 +2585,12 @@ class Requirement(Usage):
|
|
|
2585
2585
|
body_items = []
|
|
2586
2586
|
|
|
2587
2587
|
if self.doc:
|
|
2588
|
-
|
|
2588
|
+
if '\n' in self.doc:
|
|
2589
|
+
lines = self.doc.split('\n')
|
|
2590
|
+
doc_block = ['doc /*'] + [f' * {l}' for l in lines] + [' */']
|
|
2591
|
+
body_items.append('\n'.join(doc_block))
|
|
2592
|
+
else:
|
|
2593
|
+
body_items.append(f"doc /* {self.doc} */")
|
|
2589
2594
|
|
|
2590
2595
|
if self.subject:
|
|
2591
2596
|
subj_name, subj_type = self.subject
|
|
@@ -2612,8 +2617,12 @@ class Requirement(Usage):
|
|
|
2612
2617
|
for expr in self.assume_constraints:
|
|
2613
2618
|
body_items.append(f"assume constraint {{ {expr} }}")
|
|
2614
2619
|
|
|
2620
|
+
for child in self.children:
|
|
2621
|
+
body_items.append(child.dump())
|
|
2622
|
+
|
|
2615
2623
|
if body_items:
|
|
2616
|
-
|
|
2624
|
+
indented = [item.replace('\n', '\n ') for item in body_items]
|
|
2625
|
+
body = " {\n " + "\n ".join(indented) + "\n}"
|
|
2617
2626
|
return f"{keyword}{shortname_str} {name_str}{type_suffix}{body}"
|
|
2618
2627
|
else:
|
|
2619
2628
|
return f"{keyword}{shortname_str} {name_str}{type_suffix};"
|
|
@@ -2641,7 +2650,13 @@ class Requirement(Usage):
|
|
|
2641
2650
|
# Extract name from declaration.identification
|
|
2642
2651
|
if hasattr(grammar, 'declaration') and grammar.declaration:
|
|
2643
2652
|
if hasattr(grammar.declaration, 'identification') and grammar.declaration.identification:
|
|
2644
|
-
|
|
2653
|
+
ident = grammar.declaration.identification
|
|
2654
|
+
self.name = ident.declaredName
|
|
2655
|
+
sn = getattr(ident, 'declaredShortName', None)
|
|
2656
|
+
if sn:
|
|
2657
|
+
sn = sn.strip('<>').strip()
|
|
2658
|
+
if sn:
|
|
2659
|
+
self.req_shortname = sn
|
|
2645
2660
|
else:
|
|
2646
2661
|
# RequirementUsage
|
|
2647
2662
|
self.is_definition = False
|
|
@@ -2654,7 +2669,13 @@ class Requirement(Usage):
|
|
|
2654
2669
|
if hasattr(inner_decl, 'declaration') and inner_decl.declaration:
|
|
2655
2670
|
feat_decl = inner_decl.declaration
|
|
2656
2671
|
if hasattr(feat_decl, 'identification') and feat_decl.identification:
|
|
2657
|
-
|
|
2672
|
+
ident = feat_decl.identification
|
|
2673
|
+
self.name = ident.declaredName
|
|
2674
|
+
sn = getattr(ident, 'declaredShortName', None)
|
|
2675
|
+
if sn:
|
|
2676
|
+
sn = sn.strip('<>').strip()
|
|
2677
|
+
if sn:
|
|
2678
|
+
self.req_shortname = sn
|
|
2658
2679
|
|
|
2659
2680
|
# Extract body content
|
|
2660
2681
|
body = getattr(grammar, 'body', None)
|
|
@@ -2664,6 +2685,7 @@ class Requirement(Usage):
|
|
|
2664
2685
|
child_class = item.child.__class__.__name__
|
|
2665
2686
|
if child_class == "DefinitionBodyItem":
|
|
2666
2687
|
self._extract_nested_requirements(item.child)
|
|
2688
|
+
self._extract_doc_from_body_item(item.child)
|
|
2667
2689
|
elif child_class == "RequirementConstraintMember":
|
|
2668
2690
|
pass # could extract constraints
|
|
2669
2691
|
elif child_class == "SubjectMember":
|
|
@@ -2708,6 +2730,55 @@ class Requirement(Usage):
|
|
|
2708
2730
|
elif target_cls and "Requirement" in target_cls:
|
|
2709
2731
|
print(f"[Requirement] Unhandled nested requirement type: {target_cls}")
|
|
2710
2732
|
|
|
2733
|
+
def _extract_doc_from_body_item(self, def_body_item):
|
|
2734
|
+
"""Find a Documentation node inside a DefinitionBodyItem and set self.doc.
|
|
2735
|
+
|
|
2736
|
+
Traversal path (per grammar/classes.py):
|
|
2737
|
+
DefinitionBodyItem
|
|
2738
|
+
-> DefinitionMember (other member types hold requirements, not docs)
|
|
2739
|
+
-> DefinitionElement
|
|
2740
|
+
-> AnnotatingElement
|
|
2741
|
+
-> Documentation (stored as .children, single object)
|
|
2742
|
+
"""
|
|
2743
|
+
for member in getattr(def_body_item, 'children', []) or []:
|
|
2744
|
+
if member.__class__.__name__ != "DefinitionMember":
|
|
2745
|
+
continue
|
|
2746
|
+
for element in getattr(member, 'children', []) or []:
|
|
2747
|
+
for ae in getattr(element, 'children', []) or []:
|
|
2748
|
+
if ae.__class__.__name__ != "AnnotatingElement":
|
|
2749
|
+
continue
|
|
2750
|
+
doc = getattr(ae, 'children', None)
|
|
2751
|
+
if doc is None:
|
|
2752
|
+
continue
|
|
2753
|
+
doc_cls = doc.__class__.__name__
|
|
2754
|
+
if doc_cls in ("Documentation", "CommentSysML"):
|
|
2755
|
+
text = _comment_body_to_text(getattr(doc, 'body', ''))
|
|
2756
|
+
if text:
|
|
2757
|
+
self.doc = text
|
|
2758
|
+
|
|
2759
|
+
|
|
2760
|
+
def _comment_body_to_text(body):
|
|
2761
|
+
"""Extract plain text from a SysML comment body like '/* ... */'.
|
|
2762
|
+
|
|
2763
|
+
Strips the comment delimiters and the leading '*' marker from each line,
|
|
2764
|
+
then collapses to non-empty lines joined by newlines.
|
|
2765
|
+
"""
|
|
2766
|
+
if not body:
|
|
2767
|
+
return None
|
|
2768
|
+
s = body.strip()
|
|
2769
|
+
if s.startswith('/*'):
|
|
2770
|
+
s = s[2:]
|
|
2771
|
+
if s.endswith('*/'):
|
|
2772
|
+
s = s[:-2]
|
|
2773
|
+
lines = []
|
|
2774
|
+
for line in s.splitlines():
|
|
2775
|
+
line = line.strip()
|
|
2776
|
+
if line.startswith('*'):
|
|
2777
|
+
line = line[1:].lstrip()
|
|
2778
|
+
if line:
|
|
2779
|
+
lines.append(line)
|
|
2780
|
+
return '\n'.join(lines) if lines else None
|
|
2781
|
+
|
|
2711
2782
|
|
|
2712
2783
|
class Message(Usage):
|
|
2713
2784
|
sysml_type = 'message'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp
RENAMED
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py
RENAMED
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.36.1 → sysmlpy-0.36.2}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|