sysmlpy 0.29.0__tar.gz → 0.30.0__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.29.0 → sysmlpy-0.30.0}/PKG-INFO +1 -1
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/pyproject.toml +2 -2
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/__init__.py +1 -1
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/definition.py +18 -12
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/semantic.py +7 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/store.py +19 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/usage.py +45 -32
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/LICENSE +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/README.md +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/__main__.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr/README.md +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2Parser.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr_parser.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr_visitor.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/examples/attribute_values.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/examples/part_attributes.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/examples/tuples_sequences.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/formatting.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/README.md +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.g4 +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.g4 +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/desc.xml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/examples/camera.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/examples/toaster-system.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/examples/vehicle-model.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/antlr4/pom.xml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/grammar/classes.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/LICENSE +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/README.md +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/__init__.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Analysis/AnalysisTooling.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Analysis/TradeStudies.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Cause and Effect/CausationConnections.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Geometry/ShapeItems.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Geometry/SpatialItems.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Metadata/ImageMetadata.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Metadata/ParametersOfInterestMetadata.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Metadata/RiskMetadata.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQ.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQChemistryMolecular.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCondensedMatter.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQElectromagnetism.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQInformation.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQThermodynamics.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementRefCalculations.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementReferences.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/QuantityCalculations.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/SI.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/TensorCalculations.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/USCustomaryUnits.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/VectorCalculations.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Requirement Derivation/DerivationConnections.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Requirement Derivation/RequirementDerivation.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Base.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/BaseFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/BooleanFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Clocks.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/CollectionFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Collections.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/ComplexFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/ControlFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/ControlPerformances.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/DataFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/IntegerFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/KerML.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Links.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Metaobjects.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/NaturalFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/NumericalFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Objects.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Observation.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/OccurrenceFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Occurrences.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Performances.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/RationalFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/RealFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/ScalarFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/ScalarValues.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/SequenceFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/SpatialFrames.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/StatePerformances.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/StringFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Transfers.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/TransitionPerformances.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/TrigFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/Triggers.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/VectorFunctions.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/kernel/VectorValues.kerml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Actions.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Allocations.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/AnalysisCases.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Attributes.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Calculations.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Cases.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Connections.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Constraints.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Flows.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Interfaces.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Items.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Metadata.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Parts.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Ports.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Requirements.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/StandardViewDefinitions.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/States.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/SysML.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/UseCases.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/VerificationCases.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/systems/Views.sysml +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/navigate.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/plantuml.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/project.py +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/us_customary_units.txt +0 -0
- {sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/validator.py +0 -0
|
@@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "sysmlpy"
|
|
9
|
-
version = "0.
|
|
9
|
+
version = "0.30.0"
|
|
10
10
|
description = "SysML v2.0 Parser"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name="Jon R. Fox (mycr0ft)", email="jon.fox@drfox.com" },
|
|
@@ -114,7 +114,7 @@ build_command = "pip install poetry && poetry build"
|
|
|
114
114
|
|
|
115
115
|
[tool.poetry]
|
|
116
116
|
name = "sysmlpy"
|
|
117
|
-
version = "0.
|
|
117
|
+
version = "0.30.0"
|
|
118
118
|
description = ""
|
|
119
119
|
authors = ["Jon R. Fox (mycr0ft) <jon.fox@drfox.com>"]
|
|
120
120
|
readme = "README.md"
|
|
@@ -20,7 +20,7 @@ __all__ = [
|
|
|
20
20
|
"analyze", "SemanticIssue", "SemanticAnalyzer",
|
|
21
21
|
]
|
|
22
22
|
__author__ = "Jon Fox"
|
|
23
|
-
__version__ = "0.
|
|
23
|
+
__version__ = "0.30.0"
|
|
24
24
|
|
|
25
25
|
from sysmlpy.usage import (
|
|
26
26
|
Item, Attribute, Part, Port, Action, Reference, UseCase, Requirement, Interface, Message,
|
|
@@ -399,25 +399,31 @@ class Package(Searchable):
|
|
|
399
399
|
self._set_name(shortname, short=True)
|
|
400
400
|
|
|
401
401
|
def __repr__(self):
|
|
402
|
-
"""Return a
|
|
402
|
+
"""Return a constructor-mirroring string representation.
|
|
403
403
|
|
|
404
404
|
Returns
|
|
405
405
|
-------
|
|
406
406
|
str
|
|
407
|
-
String showing name and shortname for debugging.
|
|
408
407
|
"""
|
|
409
408
|
name = getattr(self, 'name', None)
|
|
410
|
-
|
|
411
|
-
|
|
409
|
+
# Suppress auto-generated UUID names
|
|
410
|
+
if name and len(name) == 36 and name.count('-') == 4:
|
|
411
|
+
name = None
|
|
412
|
+
|
|
413
|
+
try:
|
|
414
|
+
shortname = getattr(self.grammar.declaration.identification, 'declaredShortName', None)
|
|
415
|
+
if shortname:
|
|
416
|
+
shortname = shortname.strip('<').strip('>')
|
|
417
|
+
except (AttributeError, TypeError):
|
|
418
|
+
shortname = None
|
|
419
|
+
|
|
412
420
|
cls_name = self.__class__.__name__
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
else:
|
|
420
|
-
return f"{cls_name}()"
|
|
421
|
+
parts = []
|
|
422
|
+
if name:
|
|
423
|
+
parts.append(f'name={name!r}')
|
|
424
|
+
if shortname:
|
|
425
|
+
parts.append(f'shortname={shortname!r}')
|
|
426
|
+
return f"{cls_name}({', '.join(parts)})"
|
|
421
427
|
|
|
422
428
|
def _set_name(self, name, short=False):
|
|
423
429
|
"""Set the declared name or short name on the package grammar.
|
|
@@ -257,6 +257,10 @@ class SymbolTable:
|
|
|
257
257
|
self._definition_features: dict[str, dict[str, Any]] = {} # definition_name -> {element, features, supertypes}
|
|
258
258
|
self._duplicate_names: list[tuple[str, Any]] = [] # (name, element) for duplicates
|
|
259
259
|
|
|
260
|
+
def __repr__(self) -> str:
|
|
261
|
+
return (f"SymbolTable(symbols={len(self._symbols)}, "
|
|
262
|
+
f"children={len(self._children)})")
|
|
263
|
+
|
|
260
264
|
# -- public API ----------------------------------------------------------
|
|
261
265
|
|
|
262
266
|
def register(self, name: str, element: Any) -> None:
|
|
@@ -934,6 +938,9 @@ _KNOWN_LIBRARY_SYMBOLS = frozenset({
|
|
|
934
938
|
class SemanticAnalyzer:
|
|
935
939
|
"""Analyzes a parsed SysML model for semantic issues."""
|
|
936
940
|
|
|
941
|
+
def __repr__(self) -> str:
|
|
942
|
+
return "SemanticAnalyzer()"
|
|
943
|
+
|
|
937
944
|
def analyze(
|
|
938
945
|
self,
|
|
939
946
|
model: Any,
|
|
@@ -238,6 +238,11 @@ class InMemoryStore(Store):
|
|
|
238
238
|
self._parents: dict[str, list[str]] = {}
|
|
239
239
|
self._edges: dict[str, list[tuple[str, str, dict]]] = {}
|
|
240
240
|
|
|
241
|
+
def __repr__(self) -> str:
|
|
242
|
+
n_elem = len(self._elements)
|
|
243
|
+
n_edge = sum(len(v) for v in self._edges.values())
|
|
244
|
+
return f"InMemoryStore(elements={n_elem}, edges={n_edge})"
|
|
245
|
+
|
|
241
246
|
def put(self, element_id: str, data: dict,
|
|
242
247
|
parent_id: Optional[str] = None,
|
|
243
248
|
rel_type: str = REL_PARENT_CHILD) -> None:
|
|
@@ -473,12 +478,17 @@ class NetworkXStore(Store):
|
|
|
473
478
|
a MultiGraph for undirected relationships.
|
|
474
479
|
"""
|
|
475
480
|
import networkx as nx
|
|
481
|
+
self._directed = directed
|
|
476
482
|
if directed:
|
|
477
483
|
self._graph = nx.MultiDiGraph()
|
|
478
484
|
else:
|
|
479
485
|
self._graph = nx.MultiGraph()
|
|
480
486
|
self._nx = nx
|
|
481
487
|
|
|
488
|
+
def __repr__(self) -> str:
|
|
489
|
+
return (f"NetworkXStore(nodes={self._graph.number_of_nodes()}, "
|
|
490
|
+
f"edges={self._graph.number_of_edges()}, directed={self._directed})")
|
|
491
|
+
|
|
482
492
|
def put(self, element_id: str, data: dict,
|
|
483
493
|
parent_id: Optional[str] = None,
|
|
484
494
|
rel_type: str = REL_PARENT_CHILD) -> None:
|
|
@@ -852,10 +862,14 @@ class KuzuStore(Store):
|
|
|
852
862
|
Path to the database directory, or ":memory:" for in-memory mode.
|
|
853
863
|
"""
|
|
854
864
|
import kuzu
|
|
865
|
+
self._database = database
|
|
855
866
|
self._db = kuzu.Database(database)
|
|
856
867
|
self._conn = kuzu.Connection(self._db)
|
|
857
868
|
self._init_schema()
|
|
858
869
|
|
|
870
|
+
def __repr__(self) -> str:
|
|
871
|
+
return f"KuzuStore(database={self._database!r})"
|
|
872
|
+
|
|
859
873
|
def _init_schema(self) -> None:
|
|
860
874
|
"""Create the node and relationship tables if they don't exist."""
|
|
861
875
|
self._conn.execute(
|
|
@@ -1422,10 +1436,15 @@ class CayleyStore(Store):
|
|
|
1422
1436
|
label : str
|
|
1423
1437
|
Quad label namespace for isolating data.
|
|
1424
1438
|
"""
|
|
1439
|
+
self._host = host
|
|
1440
|
+
self._port = port
|
|
1425
1441
|
self._base_url = f"http://{host}:{port}"
|
|
1426
1442
|
self._label = label
|
|
1427
1443
|
self._session = None
|
|
1428
1444
|
|
|
1445
|
+
def __repr__(self) -> str:
|
|
1446
|
+
return f"CayleyStore(host={self._host!r}, port={self._port}, label={self._label!r})"
|
|
1447
|
+
|
|
1429
1448
|
def _get_session(self):
|
|
1430
1449
|
"""Get or create a requests session."""
|
|
1431
1450
|
if self._session is None:
|
|
@@ -18,6 +18,20 @@ import os
|
|
|
18
18
|
|
|
19
19
|
ureg = pint.UnitRegistry()
|
|
20
20
|
|
|
21
|
+
|
|
22
|
+
def _is_uuid(s: str) -> bool:
|
|
23
|
+
"""Return True if *s* looks like an auto-generated UUID4 string."""
|
|
24
|
+
if not isinstance(s, str) or len(s) != 36:
|
|
25
|
+
return False
|
|
26
|
+
parts = s.split('-')
|
|
27
|
+
if len(parts) != 5:
|
|
28
|
+
return False
|
|
29
|
+
lengths = [8, 4, 4, 4, 12]
|
|
30
|
+
return all(
|
|
31
|
+
len(p) == n and all(c in '0123456789abcdef' for c in p.lower())
|
|
32
|
+
for p, n in zip(parts, lengths)
|
|
33
|
+
)
|
|
34
|
+
|
|
21
35
|
# Load custom US Customary unit definitions
|
|
22
36
|
_us_customary_path = os.path.join(os.path.dirname(__file__), "us_customary_units.txt")
|
|
23
37
|
if os.path.exists(_us_customary_path):
|
|
@@ -300,57 +314,56 @@ class Usage(Searchable):
|
|
|
300
314
|
return classtree(self._get_definition(child)).dump()
|
|
301
315
|
|
|
302
316
|
def __repr__(self):
|
|
303
|
-
"""Return a
|
|
317
|
+
"""Return a constructor-mirroring string representation.
|
|
318
|
+
|
|
319
|
+
Output can be passed back to the class constructor to recreate an
|
|
320
|
+
equivalent (though unpopulated-grammar) instance::
|
|
304
321
|
|
|
305
|
-
|
|
322
|
+
Part(definition=True, name='Engine')
|
|
323
|
+
Part(name='wheel', shortname='w')
|
|
324
|
+
Action()
|
|
306
325
|
|
|
307
326
|
Returns
|
|
308
327
|
-------
|
|
309
328
|
str
|
|
310
|
-
String representation suitable for debugging.
|
|
311
329
|
"""
|
|
312
|
-
#
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
id_obj = getattr(id_obj.declaration, 'declaration', None)
|
|
319
|
-
if id_obj:
|
|
320
|
-
name = getattr(id_obj.identification, 'declaredName', None)
|
|
321
|
-
except (AttributeError, TypeError):
|
|
330
|
+
# Use the is_definition property — reliable across all 29 subclasses
|
|
331
|
+
is_def = self.is_definition
|
|
332
|
+
|
|
333
|
+
# Suppress auto-generated UUID names (they are meaningless to callers)
|
|
334
|
+
name = getattr(self, 'name', None)
|
|
335
|
+
if name and _is_uuid(name):
|
|
322
336
|
name = None
|
|
323
|
-
|
|
324
|
-
#
|
|
337
|
+
|
|
338
|
+
# Shortname from grammar when present — path differs by definition vs usage
|
|
339
|
+
shortname = None
|
|
325
340
|
try:
|
|
326
|
-
shortname = None
|
|
327
341
|
id_obj = getattr(self.grammar, 'usage', None)
|
|
328
342
|
if id_obj:
|
|
329
343
|
id_obj = getattr(id_obj.declaration, 'declaration', None)
|
|
330
344
|
if id_obj:
|
|
331
345
|
shortname = getattr(id_obj.identification, 'declaredShortName', None)
|
|
346
|
+
if not shortname:
|
|
347
|
+
# Definition path: grammar.definition.declaration.identification.declaredShortName
|
|
348
|
+
def_obj = getattr(self.grammar, 'definition', None)
|
|
349
|
+
if def_obj:
|
|
350
|
+
id_obj = getattr(def_obj, 'declaration', None)
|
|
351
|
+
if id_obj:
|
|
352
|
+
shortname = getattr(id_obj.identification, 'declaredShortName', None)
|
|
332
353
|
if shortname:
|
|
333
354
|
shortname = shortname.strip('<').strip('>')
|
|
334
355
|
except (AttributeError, TypeError):
|
|
335
356
|
shortname = None
|
|
336
|
-
|
|
337
|
-
is_def = hasattr(self.grammar, 'definition')
|
|
357
|
+
|
|
338
358
|
cls_name = self.__class__.__name__
|
|
339
|
-
|
|
359
|
+
parts = []
|
|
340
360
|
if is_def:
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
else:
|
|
348
|
-
if name and shortname:
|
|
349
|
-
return f"{cls_name}(name={name!r}, shortname={shortname!r})"
|
|
350
|
-
elif name:
|
|
351
|
-
return f"{cls_name}(name={name!r})"
|
|
352
|
-
else:
|
|
353
|
-
return f"{cls_name}()"
|
|
361
|
+
parts.append('definition=True')
|
|
362
|
+
if name:
|
|
363
|
+
parts.append(f'name={name!r}')
|
|
364
|
+
if shortname:
|
|
365
|
+
parts.append(f'shortname={shortname!r}')
|
|
366
|
+
return f"{cls_name}({', '.join(parts)})"
|
|
354
367
|
|
|
355
368
|
def _set_name(self, name, short=False):
|
|
356
369
|
"""Set the declared name or short name on the grammar element.
|
|
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.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp
RENAMED
|
File without changes
|
{sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py
RENAMED
|
File without changes
|
{sysmlpy-0.29.0 → sysmlpy-0.30.0}/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
|
{sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.29.0 → sysmlpy-0.30.0}/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.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml
RENAMED
|
File without changes
|
{sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sysmlpy-0.29.0 → sysmlpy-0.30.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml
RENAMED
|
File without changes
|
|
File without changes
|
{sysmlpy-0.29.0 → sysmlpy-0.30.0}/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.29.0 → sysmlpy-0.30.0}/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
|