tricc-oo 1.4.2__tar.gz → 1.4.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.
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/PKG-INFO +2 -2
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/pyproject.toml +1 -1
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/converters/drawio_type_map.py +9 -3
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/converters/xml_to_tricc.py +4 -2
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/strategies/input/base_input_strategy.py +2 -1
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/visitors/tricc.py +5 -5
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo.egg-info/PKG-INFO +1 -1
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/LICENSE.md +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/README.md +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/setup.cfg +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tests/build.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tests/test_cql.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tests/to_ocl.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/__init__.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/converters/__init__.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/converters/codesystem_to_ocl.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/converters/cql/cqlLexer.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/converters/cql/cqlListener.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/converters/cql/cqlParser.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/converters/cql/cqlVisitor.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/converters/cql_to_operation.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/converters/datadictionnary.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/converters/tricc_to_xls_form.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/converters/utils.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/models/__init__.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/models/base.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/models/calculate.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/models/lang.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/models/ocl.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/models/ordered_set.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/models/tricc.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/parsers/__init__.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/parsers/xml.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/serializers/__init__.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/serializers/planuml.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/serializers/xls_form.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/strategies/__init__.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/strategies/input/__init__.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/strategies/input/drawio.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/strategies/output/base_output_strategy.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/strategies/output/spice.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/strategies/output/xls_form.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/strategies/output/xlsform_cdss.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/strategies/output/xlsform_cht.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/strategies/output/xlsform_cht_hf.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/visitors/__init__.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo/visitors/xform_pd.py +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo.egg-info/SOURCES.txt +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo.egg-info/dependency_links.txt +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo.egg-info/requires.txt +0 -0
- {tricc_oo-1.4.2 → tricc_oo-1.4.3}/tricc_oo.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: tricc-oo
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.3
|
|
4
4
|
Summary: Python library that converts CDSS L2 in L3
|
|
5
5
|
Project-URL: Homepage, https://github.com/SwissTPH/tricc
|
|
6
6
|
Project-URL: Issues, https://github.com/SwissTPH/tricc/issues
|
|
@@ -18,7 +18,7 @@ TYPE_MAP = {
|
|
|
18
18
|
},
|
|
19
19
|
TriccNodeType.note: {
|
|
20
20
|
"objects": ["UserObject", "object"],
|
|
21
|
-
"attributes": [],
|
|
21
|
+
"attributes": ['relevance'],
|
|
22
22
|
"mandatory_attributes": ["label", "name"],
|
|
23
23
|
"model": TriccNodeNote
|
|
24
24
|
},
|
|
@@ -43,6 +43,8 @@ TYPE_MAP = {
|
|
|
43
43
|
"filter",
|
|
44
44
|
"constraint",
|
|
45
45
|
"constraint_message",
|
|
46
|
+
"relevance",
|
|
47
|
+
|
|
46
48
|
],
|
|
47
49
|
"mandatory_attributes": ["label", "name", "list_name"],
|
|
48
50
|
"model": TriccNodeSelectOne
|
|
@@ -56,6 +58,7 @@ TYPE_MAP = {
|
|
|
56
58
|
"filter",
|
|
57
59
|
"constraint",
|
|
58
60
|
"constraint_message",
|
|
61
|
+
"relevance",
|
|
59
62
|
],
|
|
60
63
|
"mandatory_attributes": ["label", "name", "list_name"],
|
|
61
64
|
"model": TriccNodeSelectMultiple
|
|
@@ -69,6 +72,7 @@ TYPE_MAP = {
|
|
|
69
72
|
"save",
|
|
70
73
|
"constraint_message",
|
|
71
74
|
"required",
|
|
75
|
+
"relevance",
|
|
72
76
|
],
|
|
73
77
|
"mandatory_attributes": ["label", "name"],
|
|
74
78
|
"model": TriccNodeDecimal
|
|
@@ -82,6 +86,7 @@ TYPE_MAP = {
|
|
|
82
86
|
"save",
|
|
83
87
|
"constraint_message",
|
|
84
88
|
"required",
|
|
89
|
+
"relevance",
|
|
85
90
|
],
|
|
86
91
|
"mandatory_attributes": ["label", "name"],
|
|
87
92
|
"model": TriccNodeInteger
|
|
@@ -89,13 +94,13 @@ TYPE_MAP = {
|
|
|
89
94
|
|
|
90
95
|
TriccNodeType.text: {
|
|
91
96
|
"objects": ["UserObject", "object"],
|
|
92
|
-
"attributes": [],
|
|
97
|
+
"attributes": ["relevance"],
|
|
93
98
|
"mandatory_attributes": ["label", 'name'],
|
|
94
99
|
"model": TriccNodeText
|
|
95
100
|
},
|
|
96
101
|
TriccNodeType.date: {
|
|
97
102
|
"objects": ["UserObject", "object"],
|
|
98
|
-
"attributes": [],
|
|
103
|
+
"attributes": ["relevance"],
|
|
99
104
|
"mandatory_attributes": ["label", "name"],
|
|
100
105
|
"model": TriccNodeDate
|
|
101
106
|
},
|
|
@@ -149,6 +154,7 @@ TYPE_MAP = {
|
|
|
149
154
|
"filter",
|
|
150
155
|
"constraint",
|
|
151
156
|
"constraint_message",
|
|
157
|
+
"relevance",
|
|
152
158
|
],
|
|
153
159
|
"mandatory_attributes": ["label", "name", "list_name"],
|
|
154
160
|
"model": TriccNodeSelectYesNo
|
|
@@ -67,6 +67,8 @@ def create_activity(diagram, media_path, project):
|
|
|
67
67
|
label=name,
|
|
68
68
|
form_id=form_id,
|
|
69
69
|
)
|
|
70
|
+
if root.relevance is not None:
|
|
71
|
+
activity.applicability=root.relevance
|
|
70
72
|
# activity definition is never instanciated
|
|
71
73
|
if isinstance(root, TriccNodeActivityStart):
|
|
72
74
|
activity.instance = 0
|
|
@@ -334,9 +336,9 @@ def get_nodes(diagram, activity):
|
|
|
334
336
|
elif (
|
|
335
337
|
issubclass(node.__class__, TriccNodeDisplayCalculateBase)
|
|
336
338
|
and not getattr(node, 'relevance', None)
|
|
337
|
-
and node.activity.
|
|
339
|
+
and node.activity.applicability
|
|
338
340
|
):
|
|
339
|
-
node.applicability = node.activity.
|
|
341
|
+
node.applicability = node.activity.applicability
|
|
340
342
|
|
|
341
343
|
|
|
342
344
|
nodes.update(new_nodes)
|
|
@@ -38,7 +38,8 @@ class BaseInputStrategy:
|
|
|
38
38
|
if diag.name not in seen_diags:
|
|
39
39
|
unique_diags.append(diag)
|
|
40
40
|
seen_diags.add(diag.name)
|
|
41
|
-
|
|
41
|
+
severity_order = { "severe": 3, "moderate": 2, "mild":1, 'light': 0}
|
|
42
|
+
unique_diags = sorted(unique_diags, key=lambda x: (-getattr(severity_order, x.severity or 'light', 0), x.label))
|
|
42
43
|
for process in self.processes:
|
|
43
44
|
if process in [p[0] for p in page_processes]:
|
|
44
45
|
sorted_pages[process] = [
|
|
@@ -1521,11 +1521,11 @@ def get_node_expression( in_node, processed_nodes, is_calculate=False, is_prev=F
|
|
|
1521
1521
|
for past_instance in past_instances:
|
|
1522
1522
|
add_sub_expression(expression_inputs, get_node_expression(past_instance, processed_nodes=processed_nodes, is_calculate=False, is_prev=True))
|
|
1523
1523
|
|
|
1524
|
-
if isinstance(node.
|
|
1524
|
+
if isinstance(node.applicability,(TriccStatic,TriccOperation, TriccReference)):
|
|
1525
1525
|
if expression:
|
|
1526
|
-
expression = and_join([node.
|
|
1526
|
+
expression = and_join([node.applicability, expression])
|
|
1527
1527
|
else:
|
|
1528
|
-
expression = node.
|
|
1528
|
+
expression = node.applicability
|
|
1529
1529
|
if expression and expression_inputs:
|
|
1530
1530
|
add_sub_expression(expression_inputs, expression)
|
|
1531
1531
|
expression = nand_join(expression, or_join(expression_inputs))
|
|
@@ -1553,8 +1553,8 @@ def get_node_expression( in_node, processed_nodes, is_calculate=False, is_prev=F
|
|
|
1553
1553
|
else:
|
|
1554
1554
|
expression = end_operation
|
|
1555
1555
|
|
|
1556
|
-
elif node.
|
|
1557
|
-
expression = and_join([expression, node.
|
|
1556
|
+
elif node.applicability:
|
|
1557
|
+
expression = and_join([expression, node.applicability])
|
|
1558
1558
|
|
|
1559
1559
|
if negate:
|
|
1560
1560
|
if negate_expression is not None:
|
|
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
|