tricc-oo 1.4.16__tar.gz → 1.4.17__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.
Files changed (51) hide show
  1. {tricc_oo-1.4.16/tricc_oo.egg-info → tricc_oo-1.4.17}/PKG-INFO +2 -2
  2. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/pyproject.toml +1 -1
  3. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tests/build.py +2 -1
  4. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/strategies/input/base_input_strategy.py +22 -21
  5. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/visitors/tricc.py +10 -12
  6. {tricc_oo-1.4.16 → tricc_oo-1.4.17/tricc_oo.egg-info}/PKG-INFO +1 -1
  7. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/README.md +0 -0
  8. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/setup.cfg +0 -0
  9. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tests/test_cql.py +0 -0
  10. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tests/to_ocl.py +0 -0
  11. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/__init__.py +0 -0
  12. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/converters/__init__.py +0 -0
  13. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/converters/codesystem_to_ocl.py +0 -0
  14. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/converters/cql/cqlLexer.py +0 -0
  15. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/converters/cql/cqlListener.py +0 -0
  16. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/converters/cql/cqlParser.py +0 -0
  17. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/converters/cql/cqlVisitor.py +0 -0
  18. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/converters/cql_to_operation.py +0 -0
  19. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/converters/datadictionnary.py +0 -0
  20. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/converters/drawio_type_map.py +0 -0
  21. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/converters/tricc_to_xls_form.py +0 -0
  22. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/converters/utils.py +0 -0
  23. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/converters/xml_to_tricc.py +0 -0
  24. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/models/__init__.py +0 -0
  25. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/models/base.py +0 -0
  26. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/models/calculate.py +0 -0
  27. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/models/lang.py +0 -0
  28. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/models/ocl.py +0 -0
  29. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/models/ordered_set.py +0 -0
  30. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/models/tricc.py +0 -0
  31. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/parsers/__init__.py +0 -0
  32. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/parsers/xml.py +0 -0
  33. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/serializers/__init__.py +0 -0
  34. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/serializers/planuml.py +0 -0
  35. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/serializers/xls_form.py +0 -0
  36. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/strategies/__init__.py +0 -0
  37. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/strategies/input/__init__.py +0 -0
  38. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/strategies/input/drawio.py +0 -0
  39. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/strategies/output/base_output_strategy.py +0 -0
  40. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/strategies/output/spice.py +0 -0
  41. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/strategies/output/xls_form.py +0 -0
  42. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/strategies/output/xlsform_cdss.py +0 -0
  43. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/strategies/output/xlsform_cht.py +0 -0
  44. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/strategies/output/xlsform_cht_hf.py +0 -0
  45. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/visitors/__init__.py +0 -0
  46. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/visitors/utils.py +0 -0
  47. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo/visitors/xform_pd.py +0 -0
  48. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo.egg-info/SOURCES.txt +0 -0
  49. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo.egg-info/dependency_links.txt +0 -0
  50. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo.egg-info/requires.txt +0 -0
  51. {tricc_oo-1.4.16 → tricc_oo-1.4.17}/tricc_oo.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.3
2
2
  Name: tricc-oo
3
- Version: 1.4.16
3
+ Version: 1.4.17
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tricc-oo"
7
- version = "1.4.16"
7
+ version = "1.4.17"
8
8
  description = "Python library that converts CDSS L2 in L3"
9
9
  readme = "README.md"
10
10
 
@@ -145,7 +145,7 @@ if __name__ == "__main__":
145
145
  if in_filepath is None:
146
146
  print_help()
147
147
  sys.exit(2)
148
- in_filepath_list = in_filepath.split(',')
148
+
149
149
  if not download_dir:
150
150
  download_dir = out_path
151
151
  debug_path = os.fspath(out_path + "/debug.log")
@@ -165,6 +165,7 @@ if __name__ == "__main__":
165
165
  setup_logger("default", debug_file_path, logging.INFO)
166
166
  file_content = []
167
167
  files = []
168
+ in_filepath_list = in_filepath.split(',')
168
169
  for in_filepath in in_filepath_list:
169
170
  pre, ext = os.path.splitext(in_filepath)
170
171
 
@@ -73,29 +73,30 @@ class BaseInputStrategy:
73
73
  # setting the activity/group to main
74
74
  prev_bridge = root
75
75
  prev_process = None
76
- for process in sorted_pages:
77
- nodes = {page.id: page for page in sorted_pages[process]}
78
- if prev_process:
79
- prev_bridge = get_activity_wait(
80
- prev_bridge,
81
- sorted_pages[prev_process],
82
- nodes.values(),
83
- activity=app,
84
- )
85
- else:
86
- for a in nodes:
87
- set_prev_next_node(
76
+ for process in self.processes:
77
+ if process in sorted_pages:
78
+ nodes = {page.id: page for page in sorted_pages[process]}
79
+ if prev_process:
80
+ prev_bridge = get_activity_wait(
88
81
  prev_bridge,
89
- a,
90
- edge_only=True
82
+ sorted_pages[prev_process],
83
+ nodes.values(),
84
+ activity=app,
91
85
  )
92
- app.nodes[prev_bridge.id] = prev_bridge
93
-
94
- for n in nodes.values():
95
- n.activity = app
96
- n.group = app
97
- app.nodes[n.id] = n
98
- prev_process = process
86
+ else:
87
+ for a in nodes:
88
+ set_prev_next_node(
89
+ prev_bridge,
90
+ a,
91
+ edge_only=True
92
+ )
93
+ app.nodes[prev_bridge.id] = prev_bridge
94
+
95
+ for n in nodes.values():
96
+ n.activity = app
97
+ n.group = app
98
+ app.nodes[n.id] = n
99
+ prev_process = process
99
100
 
100
101
 
101
102
  return app
@@ -768,7 +768,13 @@ def walktrhough_tricc_node_processed_stached(node, callback, processed_nodes, st
768
768
  references = node.get_references()
769
769
  if references:
770
770
  path_len = max(path_len, *[0,*[getattr(n,'path_len',0) + 1 for n in references]])
771
- node.path_len = max(node.path_len, path_len)
771
+ node.path_len = max(node.path_len, path_len)
772
+ prev_process = process[0] if process else None
773
+ if isinstance(node, TriccNodeActivity) and getattr(node.root, 'process', None):
774
+ if process is None:
775
+ process = [node.root.process]
776
+ else:
777
+ process[0] = node.root.process
772
778
  if (
773
779
  callback(
774
780
  node,
@@ -802,11 +808,6 @@ def walktrhough_tricc_node_processed_stached(node, callback, processed_nodes, st
802
808
  if not recursive:
803
809
  reorder_node_list(stashed_nodes, node.group, processed_nodes)
804
810
  if isinstance(node, (TriccNodeActivityStart, TriccNodeMainStart)):
805
- if getattr(node, 'process', None):
806
- if process is None:
807
- process = [node.process]
808
- else:
809
- process[0] = node.process
810
811
  if recursive:
811
812
  for gp in node.activity.groups.values():
812
813
  walktrhough_tricc_node_processed_stached(
@@ -851,11 +852,6 @@ def walktrhough_tricc_node_processed_stached(node, callback, processed_nodes, st
851
852
  if node.root not in processed_nodes:
852
853
  if node.root is not None:
853
854
  node.root.path_len = max(path_len, node.root.path_len)
854
- if getattr(node.root, 'process', None):
855
- if process is None:
856
- process = [node.root.process]
857
- else:
858
- process[0] = node.root.process
859
855
  if recursive:
860
856
  walktrhough_tricc_node_processed_stached(node.root, callback, processed_nodes, stashed_nodes, path_len,
861
857
  recursive, warn = warn,node_path = node_path.copy(),**kwargs)
@@ -897,6 +893,8 @@ def walktrhough_tricc_node_processed_stached(node, callback, processed_nodes, st
897
893
 
898
894
 
899
895
  else:
896
+ if prev_process and process and prev_process != process[0]:
897
+ process[0] = prev_process
900
898
  if node not in processed_nodes and node not in stashed_nodes:
901
899
  if node not in stashed_nodes:
902
900
  stashed_nodes.insert_at_bottom(node)
@@ -2033,7 +2031,7 @@ def get_rhombus_terms( node, processed_nodes, is_calculate=False, negate=False,
2033
2031
  ]
2034
2032
  )
2035
2033
  else:
2036
- if left_term is not None and re.search(" (\+)|(\-)|(or)|(and) ", expression):
2034
+ if left_term is not None and re.search(" (+)|(-)|(or)|(and) ", expression):
2037
2035
  expression = "({0}){1}".format(expression, left_term)
2038
2036
  else:
2039
2037
  expression = "{0}{1}".format(expression, left_term)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tricc-oo
3
- Version: 1.4.16
3
+ Version: 1.4.17
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
File without changes
File without changes
File without changes
File without changes