sysml2py 0.5.2__tar.gz → 0.5.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sysml2py-0.5.2 → sysml2py-0.5.3}/PKG-INFO +2 -1
- {sysml2py-0.5.2 → sysml2py-0.5.3}/pyproject.toml +4 -3
- {sysml2py-0.5.2 → sysml2py-0.5.3}/src/sysml2py/__init__.py +17 -0
- {sysml2py-0.5.2 → sysml2py-0.5.3}/src/sysml2py/grammar/classes.py +3 -3
- {sysml2py-0.5.2 → sysml2py-0.5.3}/LICENSE +0 -0
- {sysml2py-0.5.2 → sysml2py-0.5.3}/README.md +0 -0
- {sysml2py-0.5.2 → sysml2py-0.5.3}/src/sysml2py/definition.py +0 -0
- {sysml2py-0.5.2 → sysml2py-0.5.3}/src/sysml2py/formatting.py +0 -0
- {sysml2py-0.5.2 → sysml2py-0.5.3}/src/sysml2py/grammar/KerML.tx +0 -0
- {sysml2py-0.5.2 → sysml2py-0.5.3}/src/sysml2py/grammar/KerMLExpressions.tx +0 -0
- {sysml2py-0.5.2 → sysml2py-0.5.3}/src/sysml2py/grammar/SysML.tx +0 -0
- {sysml2py-0.5.2 → sysml2py-0.5.3}/src/sysml2py/grammar/SysML_compiled.tx +0 -0
- {sysml2py-0.5.2 → sysml2py-0.5.3}/src/sysml2py/textx/KerML.xtext +0 -0
- {sysml2py-0.5.2 → sysml2py-0.5.3}/src/sysml2py/textx/KerMLExpressions.xtext +0 -0
- {sysml2py-0.5.2 → sysml2py-0.5.3}/src/sysml2py/textx/SysML.xtext +0 -0
- {sysml2py-0.5.2 → sysml2py-0.5.3}/src/sysml2py/textx/xtext_to_textx.py +0 -0
- {sysml2py-0.5.2 → sysml2py-0.5.3}/src/sysml2py/usage.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sysml2py
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.3
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Christopher Cox
|
|
6
6
|
Author-email: chris.cox@westfall.io
|
|
@@ -9,6 +9,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.9
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.10
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
13
|
Requires-Dist: astropy (>=5.3.1,<6.0.0)
|
|
13
14
|
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
|
|
14
15
|
Requires-Dist: textx (>=3.1.1,<4.0.0)
|
|
@@ -6,12 +6,13 @@ build-backend = "poetry.core.masonry.api"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "sysml2py"
|
|
9
|
-
version = "0.5.
|
|
9
|
+
version = "0.5.3"
|
|
10
|
+
description = "SysML v2.0 Parser"
|
|
10
11
|
authors = [
|
|
11
12
|
{ name="Christopher Cox", email="chris.cox@westfall.io" },
|
|
12
13
|
]
|
|
13
|
-
description = "SysML v2.0 Parser"
|
|
14
14
|
readme = "README.md"
|
|
15
|
+
license = {file = "LICENSE"}
|
|
15
16
|
requires-python = ">=3.7"
|
|
16
17
|
classifiers = [
|
|
17
18
|
"Development Status :: 3 - Alpha",
|
|
@@ -98,7 +99,7 @@ build_command = "pip install poetry && poetry build"
|
|
|
98
99
|
|
|
99
100
|
[tool.poetry]
|
|
100
101
|
name = "sysml2py"
|
|
101
|
-
version = "0.5.
|
|
102
|
+
version = "0.5.3"
|
|
102
103
|
description = ""
|
|
103
104
|
authors = ["Christopher Cox <chris.cox@westfall.io>"]
|
|
104
105
|
readme = "README.md"
|
|
@@ -10,11 +10,21 @@ __all__ = ["load", "loads", "load_grammar"]
|
|
|
10
10
|
__author__ = "Christopher Cox"
|
|
11
11
|
__version__ = "0.1.0"
|
|
12
12
|
|
|
13
|
+
# These are interchangable
|
|
13
14
|
from sysml2py.usage import Item, Attribute, Part, Port
|
|
15
|
+
|
|
16
|
+
# These are definition only
|
|
14
17
|
from sysml2py.definition import Model, Package
|
|
15
18
|
|
|
16
19
|
|
|
17
20
|
def enforce_grammar(): # pragma: no cover
|
|
21
|
+
"""Enforce grammar compiles the language for xtext
|
|
22
|
+
|
|
23
|
+
This opens each of the files: KerMLExpressions, KerML, and SysML and
|
|
24
|
+
makes a superfile with all of the definitions and strips the comments. This
|
|
25
|
+
includes changes made to shift from java textx to the python xtext library.
|
|
26
|
+
|
|
27
|
+
"""
|
|
18
28
|
import re
|
|
19
29
|
|
|
20
30
|
comments_strip_rule = r"(?:(?:(?<!\\)(\/\/.*\n))|(?:\/\*(?:.|\n)*?\*\/))"
|
|
@@ -158,4 +168,11 @@ def load(fp):
|
|
|
158
168
|
|
|
159
169
|
|
|
160
170
|
def loads(s: str):
|
|
171
|
+
"""Loads a model from string.
|
|
172
|
+
|
|
173
|
+
This shortcut function allows a user to build a model from a string by
|
|
174
|
+
first instantiating a base model class which builds out a default namespace
|
|
175
|
+
and then that model loads all elements underneath.
|
|
176
|
+
|
|
177
|
+
"""
|
|
161
178
|
return Model().load(s)
|
|
@@ -2559,9 +2559,9 @@ class DefinitionDeclaration:
|
|
|
2559
2559
|
output["identification"] = self.identification.get_definition()
|
|
2560
2560
|
|
|
2561
2561
|
if self.subclassificationpart is not None:
|
|
2562
|
-
output[
|
|
2563
|
-
|
|
2564
|
-
|
|
2562
|
+
output["subclassificationpart"] = (
|
|
2563
|
+
self.subclassificationpart.get_definition()
|
|
2564
|
+
)
|
|
2565
2565
|
|
|
2566
2566
|
return output
|
|
2567
2567
|
|
|
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
|