sysmlpy 0.91.0__tar.gz → 0.96.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.91.0 → sysmlpy-0.96.0}/PKG-INFO +124 -2
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/README.md +120 -1
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/pyproject.toml +3 -1
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/__init__.py +5 -1
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/__main__.py +124 -1
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/antlr_visitor.py +115 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/evaluator.py +27 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/classes.py +8 -1
- sysmlpy-0.96.0/src/sysmlpy/kerml/KerMLLexer.g4 +11 -0
- sysmlpy-0.96.0/src/sysmlpy/kerml/KerMLLexer.interp +482 -0
- sysmlpy-0.96.0/src/sysmlpy/kerml/KerMLLexer.py +751 -0
- sysmlpy-0.96.0/src/sysmlpy/kerml/KerMLLexer.tokens +302 -0
- sysmlpy-0.96.0/src/sysmlpy/kerml/KerMLParser.g4 +16 -0
- sysmlpy-0.96.0/src/sysmlpy/kerml/KerMLParser.interp +519 -0
- sysmlpy-0.96.0/src/sysmlpy/kerml/KerMLParser.py +15048 -0
- sysmlpy-0.96.0/src/sysmlpy/kerml/KerMLParser.tokens +305 -0
- sysmlpy-0.96.0/src/sysmlpy/kerml/KerMLParserVisitor.py +973 -0
- sysmlpy-0.96.0/src/sysmlpy/kerml/README.md +45 -0
- sysmlpy-0.96.0/src/sysmlpy/kerml/__init__.py +18 -0
- sysmlpy-0.96.0/src/sysmlpy/kerml/kerml.py +117 -0
- sysmlpy-0.96.0/src/sysmlpy/kerml/kerml_visitor.py +482 -0
- sysmlpy-0.96.0/src/sysmlpy/mdtables.py +243 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/plantuml.py +509 -17
- sysmlpy-0.96.0/src/sysmlpy/repl.py +638 -0
- sysmlpy-0.96.0/src/sysmlpy/reqif_io.py +411 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/semantic.py +90 -1
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/traceability.py +4 -2
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/usage.py +114 -1
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/LICENSE +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/antlr/README.md +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/antlr/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/antlr/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/antlr/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/antlr/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/antlr/SysMLv2Parser.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/antlr/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/antlr/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/antlr/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/antlr/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/antlr_parser.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/boxes_view.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/definition.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/dfa_cache.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/diff.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/examples/attribute_values.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/examples/part_attributes.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/examples/tuples_sequences.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/formatting.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/README.md +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.g4 +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.interp +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/SysMLv2Lexer.tokens +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.g4 +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.interp +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/SysMLv2Parser.tokens +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserListener.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/SysMLv2ParserVisitor.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/desc.xml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/examples/camera.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/examples/toaster-system.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/examples/vehicle-model.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/grammar/antlr4/pom.xml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/interchange.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/ipython_magic.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/LICENSE +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/README.md +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/__init__.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Analysis/AnalysisTooling.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Analysis/SampledFunctions.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Analysis/StateSpaceRepresentation.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Analysis/TradeStudies.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Cause and Effect/CausationConnections.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Cause and Effect/CauseAndEffect.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Geometry/ShapeItems.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Geometry/SpatialItems.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Metadata/ImageMetadata.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Metadata/ModelingMetadata.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Metadata/ParametersOfInterestMetadata.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Metadata/RiskMetadata.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/ISQ.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAcoustics.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/ISQBase.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/ISQChemistryMolecular.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/ISQCondensedMatter.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/ISQElectromagnetism.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/ISQInformation.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/ISQLight.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/ISQMechanics.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/ISQSpaceTime.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/ISQThermodynamics.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementRefCalculations.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/MeasurementReferences.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/Quantities.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/QuantityCalculations.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/SI.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/SIPrefixes.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/TensorCalculations.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/Time.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/USCustomaryUnits.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Quantities and Units/VectorCalculations.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Requirement Derivation/DerivationConnections.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/domain/Requirement Derivation/RequirementDerivation.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/Base.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/BaseFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/BooleanFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/Clocks.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/CollectionFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/Collections.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/ComplexFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/ControlFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/ControlPerformances.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/DataFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/FeatureReferencingPerformances.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/IntegerFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/KerML.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/Links.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/Metaobjects.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/NaturalFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/NumericalFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/Objects.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/Observation.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/OccurrenceFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/Occurrences.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/Performances.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/RationalFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/RealFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/ScalarFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/ScalarValues.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/SequenceFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/SpatialFrames.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/StatePerformances.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/StringFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/Transfers.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/TransitionPerformances.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/TrigFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/Triggers.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/VectorFunctions.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/kernel/VectorValues.kerml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Actions.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Allocations.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/AnalysisCases.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Attributes.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Calculations.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Cases.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Connections.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Constraints.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Flows.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Interfaces.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Items.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Metadata.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Parts.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Ports.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Requirements.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/StandardViewDefinitions.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/States.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/SysML.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/UseCases.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/VerificationCases.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/library/systems/Views.sysml +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/lsp/__init__.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/lsp/__main__.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/lsp/protocol.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/lsp/server.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/lsp/stdio.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/navigate.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/project.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/sim.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/spreadsheet.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/store.py +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/us_customary_units.txt +0 -0
- {sysmlpy-0.91.0 → sysmlpy-0.96.0}/src/sysmlpy/validator.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sysmlpy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.96.0
|
|
4
4
|
Summary:
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Author: Jon R. Fox (mycr0ft)
|
|
@@ -13,10 +13,12 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.14
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
16
17
|
Provides-Extra: cayley
|
|
17
18
|
Provides-Extra: graph
|
|
18
19
|
Provides-Extra: jupyter
|
|
19
20
|
Provides-Extra: kuzu
|
|
21
|
+
Provides-Extra: reqif
|
|
20
22
|
Provides-Extra: sim
|
|
21
23
|
Provides-Extra: xlsx
|
|
22
24
|
Requires-Dist: antlr4-python3-runtime (>=4.13)
|
|
@@ -27,6 +29,7 @@ Requires-Dist: networkx (>=3.0) ; extra == "graph"
|
|
|
27
29
|
Requires-Dist: openpyxl (>=3.1) ; extra == "xlsx"
|
|
28
30
|
Requires-Dist: pint (>=0.24)
|
|
29
31
|
Requires-Dist: pyyaml (>=6.0)
|
|
32
|
+
Requires-Dist: reqif (>=0.1) ; extra == "reqif"
|
|
30
33
|
Requires-Dist: requests (>=2.31) ; extra == "cayley"
|
|
31
34
|
Requires-Dist: transitions (>=0.9,<0.10) ; extra == "sim"
|
|
32
35
|
Description-Content-Type: text/markdown
|
|
@@ -73,6 +76,7 @@ sysmlpy requires the following Python packages:
|
|
|
73
76
|
- [networkx](https://networkx.org/) — graph analysis backend (install with `pip install sysmlpy[graph]`)
|
|
74
77
|
- [kuzu](https://kuzudb.com/) — embedded graph database with disk persistence and Cypher queries (install with `pip install sysmlpy[kuzu]`)
|
|
75
78
|
- [cayley](https://cayley.io/) — graph database via HTTP API, supports BoltDB/LevelDB backends (install with `pip install sysmlpy[cayley]`)
|
|
79
|
+
- [reqif](https://github.com/strictdoc-project/reqif) — ReqIF 1.0 requirements interchange, import/export with any ReqIF-capable tool (install with `pip install sysmlpy[reqif]`; see [ReqIF Interchange](#reqif-interchange-requirements-interchange-format))
|
|
76
80
|
- [PlantUML](https://plantuml.com/) **v1.2020.0+** — diagram rendering (requires Java + PlantUML JAR or [PlantUML server](https://www.plantuml.com/plantuml)). The generator uses `<style>` blocks and `skinparam` stereotype selectors introduced in v1.2020.
|
|
77
81
|
- [IPython](https://ipython.org/) **v8.0+** — the `%%sysml` Jupyter cell magic (install with `pip install sysmlpy[jupyter]`; see [Jupyter integration](#jupyter-integration))
|
|
78
82
|
|
|
@@ -133,6 +137,40 @@ and the mapping to this implementation — is in the
|
|
|
133
137
|
[sysml-copier](https://github.com/mycr0ft/sysml-copier) template's
|
|
134
138
|
`docs/sysml-magics.md`.
|
|
135
139
|
|
|
140
|
+
## Interactive REPL
|
|
141
|
+
|
|
142
|
+
`sysmlpy repl [FILE ...]` is a terminal session in the same spirit: each
|
|
143
|
+
submission is a SysML declaration, an expression, or a `%command`, and
|
|
144
|
+
declarations accumulate into a session model with the same
|
|
145
|
+
member-granularity merge as the Jupyter magics (a re-declared member
|
|
146
|
+
replaces its prior definition, sibling members are kept, and a
|
|
147
|
+
`note:` line says so). Submissions continue onto a `...>` line while
|
|
148
|
+
brackets stay open; a line that is not a declaration evaluates as an
|
|
149
|
+
expression. Ctrl-D or `%quit` exits; `%reset` discards the session.
|
|
150
|
+
|
|
151
|
+
| Command | Purpose |
|
|
152
|
+
|---------|---------|
|
|
153
|
+
| `%list [NAME]` | Packages (with member counts), or elements matching NAME with qualified names |
|
|
154
|
+
| `%show NAME` | `repr()` of the first element named NAME |
|
|
155
|
+
| `%dump` | Round-tripped SysML text of the session model |
|
|
156
|
+
| `%eval EXPR` | Evaluate an expression against the session model |
|
|
157
|
+
| `%set NAME=VALUE` | Bind a what-if value (number / bool / string / unit) |
|
|
158
|
+
| `%bindings` | Show current what-if bindings |
|
|
159
|
+
| `%calc NAME a, b` | Invoke a calc def with positional literal arguments |
|
|
160
|
+
| `%check` | Check the model's constraints (pass/fail report) |
|
|
161
|
+
| `%values` | Collected attribute values |
|
|
162
|
+
| `%sim [FOCUS]` | Start a simulator session on a state machine |
|
|
163
|
+
| `%send TRIGGER` / `%step` / `%state` | Drive / advance / inspect that session |
|
|
164
|
+
| `%view NAME [KIND]` | Render a view: `gv` `pkg` `afv` `iv` `stv` `tab` `dvt` `matrix` |
|
|
165
|
+
| `%load PATH` / `%save PATH` | Merge a file into the session / write the session out |
|
|
166
|
+
| `%reset` / `%quit` | Discard everything / leave the REPL |
|
|
167
|
+
| `%help` | Command summary |
|
|
168
|
+
|
|
169
|
+
Files given on the command line (`sysmlpy repl model.sysml`) are loaded
|
|
170
|
+
into the session before the first prompt. The session core is the same
|
|
171
|
+
Python API surface used throughout the library, so anything you build in
|
|
172
|
+
a REPL session maps one-to-one onto a `ReplSession` scripted from Python.
|
|
173
|
+
|
|
136
174
|
## Command-Line Tools
|
|
137
175
|
|
|
138
176
|
sysmlpy ships a CLI (`sysmlpy`, plus `sysmlpy-lsp` for editor support).
|
|
@@ -150,9 +188,12 @@ threshold or operational error, `2` = parse/load failure — so
|
|
|
150
188
|
| `sysmlpy trace <file>` | Requirement traceability & verification coverage |
|
|
151
189
|
| `sysmlpy export <file>` | Export to the JSON interchange format |
|
|
152
190
|
| `sysmlpy import <file>` | Import a JSON interchange document as SysML text |
|
|
191
|
+
| `sysmlpy reqif-import <file>` | Import a ReqIF file as SysML v2 requirements |
|
|
192
|
+
| `sysmlpy reqif-export <file>` | Export model requirements as ReqIF 1.0 XML |
|
|
153
193
|
| `sysmlpy eval <file>` | Evaluate expressions, attribute values, constraints |
|
|
154
194
|
| `sysmlpy sim <file>` | Simulate a state machine (guards evaluated for real) |
|
|
155
195
|
| `sysmlpy xlsx <file>` | Export tabular views to an Excel workbook |
|
|
196
|
+
| `sysmlpy repl <file...>` | Interactive REPL: declarations accumulate into a session model; `%eval`, `%sim`, `%view`, `%check`, ... inspect it |
|
|
156
197
|
| `sysmlpy-lsp` | Language server (stdio) for SysML v2 editors |
|
|
157
198
|
|
|
158
199
|
Examples:
|
|
@@ -171,6 +212,15 @@ sysmlpy view model.sysml --view sv > model.puml
|
|
|
171
212
|
# Drive a state machine interactively
|
|
172
213
|
sysmlpy sim traffic_light.sysml
|
|
173
214
|
|
|
215
|
+
# Or work in an accumulating session: declare, query, evaluate, simulate
|
|
216
|
+
sysmlpy repl
|
|
217
|
+
sysml> package Demo { part def Wheel { attribute diameter : Real = 16.0; } }
|
|
218
|
+
✓ Demo
|
|
219
|
+
sysml> %eval Demo::Wheel::diameter
|
|
220
|
+
= 16.0
|
|
221
|
+
sysml> %view Demo pkg
|
|
222
|
+
sysml> %quit
|
|
223
|
+
|
|
174
224
|
# Excel workbook of the tabular views
|
|
175
225
|
sysmlpy xlsx bill_of_materials.sysml -o bom.xlsx
|
|
176
226
|
```
|
|
@@ -443,7 +493,8 @@ result = analyze(model, strict=True)
|
|
|
443
493
|
- **Undefined symbol detection** — catches references to non-existent types, features, and packages
|
|
444
494
|
- **Qualified name resolution** — `P::A` and `Outer::Inner::DeepPart` resolve through scope chains
|
|
445
495
|
- **Inheritance resolution** — subsetting/redefinition references resolve through supertype chains
|
|
446
|
-
- **
|
|
496
|
+
- **KerML parser** — OMG-KEBNF-generated ANTLR4 grammar for the Kernel Modeling Language (`sysmlpy.kerml`): `parse` / `parse_file` / `parse_to_dict`; all 130 `.kerml` corpus files (OMG examples + standard libraries) parse, and the library symbol index is backed by real parses (2,986 symbols)
|
|
497
|
+
- **Library symbol index** — scans 94 files (36 parsed `.kerml` + 58 `.sysml`) from the bundled standard library (~2,986 symbols)
|
|
447
498
|
|
|
448
499
|
### Import Resolution
|
|
449
500
|
|
|
@@ -864,6 +915,77 @@ See [`docs/plantuml-examples/`](docs/plantuml-examples/) for all rendered exampl
|
|
|
864
915
|
| 15 | Relationship Matrix (GridView) | Relationship Matrix |
|
|
865
916
|
| 16 | Tabular View — Color | Tabular View (color) |
|
|
866
917
|
|
|
918
|
+
## ReqIF Interchange (Requirements Interchange Format)
|
|
919
|
+
|
|
920
|
+
sysmlpy imports and exports **ReqIF 1.0** — the OMG requirements interchange
|
|
921
|
+
standard used by DOORS, Polarion, ReqIF Studio, Capella, Enterprise Architect,
|
|
922
|
+
and most requirements-management tools. This makes sysmlpy a viable
|
|
923
|
+
*single source of truth* for requirements: author them as SysML v2
|
|
924
|
+
`requirement` elements, then exchange them with any ReqIF-capable toolchain.
|
|
925
|
+
|
|
926
|
+
Install the optional dependency once:
|
|
927
|
+
|
|
928
|
+
```bash
|
|
929
|
+
pip install sysmlpy[reqif]
|
|
930
|
+
```
|
|
931
|
+
|
|
932
|
+
### Import — ReqIF → SysML requirements
|
|
933
|
+
|
|
934
|
+
```python
|
|
935
|
+
from sysmlpy import reqif_import, loads
|
|
936
|
+
|
|
937
|
+
text = reqif_import("requirements.reqif") # ReqIF XML → SysML v2 text
|
|
938
|
+
model = loads(text) # → live requirement tree
|
|
939
|
+
```
|
|
940
|
+
|
|
941
|
+
Each ReqIF SpecObject becomes a `requirement` element; the ReqIF
|
|
942
|
+
specification hierarchy becomes requirement ownership nesting;
|
|
943
|
+
`ReqIF.Text` (XHTML) becomes the requirement's `doc` comment with tags
|
|
944
|
+
stripped; other attributes (e.g. `ReqIF.ForeignID`) are folded into the
|
|
945
|
+
doc so no data is lost.
|
|
946
|
+
|
|
947
|
+
### Export — SysML requirements → ReqIF
|
|
948
|
+
|
|
949
|
+
```python
|
|
950
|
+
from sysmlpy import loads, reqif_export
|
|
951
|
+
|
|
952
|
+
model = loads("model.sysml")
|
|
953
|
+
reqif_export(model, "requirements.reqif")
|
|
954
|
+
```
|
|
955
|
+
|
|
956
|
+
Requirement ownership becomes the ReqIF hierarchy; `doc` comments become
|
|
957
|
+
`ReqIF.Text` XHTML values.
|
|
958
|
+
|
|
959
|
+
### CLI
|
|
960
|
+
|
|
961
|
+
```bash
|
|
962
|
+
sysmlpy reqif-import requirements.reqif -o requirements.sysml
|
|
963
|
+
sysmlpy reqif-export model.sysml -o requirements.reqif
|
|
964
|
+
```
|
|
965
|
+
|
|
966
|
+
The import direction was validated against real-world anonymized ReqIF
|
|
967
|
+
files from multiple vendor flavors (ReqIF Studio, DOORS, Polarion,
|
|
968
|
+
Eclipse RMF, Enterprise Architect — see the
|
|
969
|
+
[reqif project's corpus](https://github.com/strictdoc-project/reqif/tree/main/tests/integration/reqif_software)),
|
|
970
|
+
including a 137-requirement model with a 3-level hierarchy and 14
|
|
971
|
+
relations, round-tripped through sysmlpy with exact structural fidelity.
|
|
972
|
+
|
|
973
|
+
> **Note:** ReqIF "flavors" differ across tools (attribute naming,
|
|
974
|
+
> datatypes, relation semantics). The importer handles the common
|
|
975
|
+
> `ReqIF.Text` / `ReqIF.ChapterName` / `ReqIF.ForeignID` attributes
|
|
976
|
+
> found in every flavor; exotic vendor extensions are skipped
|
|
977
|
+
> gracefully. If a file fails to import, it is genuinely malformed.
|
|
978
|
+
|
|
979
|
+
### Relationship to other tools
|
|
980
|
+
|
|
981
|
+
- **Cameo / MagicDraw** — export ReqIF from them, import with sysmlpy;
|
|
982
|
+
no license needed on the sysmlpy side.
|
|
983
|
+
- **Doorstop** — the [Doorstop](https://doorstop.readthedocs.io) text-file
|
|
984
|
+
requirements tool can serve as a git-native review/publishing front-end;
|
|
985
|
+
exchange via ReqIF or the XLSX bridge.
|
|
986
|
+
- **[strictdoc/reqif](https://github.com/strictdoc-project/reqif)** — the
|
|
987
|
+
parser library sysmlpy uses for the ReqIF wire format (Apache-2.0).
|
|
988
|
+
|
|
867
989
|
## Conformance
|
|
868
990
|
|
|
869
991
|
**100% of 123 OMG XPect conformance tests pass** (123/123).
|
|
@@ -40,6 +40,7 @@ sysmlpy requires the following Python packages:
|
|
|
40
40
|
- [networkx](https://networkx.org/) — graph analysis backend (install with `pip install sysmlpy[graph]`)
|
|
41
41
|
- [kuzu](https://kuzudb.com/) — embedded graph database with disk persistence and Cypher queries (install with `pip install sysmlpy[kuzu]`)
|
|
42
42
|
- [cayley](https://cayley.io/) — graph database via HTTP API, supports BoltDB/LevelDB backends (install with `pip install sysmlpy[cayley]`)
|
|
43
|
+
- [reqif](https://github.com/strictdoc-project/reqif) — ReqIF 1.0 requirements interchange, import/export with any ReqIF-capable tool (install with `pip install sysmlpy[reqif]`; see [ReqIF Interchange](#reqif-interchange-requirements-interchange-format))
|
|
43
44
|
- [PlantUML](https://plantuml.com/) **v1.2020.0+** — diagram rendering (requires Java + PlantUML JAR or [PlantUML server](https://www.plantuml.com/plantuml)). The generator uses `<style>` blocks and `skinparam` stereotype selectors introduced in v1.2020.
|
|
44
45
|
- [IPython](https://ipython.org/) **v8.0+** — the `%%sysml` Jupyter cell magic (install with `pip install sysmlpy[jupyter]`; see [Jupyter integration](#jupyter-integration))
|
|
45
46
|
|
|
@@ -100,6 +101,40 @@ and the mapping to this implementation — is in the
|
|
|
100
101
|
[sysml-copier](https://github.com/mycr0ft/sysml-copier) template's
|
|
101
102
|
`docs/sysml-magics.md`.
|
|
102
103
|
|
|
104
|
+
## Interactive REPL
|
|
105
|
+
|
|
106
|
+
`sysmlpy repl [FILE ...]` is a terminal session in the same spirit: each
|
|
107
|
+
submission is a SysML declaration, an expression, or a `%command`, and
|
|
108
|
+
declarations accumulate into a session model with the same
|
|
109
|
+
member-granularity merge as the Jupyter magics (a re-declared member
|
|
110
|
+
replaces its prior definition, sibling members are kept, and a
|
|
111
|
+
`note:` line says so). Submissions continue onto a `...>` line while
|
|
112
|
+
brackets stay open; a line that is not a declaration evaluates as an
|
|
113
|
+
expression. Ctrl-D or `%quit` exits; `%reset` discards the session.
|
|
114
|
+
|
|
115
|
+
| Command | Purpose |
|
|
116
|
+
|---------|---------|
|
|
117
|
+
| `%list [NAME]` | Packages (with member counts), or elements matching NAME with qualified names |
|
|
118
|
+
| `%show NAME` | `repr()` of the first element named NAME |
|
|
119
|
+
| `%dump` | Round-tripped SysML text of the session model |
|
|
120
|
+
| `%eval EXPR` | Evaluate an expression against the session model |
|
|
121
|
+
| `%set NAME=VALUE` | Bind a what-if value (number / bool / string / unit) |
|
|
122
|
+
| `%bindings` | Show current what-if bindings |
|
|
123
|
+
| `%calc NAME a, b` | Invoke a calc def with positional literal arguments |
|
|
124
|
+
| `%check` | Check the model's constraints (pass/fail report) |
|
|
125
|
+
| `%values` | Collected attribute values |
|
|
126
|
+
| `%sim [FOCUS]` | Start a simulator session on a state machine |
|
|
127
|
+
| `%send TRIGGER` / `%step` / `%state` | Drive / advance / inspect that session |
|
|
128
|
+
| `%view NAME [KIND]` | Render a view: `gv` `pkg` `afv` `iv` `stv` `tab` `dvt` `matrix` |
|
|
129
|
+
| `%load PATH` / `%save PATH` | Merge a file into the session / write the session out |
|
|
130
|
+
| `%reset` / `%quit` | Discard everything / leave the REPL |
|
|
131
|
+
| `%help` | Command summary |
|
|
132
|
+
|
|
133
|
+
Files given on the command line (`sysmlpy repl model.sysml`) are loaded
|
|
134
|
+
into the session before the first prompt. The session core is the same
|
|
135
|
+
Python API surface used throughout the library, so anything you build in
|
|
136
|
+
a REPL session maps one-to-one onto a `ReplSession` scripted from Python.
|
|
137
|
+
|
|
103
138
|
## Command-Line Tools
|
|
104
139
|
|
|
105
140
|
sysmlpy ships a CLI (`sysmlpy`, plus `sysmlpy-lsp` for editor support).
|
|
@@ -117,9 +152,12 @@ threshold or operational error, `2` = parse/load failure — so
|
|
|
117
152
|
| `sysmlpy trace <file>` | Requirement traceability & verification coverage |
|
|
118
153
|
| `sysmlpy export <file>` | Export to the JSON interchange format |
|
|
119
154
|
| `sysmlpy import <file>` | Import a JSON interchange document as SysML text |
|
|
155
|
+
| `sysmlpy reqif-import <file>` | Import a ReqIF file as SysML v2 requirements |
|
|
156
|
+
| `sysmlpy reqif-export <file>` | Export model requirements as ReqIF 1.0 XML |
|
|
120
157
|
| `sysmlpy eval <file>` | Evaluate expressions, attribute values, constraints |
|
|
121
158
|
| `sysmlpy sim <file>` | Simulate a state machine (guards evaluated for real) |
|
|
122
159
|
| `sysmlpy xlsx <file>` | Export tabular views to an Excel workbook |
|
|
160
|
+
| `sysmlpy repl <file...>` | Interactive REPL: declarations accumulate into a session model; `%eval`, `%sim`, `%view`, `%check`, ... inspect it |
|
|
123
161
|
| `sysmlpy-lsp` | Language server (stdio) for SysML v2 editors |
|
|
124
162
|
|
|
125
163
|
Examples:
|
|
@@ -138,6 +176,15 @@ sysmlpy view model.sysml --view sv > model.puml
|
|
|
138
176
|
# Drive a state machine interactively
|
|
139
177
|
sysmlpy sim traffic_light.sysml
|
|
140
178
|
|
|
179
|
+
# Or work in an accumulating session: declare, query, evaluate, simulate
|
|
180
|
+
sysmlpy repl
|
|
181
|
+
sysml> package Demo { part def Wheel { attribute diameter : Real = 16.0; } }
|
|
182
|
+
✓ Demo
|
|
183
|
+
sysml> %eval Demo::Wheel::diameter
|
|
184
|
+
= 16.0
|
|
185
|
+
sysml> %view Demo pkg
|
|
186
|
+
sysml> %quit
|
|
187
|
+
|
|
141
188
|
# Excel workbook of the tabular views
|
|
142
189
|
sysmlpy xlsx bill_of_materials.sysml -o bom.xlsx
|
|
143
190
|
```
|
|
@@ -410,7 +457,8 @@ result = analyze(model, strict=True)
|
|
|
410
457
|
- **Undefined symbol detection** — catches references to non-existent types, features, and packages
|
|
411
458
|
- **Qualified name resolution** — `P::A` and `Outer::Inner::DeepPart` resolve through scope chains
|
|
412
459
|
- **Inheritance resolution** — subsetting/redefinition references resolve through supertype chains
|
|
413
|
-
- **
|
|
460
|
+
- **KerML parser** — OMG-KEBNF-generated ANTLR4 grammar for the Kernel Modeling Language (`sysmlpy.kerml`): `parse` / `parse_file` / `parse_to_dict`; all 130 `.kerml` corpus files (OMG examples + standard libraries) parse, and the library symbol index is backed by real parses (2,986 symbols)
|
|
461
|
+
- **Library symbol index** — scans 94 files (36 parsed `.kerml` + 58 `.sysml`) from the bundled standard library (~2,986 symbols)
|
|
414
462
|
|
|
415
463
|
### Import Resolution
|
|
416
464
|
|
|
@@ -831,6 +879,77 @@ See [`docs/plantuml-examples/`](docs/plantuml-examples/) for all rendered exampl
|
|
|
831
879
|
| 15 | Relationship Matrix (GridView) | Relationship Matrix |
|
|
832
880
|
| 16 | Tabular View — Color | Tabular View (color) |
|
|
833
881
|
|
|
882
|
+
## ReqIF Interchange (Requirements Interchange Format)
|
|
883
|
+
|
|
884
|
+
sysmlpy imports and exports **ReqIF 1.0** — the OMG requirements interchange
|
|
885
|
+
standard used by DOORS, Polarion, ReqIF Studio, Capella, Enterprise Architect,
|
|
886
|
+
and most requirements-management tools. This makes sysmlpy a viable
|
|
887
|
+
*single source of truth* for requirements: author them as SysML v2
|
|
888
|
+
`requirement` elements, then exchange them with any ReqIF-capable toolchain.
|
|
889
|
+
|
|
890
|
+
Install the optional dependency once:
|
|
891
|
+
|
|
892
|
+
```bash
|
|
893
|
+
pip install sysmlpy[reqif]
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
### Import — ReqIF → SysML requirements
|
|
897
|
+
|
|
898
|
+
```python
|
|
899
|
+
from sysmlpy import reqif_import, loads
|
|
900
|
+
|
|
901
|
+
text = reqif_import("requirements.reqif") # ReqIF XML → SysML v2 text
|
|
902
|
+
model = loads(text) # → live requirement tree
|
|
903
|
+
```
|
|
904
|
+
|
|
905
|
+
Each ReqIF SpecObject becomes a `requirement` element; the ReqIF
|
|
906
|
+
specification hierarchy becomes requirement ownership nesting;
|
|
907
|
+
`ReqIF.Text` (XHTML) becomes the requirement's `doc` comment with tags
|
|
908
|
+
stripped; other attributes (e.g. `ReqIF.ForeignID`) are folded into the
|
|
909
|
+
doc so no data is lost.
|
|
910
|
+
|
|
911
|
+
### Export — SysML requirements → ReqIF
|
|
912
|
+
|
|
913
|
+
```python
|
|
914
|
+
from sysmlpy import loads, reqif_export
|
|
915
|
+
|
|
916
|
+
model = loads("model.sysml")
|
|
917
|
+
reqif_export(model, "requirements.reqif")
|
|
918
|
+
```
|
|
919
|
+
|
|
920
|
+
Requirement ownership becomes the ReqIF hierarchy; `doc` comments become
|
|
921
|
+
`ReqIF.Text` XHTML values.
|
|
922
|
+
|
|
923
|
+
### CLI
|
|
924
|
+
|
|
925
|
+
```bash
|
|
926
|
+
sysmlpy reqif-import requirements.reqif -o requirements.sysml
|
|
927
|
+
sysmlpy reqif-export model.sysml -o requirements.reqif
|
|
928
|
+
```
|
|
929
|
+
|
|
930
|
+
The import direction was validated against real-world anonymized ReqIF
|
|
931
|
+
files from multiple vendor flavors (ReqIF Studio, DOORS, Polarion,
|
|
932
|
+
Eclipse RMF, Enterprise Architect — see the
|
|
933
|
+
[reqif project's corpus](https://github.com/strictdoc-project/reqif/tree/main/tests/integration/reqif_software)),
|
|
934
|
+
including a 137-requirement model with a 3-level hierarchy and 14
|
|
935
|
+
relations, round-tripped through sysmlpy with exact structural fidelity.
|
|
936
|
+
|
|
937
|
+
> **Note:** ReqIF "flavors" differ across tools (attribute naming,
|
|
938
|
+
> datatypes, relation semantics). The importer handles the common
|
|
939
|
+
> `ReqIF.Text` / `ReqIF.ChapterName` / `ReqIF.ForeignID` attributes
|
|
940
|
+
> found in every flavor; exotic vendor extensions are skipped
|
|
941
|
+
> gracefully. If a file fails to import, it is genuinely malformed.
|
|
942
|
+
|
|
943
|
+
### Relationship to other tools
|
|
944
|
+
|
|
945
|
+
- **Cameo / MagicDraw** — export ReqIF from them, import with sysmlpy;
|
|
946
|
+
no license needed on the sysmlpy side.
|
|
947
|
+
- **Doorstop** — the [Doorstop](https://doorstop.readthedocs.io) text-file
|
|
948
|
+
requirements tool can serve as a git-native review/publishing front-end;
|
|
949
|
+
exchange via ReqIF or the XLSX bridge.
|
|
950
|
+
- **[strictdoc/reqif](https://github.com/strictdoc-project/reqif)** — the
|
|
951
|
+
parser library sysmlpy uses for the ReqIF wire format (Apache-2.0).
|
|
952
|
+
|
|
834
953
|
## Conformance
|
|
835
954
|
|
|
836
955
|
**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.
|
|
9
|
+
version = "0.96.0"
|
|
10
10
|
description = ""
|
|
11
11
|
authors = [{ name = "Jon R. Fox (mycr0ft)", email = "jon.fox@drfox.com" }]
|
|
12
12
|
readme = "README.md"
|
|
@@ -20,6 +20,7 @@ antlr4-python3-runtime = ">=4.13"
|
|
|
20
20
|
networkx = { version = ">=3.0", optional = true }
|
|
21
21
|
kuzu = { version = ">=0.7,<0.12", optional = true }
|
|
22
22
|
openpyxl = { version = ">=3.1", optional = true }
|
|
23
|
+
reqif = { version = ">=0.1", optional = true }
|
|
23
24
|
arrow = "^1.4.0"
|
|
24
25
|
transitions = {version = "^0.9", optional = true}
|
|
25
26
|
requests = { version = ">=2.31", optional = true }
|
|
@@ -30,6 +31,7 @@ graph = ["networkx"]
|
|
|
30
31
|
kuzu = ["kuzu"]
|
|
31
32
|
xlsx = ["openpyxl"]
|
|
32
33
|
sim = ["transitions"]
|
|
34
|
+
reqif = ["reqif"]
|
|
33
35
|
cayley = ["requests"]
|
|
34
36
|
jupyter = ["ipython"]
|
|
35
37
|
|
|
@@ -20,6 +20,7 @@ __all__ = [
|
|
|
20
20
|
"as_sequence_view", "as_case_view", "as_browser_view",
|
|
21
21
|
"extract_traceability", "TraceabilityReport", "RequirementTrace",
|
|
22
22
|
"to_interchange", "from_interchange", "interchange_to_json_text",
|
|
23
|
+
"reqif_import", "reqif_import_model", "reqif_export",
|
|
23
24
|
"evaluate_expression", "evaluate_calculation", "collect_values",
|
|
24
25
|
"check_constraints", "ConstraintReport", "ConstraintResult",
|
|
25
26
|
"tabular_view_to_csv", "data_value_tabular_to_csv",
|
|
@@ -34,7 +35,7 @@ __all__ = [
|
|
|
34
35
|
"render_state_transition_view_svg", "boxes_view",
|
|
35
36
|
]
|
|
36
37
|
__author__ = "Jon Fox"
|
|
37
|
-
__version__ = "0.
|
|
38
|
+
__version__ = "0.96.0"
|
|
38
39
|
|
|
39
40
|
from sysmlpy.usage import (
|
|
40
41
|
Item, Attribute, Part, Port, Action, Reference, UseCase, Requirement, Interface, Message,
|
|
@@ -57,6 +58,9 @@ from sysmlpy.traceability import (
|
|
|
57
58
|
from sysmlpy.interchange import (
|
|
58
59
|
to_interchange, from_interchange, interchange_to_json_text,
|
|
59
60
|
)
|
|
61
|
+
from sysmlpy.reqif_io import (
|
|
62
|
+
reqif_import, reqif_import_model, reqif_export,
|
|
63
|
+
)
|
|
60
64
|
from sysmlpy.evaluator import (
|
|
61
65
|
evaluate_expression, evaluate_calculation, collect_values,
|
|
62
66
|
check_constraints, ConstraintReport, ConstraintResult,
|
|
@@ -33,7 +33,8 @@ from sysmlpy import loads
|
|
|
33
33
|
|
|
34
34
|
# Subcommand table, also used to detect the legacy flat invocation form.
|
|
35
35
|
SUBCOMMANDS = ("parse", "analyze", "view", "trace", "export", "import",
|
|
36
|
-
"
|
|
36
|
+
"reqif-import", "reqif-export",
|
|
37
|
+
"eval", "xlsx", "sim", "diff", "format", "fmt", "repl")
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
# ---------------------------------------------------------------------------
|
|
@@ -442,6 +443,60 @@ def cmd_import(args) -> int:
|
|
|
442
443
|
return 0
|
|
443
444
|
|
|
444
445
|
|
|
446
|
+
def cmd_reqif_import(args) -> int:
|
|
447
|
+
"""ReqIF file → SysML v2 requirements text."""
|
|
448
|
+
from sysmlpy.reqif_io import ReqIFImportError, reqif_import
|
|
449
|
+
|
|
450
|
+
path = Path(args.file)
|
|
451
|
+
if not path.exists():
|
|
452
|
+
print(f"Error: File '{path}' not found.", file=sys.stderr)
|
|
453
|
+
return 2
|
|
454
|
+
|
|
455
|
+
try:
|
|
456
|
+
output = reqif_import(str(path))
|
|
457
|
+
except ReqIFImportError as e:
|
|
458
|
+
print(f"Error: {e}", file=sys.stderr)
|
|
459
|
+
return 2
|
|
460
|
+
except Exception as e: # noqa: BLE001 - surface parser failures cleanly
|
|
461
|
+
print(f"Error: ReqIF import failed: {e}", file=sys.stderr)
|
|
462
|
+
return 2
|
|
463
|
+
|
|
464
|
+
if args.output:
|
|
465
|
+
Path(args.output).write_text(output, encoding="utf-8")
|
|
466
|
+
print(f"Wrote {args.output}")
|
|
467
|
+
else:
|
|
468
|
+
print(output)
|
|
469
|
+
return 0
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
def cmd_reqif_export(args) -> int:
|
|
473
|
+
"""SysML requirements → ReqIF 1.0 XML."""
|
|
474
|
+
from sysmlpy.reqif_io import ReqIFExportError, reqif_export
|
|
475
|
+
|
|
476
|
+
paths = [Path(f) for f in args.files]
|
|
477
|
+
for p in _missing_files(paths):
|
|
478
|
+
print(f"Error: File '{p}' not found.", file=sys.stderr)
|
|
479
|
+
return 2
|
|
480
|
+
|
|
481
|
+
try:
|
|
482
|
+
model = sysmlpy.load_files(paths, library=args.library)
|
|
483
|
+
except Exception as e:
|
|
484
|
+
print(f"Parse error: {e}", file=sys.stderr)
|
|
485
|
+
return 2
|
|
486
|
+
|
|
487
|
+
try:
|
|
488
|
+
reqif_export(model, args.output)
|
|
489
|
+
except ReqIFExportError as e:
|
|
490
|
+
print(f"Error: {e}", file=sys.stderr)
|
|
491
|
+
return 1
|
|
492
|
+
except Exception as e: # noqa: BLE001 - surface unparser failures cleanly
|
|
493
|
+
print(f"Error: ReqIF export failed: {e}", file=sys.stderr)
|
|
494
|
+
return 1
|
|
495
|
+
|
|
496
|
+
print(f"Wrote {args.output}")
|
|
497
|
+
return 0
|
|
498
|
+
|
|
499
|
+
|
|
445
500
|
def _parse_eval_value(text):
|
|
446
501
|
"""Parse a --set NAME=VALUE literal (number / bool / string / unit)."""
|
|
447
502
|
from sysmlpy.usage import ureg
|
|
@@ -606,6 +661,16 @@ def cmd_sim(args) -> int:
|
|
|
606
661
|
return 0
|
|
607
662
|
|
|
608
663
|
|
|
664
|
+
def cmd_repl(args) -> int:
|
|
665
|
+
"""Interactive REPL (declarations accumulate; %commands inspect)."""
|
|
666
|
+
from sysmlpy.repl import main as repl_main
|
|
667
|
+
|
|
668
|
+
return repl_main(
|
|
669
|
+
[*(args.files or []), *(["--no-banner"] if args.no_banner else [])]
|
|
670
|
+
+ (["-l", args.library] if getattr(args, "library", None) else []),
|
|
671
|
+
)
|
|
672
|
+
|
|
673
|
+
|
|
609
674
|
def cmd_xlsx(args) -> int:
|
|
610
675
|
"""Export tabular views to an Excel workbook (v0.66.0, Goal 7)."""
|
|
611
676
|
from sysmlpy.spreadsheet import write_xlsx
|
|
@@ -922,6 +987,43 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
922
987
|
)
|
|
923
988
|
p_import.set_defaults(func=cmd_import)
|
|
924
989
|
|
|
990
|
+
# -- reqif-import / reqif-export ------------------------------------------
|
|
991
|
+
p_reqif_import = sub.add_parser(
|
|
992
|
+
"reqif-import",
|
|
993
|
+
help="Import a ReqIF file as SysML v2 requirements",
|
|
994
|
+
description="Convert a ReqIF 1.0 XML file (ReqIF Studio, DOORS, "
|
|
995
|
+
"Polarion, Eclipse RMF, ...) into SysML v2 requirement "
|
|
996
|
+
"usages, nested by the ReqIF specification hierarchy. "
|
|
997
|
+
"Exit 2 on invalid input. Requires the optional 'reqif' "
|
|
998
|
+
"package.",
|
|
999
|
+
)
|
|
1000
|
+
p_reqif_import.add_argument("file", help="ReqIF XML file")
|
|
1001
|
+
p_reqif_import.add_argument(
|
|
1002
|
+
"-o", "--output",
|
|
1003
|
+
help="Write the SysML text to a file instead of stdout",
|
|
1004
|
+
)
|
|
1005
|
+
p_reqif_import.set_defaults(func=cmd_reqif_import)
|
|
1006
|
+
|
|
1007
|
+
p_reqif_export = sub.add_parser(
|
|
1008
|
+
"reqif-export",
|
|
1009
|
+
help="Export model requirements as a ReqIF 1.0 file",
|
|
1010
|
+
description="Export the requirements of the merged model as ReqIF "
|
|
1011
|
+
"1.0 XML (one spec object per requirement, hierarchy "
|
|
1012
|
+
"from ownership, doc comments as ReqIF.Text). Exit 1 "
|
|
1013
|
+
"when the model has no requirements. Requires the "
|
|
1014
|
+
"optional 'reqif' package.",
|
|
1015
|
+
)
|
|
1016
|
+
p_reqif_export.add_argument("files", nargs="+", help="SysML v2 file(s)")
|
|
1017
|
+
p_reqif_export.add_argument(
|
|
1018
|
+
"-o", "--output", required=True,
|
|
1019
|
+
help="Destination ReqIF XML file",
|
|
1020
|
+
)
|
|
1021
|
+
p_reqif_export.add_argument(
|
|
1022
|
+
"-l", "--library",
|
|
1023
|
+
help="Path to SysML v2 library files to use for parsing",
|
|
1024
|
+
)
|
|
1025
|
+
p_reqif_export.set_defaults(func=cmd_reqif_export)
|
|
1026
|
+
|
|
925
1027
|
p_eval = sub.add_parser(
|
|
926
1028
|
"eval",
|
|
927
1029
|
help="Evaluate expressions, attribute values and constraints",
|
|
@@ -1030,6 +1132,27 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
1030
1132
|
)
|
|
1031
1133
|
p_xlsx.set_defaults(func=cmd_xlsx)
|
|
1032
1134
|
|
|
1135
|
+
# -- repl ----------------------------------------------------------------
|
|
1136
|
+
p_repl = sub.add_parser(
|
|
1137
|
+
"repl",
|
|
1138
|
+
help="Interactive SysML v2 REPL",
|
|
1139
|
+
description="Declarations accumulate into a session model; "
|
|
1140
|
+
"%commands inspect it (%eval, %sim, %view, ...). "
|
|
1141
|
+
"See %help inside the REPL for the command list.",
|
|
1142
|
+
)
|
|
1143
|
+
p_repl.add_argument("files", nargs="*", metavar="FILE",
|
|
1144
|
+
help="model file(s) to load into the session first")
|
|
1145
|
+
p_repl.add_argument(
|
|
1146
|
+
"-l", "--library",
|
|
1147
|
+
help="Path to SysML v2 library files (accepted for parity; "
|
|
1148
|
+
"submissions parse without it)",
|
|
1149
|
+
)
|
|
1150
|
+
p_repl.add_argument(
|
|
1151
|
+
"--no-banner", action="store_true",
|
|
1152
|
+
help="suppress the startup banner",
|
|
1153
|
+
)
|
|
1154
|
+
p_repl.set_defaults(func=cmd_repl)
|
|
1155
|
+
|
|
1033
1156
|
return parser
|
|
1034
1157
|
|
|
1035
1158
|
|