python-eigen-ingenuity 0.5.5__tar.gz → 0.5.6b1__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.
- {python_eigen_ingenuity-0.5.5/python_eigen_ingenuity.egg-info → python_eigen_ingenuity-0.5.6b1}/PKG-INFO +1 -1
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/configmanager.py +7 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/filemanager.py +11 -2
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/processors/nodefileprocessor.py +35 -16
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/processors/propertymanager.py +11 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/queries/cypherbuilder.py +6 -3
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/queries/typedefs.py +60 -11
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1/python_eigen_ingenuity.egg-info}/PKG-INFO +1 -1
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/MANIFEST.in +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/README.md +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/__init__.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/assetmodel.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/auth.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/core/__init__.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/elastic.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/events.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/historian.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/historianmulti.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/settings.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/smartdash.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/sql.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/util.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/__init__.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/__init__.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/assetmodelbuilder.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/assetmodelcsvwriter.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/assetmodelutilities.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/connectors/__init__.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/connectors/boltconnector.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/connectors/dbconnectors.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/connectors/genericconnector.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/connectors/httpsconnector.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/csvcontentsmanager.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/csvwriter.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/fileanalyser.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/messages.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/processors/__init__.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/processors/cypherfileprocessor.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/processors/labelmanager.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/processors/relationshipfileprocessor.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/processors/relationshipmanager.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/queries/__init__.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/queries/query.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/versionmanager.py +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/pyproject.toml +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/python_eigen_ingenuity.egg-info/SOURCES.txt +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/python_eigen_ingenuity.egg-info/dependency_links.txt +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/python_eigen_ingenuity.egg-info/requires.txt +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/python_eigen_ingenuity.egg-info/top_level.txt +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/requirements.txt +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/setup.cfg +0 -0
- {python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/setup.py +0 -0
{python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/configmanager.py
RENAMED
|
@@ -43,6 +43,7 @@ class ConfigManager:
|
|
|
43
43
|
parser.add_argument('-a', '--auth', action='store_true', help='Enable Azure Authentication')
|
|
44
44
|
default_order = 'qnrc'
|
|
45
45
|
parser.add_argument('-o', '--order', default=default_order, help='Order in which to process the input files. Default is ' + default_order)
|
|
46
|
+
parser.add_argument('-ft', '--filetypes', default=default_order, help='File types to process. Default is all')
|
|
46
47
|
|
|
47
48
|
# Overrides... used to override values in the config file
|
|
48
49
|
parser.add_argument('-pp', '--primaryproperty', default='', help='Primary node_key')
|
|
@@ -173,6 +174,9 @@ class ConfigManager:
|
|
|
173
174
|
self.orders[input_type] = order + 1
|
|
174
175
|
count += 1
|
|
175
176
|
|
|
177
|
+
# Identify which files to process (note: order is unimportant, just presence (or not))
|
|
178
|
+
self.process_file_types = ''.join(list(dict.fromkeys(re.findall("[" + default_order + "]", args.filetypes))))
|
|
179
|
+
|
|
176
180
|
# Data for .csv file generation
|
|
177
181
|
self.node_csvfile_requested = args.createnodecsvfile
|
|
178
182
|
self.node_labels = lm.validate_labels([args.nodelabels])
|
|
@@ -433,6 +437,9 @@ class ConfigManager:
|
|
|
433
437
|
def get_process_order(self):
|
|
434
438
|
return self.orders
|
|
435
439
|
|
|
440
|
+
def get_process_file_types(self):
|
|
441
|
+
return self.process_file_types
|
|
442
|
+
|
|
436
443
|
def get_frozen_labels_list(self):
|
|
437
444
|
return self.frozen_labels_list
|
|
438
445
|
|
{python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/filemanager.py
RENAMED
|
@@ -25,6 +25,7 @@ class FileManager:
|
|
|
25
25
|
self.start_from = config_manager.get_start_from()
|
|
26
26
|
self.batch_rate = config_manager.get_batch_rate()
|
|
27
27
|
self.stop_on_failure = config_manager.get_stop_on_failure()
|
|
28
|
+
self.process_file_types = config_manager.get_process_file_types()
|
|
28
29
|
|
|
29
30
|
# Create a list of error each type
|
|
30
31
|
self.both_file_list = []
|
|
@@ -62,8 +63,16 @@ class FileManager:
|
|
|
62
63
|
self.unrecognised_file_type_list.append(a_file)
|
|
63
64
|
|
|
64
65
|
def add_file_to_process_list(self, file_processor, file_type):
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
if file_type in ['pre', 'pre-file', 'post', 'post-file']:
|
|
67
|
+
file_type_check = 'q'
|
|
68
|
+
else:
|
|
69
|
+
file_type_check = file_type
|
|
70
|
+
|
|
71
|
+
if file_type_check in self.process_file_types:
|
|
72
|
+
priority = self.process_order[file_type]
|
|
73
|
+
self.valid_file_list[priority] += [{'processor': file_processor, 'type': file_type}]
|
|
74
|
+
else:
|
|
75
|
+
info_message(file_processor.get_filename(), ' not processed as requested')
|
|
67
76
|
|
|
68
77
|
def analyse_lst_file(self, filename):
|
|
69
78
|
|
|
@@ -70,17 +70,24 @@ class NodeFileProcessor:
|
|
|
70
70
|
row_properties = self.contents.get_property_values_dict(this_row, property_columns, self.blank_property_list)
|
|
71
71
|
properties = pm.combine_properties(self.required_properties, row_properties)
|
|
72
72
|
# Remove any properties we don't want
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
property_list = list(properties.keys())
|
|
74
|
+
for unwanted in self.unrequired_properties:
|
|
75
|
+
for property in property_list:
|
|
76
|
+
if property.split(':')[0] == unwanted:
|
|
77
|
+
try:
|
|
78
|
+
properties.pop(property)
|
|
79
|
+
except:
|
|
80
|
+
pass
|
|
81
|
+
|
|
78
82
|
for k in list(properties):
|
|
79
83
|
if k.startswith(':'):
|
|
80
84
|
properties.pop(k)
|
|
81
85
|
else:
|
|
82
86
|
properties[property_ref_dot + k] = properties.pop(k)
|
|
83
87
|
|
|
88
|
+
# Split out those properties that are dependent on others, so that we can add them in the right order
|
|
89
|
+
explicit_properties, calculated_properties = pm.split_out_functional_properties(properties)
|
|
90
|
+
|
|
84
91
|
for primary_property in self.contents.get_property_values_list(this_row, node_columns, self.primary_property):
|
|
85
92
|
time_now = amu.get_formatted_time_now()
|
|
86
93
|
|
|
@@ -103,8 +110,10 @@ class NodeFileProcessor:
|
|
|
103
110
|
query_text = query_text.set_labels(ref_name=property_ref, labels=new_labels)
|
|
104
111
|
if len(remove_labels) > 0:
|
|
105
112
|
query_text = query_text.remove_literal(f'{property_ref}:{":".join(remove_labels)}')
|
|
106
|
-
if len(
|
|
107
|
-
query_text = query_text.set(properties=
|
|
113
|
+
if len(explicit_properties) > 0:
|
|
114
|
+
query_text = query_text.set(properties=explicit_properties, property_ref=property_ref_dot)
|
|
115
|
+
if len(calculated_properties) > 0:
|
|
116
|
+
query_text = query_text.set(properties=calculated_properties, property_ref=property_ref_dot)
|
|
108
117
|
|
|
109
118
|
query_text = query_text.toStr()
|
|
110
119
|
|
|
@@ -162,23 +171,29 @@ class NodeFileProcessor:
|
|
|
162
171
|
for primary_property in self.contents.get_property_values_list(this_row, node_columns, self.primary_property):
|
|
163
172
|
properties = pm.combine_properties(self.required_properties, row_properties)
|
|
164
173
|
# Remove any properties we don't want
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
174
|
+
property_list = list(properties.keys())
|
|
175
|
+
for unwanted in self.unrequired_properties:
|
|
176
|
+
for property in property_list:
|
|
177
|
+
if property.split(':')[0] == unwanted:
|
|
178
|
+
try:
|
|
179
|
+
properties.pop(property)
|
|
180
|
+
except:
|
|
181
|
+
pass
|
|
182
|
+
|
|
170
183
|
properties = {**properties, **primary_property}
|
|
171
184
|
|
|
172
185
|
for k in list(properties):
|
|
173
186
|
if k.startswith(':'):
|
|
174
187
|
properties.pop(k)
|
|
175
188
|
|
|
176
|
-
|
|
189
|
+
explicit_properties, calculated_properties = pm.split_out_functional_properties(properties)
|
|
190
|
+
|
|
191
|
+
query_data = [explicit_properties, calculated_properties, time_now]
|
|
177
192
|
|
|
178
193
|
# So now we know all about this particular update. Let's put it in the query dictionary
|
|
179
194
|
# We'll group these by unique combinations of labels and primary key type
|
|
180
195
|
# Have to use a list since a dictionary key can't be a dictionary
|
|
181
|
-
dictionary_key = [new_labels, merge_labels, remove_labels, list(primary_property)[0].split(':')[0]]
|
|
196
|
+
dictionary_key = [new_labels, merge_labels, remove_labels, list(primary_property)[0].split(':')[0], calculated_properties]
|
|
182
197
|
try:
|
|
183
198
|
dictionary_index = batch_keys.index(dictionary_key)
|
|
184
199
|
query_dictionary[dictionary_index].append(query_data)
|
|
@@ -213,8 +228,9 @@ class NodeFileProcessor:
|
|
|
213
228
|
# Combine all the update data...
|
|
214
229
|
update = updates[(batch_num-1)*self.batch_rate + this_size]
|
|
215
230
|
update_properties = update[0] or {}
|
|
231
|
+
func_properties = update[1] or {}
|
|
216
232
|
if self.add_system_properties:
|
|
217
|
-
update_properties[self.update_time_property] = update[
|
|
233
|
+
update_properties[self.update_time_property] = update[2]
|
|
218
234
|
payload.append(update_properties)
|
|
219
235
|
this_size += 1
|
|
220
236
|
query_count += 1
|
|
@@ -222,7 +238,7 @@ class NodeFileProcessor:
|
|
|
222
238
|
formatted_payload = []
|
|
223
239
|
property_count = 0
|
|
224
240
|
for a_payload in payload:
|
|
225
|
-
formatted_payload.append(Properties(a_payload).format())
|
|
241
|
+
formatted_payload.append(Properties(a_payload).format(property_ref_dot))
|
|
226
242
|
property_count += len(a_payload)
|
|
227
243
|
|
|
228
244
|
# Build a MERGE query using queries
|
|
@@ -239,6 +255,9 @@ class NodeFileProcessor:
|
|
|
239
255
|
)
|
|
240
256
|
if len(remove_labels) > 0:
|
|
241
257
|
query_text = query_text.remove_literal(f'{property_ref}:{":".join(remove_labels)}')
|
|
258
|
+
if func_properties:
|
|
259
|
+
query_text = query_text.set_functional(func_properties, property_ref_dot)
|
|
260
|
+
property_count += len(func_properties)
|
|
242
261
|
if self.add_system_properties:
|
|
243
262
|
query_text = query_text.set_literal(id_property + '= CASE WHEN ' + id_property + ' IS null THEN randomUUID() ELSE ' + id_property + ' END')
|
|
244
263
|
query_text = query_text.set_literal(creation_property + '= CASE WHEN ' + creation_property + ' IS null THEN ' + property_ref_dot + self.update_time_property + ' ELSE ' + creation_property + ' END')
|
|
@@ -116,3 +116,14 @@ def combine_properties(default_properties, actual_properties):
|
|
|
116
116
|
combined_properties[property] = value
|
|
117
117
|
|
|
118
118
|
return combined_properties
|
|
119
|
+
|
|
120
|
+
def split_out_functional_properties(properties):
|
|
121
|
+
explicit = {}
|
|
122
|
+
functional = {}
|
|
123
|
+
for key, value in properties.items():
|
|
124
|
+
if '{' in value and '}' in value:
|
|
125
|
+
functional[key] = value
|
|
126
|
+
else:
|
|
127
|
+
explicit[key] = value
|
|
128
|
+
|
|
129
|
+
return explicit, functional
|
|
@@ -94,7 +94,7 @@ class Node(Query):
|
|
|
94
94
|
if not properties:
|
|
95
95
|
property_string = ''
|
|
96
96
|
else:
|
|
97
|
-
property_string = f' {{{Properties(properties)}}}'
|
|
97
|
+
property_string = f' {{{Properties(properties).to_str(property_ref=ref_name)}}}'
|
|
98
98
|
|
|
99
99
|
ref_name = ref_name or ''
|
|
100
100
|
|
|
@@ -207,8 +207,11 @@ class Return(Query):
|
|
|
207
207
|
|
|
208
208
|
class Set(Query):
|
|
209
209
|
|
|
210
|
-
def set(self, properties: Properties):
|
|
211
|
-
return ValidAfterSet(self.query + ' SET ' + Properties(properties).to_str("=", ","))
|
|
210
|
+
def set(self, properties: Properties, property_ref=''):
|
|
211
|
+
return ValidAfterSet(self.query + ' SET ' + Properties(properties).to_str("=", ",", property_ref))
|
|
212
|
+
|
|
213
|
+
def set_functional(self, properties: Properties, property_ref=''):
|
|
214
|
+
return ValidAfterSet(self.query + ' SET ' + Properties(properties).to_str("=", ",", property_ref, property_ref))
|
|
212
215
|
|
|
213
216
|
def set_labels(self, ref_name: str = '', labels: List[str] = None):
|
|
214
217
|
if not labels:
|
{python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/queries/typedefs.py
RENAMED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
"""Cymple's API type definitions."""
|
|
2
1
|
from collections import namedtuple
|
|
3
2
|
import ast
|
|
4
3
|
import datetime
|
|
5
4
|
import messages
|
|
5
|
+
import processors.propertymanager as pm
|
|
6
6
|
|
|
7
7
|
Mapping = namedtuple('Mapping', ['ref_name', 'returned_name'], defaults=(None, None))
|
|
8
8
|
|
|
9
9
|
class Properties(dict):
|
|
10
|
-
"""A dict class storing a set of properties."""
|
|
11
10
|
|
|
12
11
|
@staticmethod
|
|
13
12
|
def _escape(string: str) -> str:
|
|
@@ -15,7 +14,52 @@ class Properties(dict):
|
|
|
15
14
|
return res
|
|
16
15
|
|
|
17
16
|
@staticmethod
|
|
18
|
-
def _format_value(key, value):
|
|
17
|
+
def _format_value(key, value, ref=''):
|
|
18
|
+
|
|
19
|
+
def parse_formula(formula):
|
|
20
|
+
num_open = 0
|
|
21
|
+
num_close = 0
|
|
22
|
+
parsed = ''
|
|
23
|
+
index = 0
|
|
24
|
+
open = False
|
|
25
|
+
property_name = ''
|
|
26
|
+
while index < len(formula):
|
|
27
|
+
this_char = formula[index]
|
|
28
|
+
next_char = (formula+' ')[index+1]
|
|
29
|
+
if this_char == '{':
|
|
30
|
+
if next_char == '{':
|
|
31
|
+
if open:
|
|
32
|
+
property_name += this_char
|
|
33
|
+
else:
|
|
34
|
+
parsed += this_char
|
|
35
|
+
index += 1
|
|
36
|
+
else:
|
|
37
|
+
open = True
|
|
38
|
+
property_name = ''
|
|
39
|
+
num_open += 1
|
|
40
|
+
elif this_char == '}':
|
|
41
|
+
if next_char == '}':
|
|
42
|
+
if open:
|
|
43
|
+
property_name += this_char
|
|
44
|
+
else:
|
|
45
|
+
parsed += this_char
|
|
46
|
+
index += 1
|
|
47
|
+
else:
|
|
48
|
+
parsed += ref + pm.validate_property(property_name)
|
|
49
|
+
open = False
|
|
50
|
+
num_close += 1
|
|
51
|
+
else:
|
|
52
|
+
if open:
|
|
53
|
+
property_name += this_char
|
|
54
|
+
else:
|
|
55
|
+
parsed += this_char
|
|
56
|
+
index += 1
|
|
57
|
+
|
|
58
|
+
ok = (num_open == num_close)
|
|
59
|
+
if num_open == 0:
|
|
60
|
+
parsed = quote + parsed + quote
|
|
61
|
+
|
|
62
|
+
return parsed, ok
|
|
19
63
|
|
|
20
64
|
def try_date_format(date_format):
|
|
21
65
|
try:
|
|
@@ -38,7 +82,9 @@ class Properties(dict):
|
|
|
38
82
|
try:
|
|
39
83
|
match given_data_type:
|
|
40
84
|
case 'str':
|
|
41
|
-
result =
|
|
85
|
+
result, ok = parse_formula(escaped_value)
|
|
86
|
+
if not ok:
|
|
87
|
+
messages.warning_message(f'{escaped_value} is not valid')
|
|
42
88
|
case 'int':
|
|
43
89
|
# Remove any leading zeroes because the literal_eval function does not support them
|
|
44
90
|
while escaped_value.startswith('0'):
|
|
@@ -86,7 +132,9 @@ class Properties(dict):
|
|
|
86
132
|
else:
|
|
87
133
|
match str(data_type):
|
|
88
134
|
case 'str':
|
|
89
|
-
result =
|
|
135
|
+
result, ok = parse_formula(escaped_value)
|
|
136
|
+
if not ok:
|
|
137
|
+
messages.warning_message(f'{escaped_value} is not valid')
|
|
90
138
|
case "<class 'int'>":
|
|
91
139
|
if escaped_value != '0' and escaped_value.startswith('0'):
|
|
92
140
|
# Has a leading 0, so treat as a string
|
|
@@ -110,21 +158,22 @@ class Properties(dict):
|
|
|
110
158
|
result = ''
|
|
111
159
|
case _:
|
|
112
160
|
# Shouldn't get here, but just in case use a string
|
|
113
|
-
result =
|
|
161
|
+
result, ok = parse_formula(escaped_value)
|
|
162
|
+
if not ok:
|
|
163
|
+
messages.warning_message(f'{escaped_value} is not valid')
|
|
114
164
|
|
|
115
165
|
return result
|
|
116
166
|
|
|
117
|
-
def to_str(self, comparison_operator: str = ':', boolean_operator: str = ',') -> str:
|
|
118
|
-
""
|
|
119
|
-
pairs = [f'{key.split(":")[0]}{comparison_operator}{Properties._format_value(key, str(value))}' for key, value in self.items()]
|
|
167
|
+
def to_str(self, comparison_operator: str = ':', boolean_operator: str = ',', property_ref='', key_ref='') -> str:
|
|
168
|
+
pairs = [f'{key_ref}{key.split(":")[0]}{comparison_operator}{Properties._format_value(key, str(value), property_ref)}' for key, value in self.items()]
|
|
120
169
|
res = boolean_operator.join(pairs)
|
|
121
170
|
return res
|
|
122
171
|
|
|
123
|
-
def format(self):
|
|
172
|
+
def format(self, property_ref=''):
|
|
124
173
|
# Reformat using identified data types
|
|
125
174
|
pairs = []
|
|
126
175
|
for key, value in self.items():
|
|
127
|
-
pairs.append(f'{key.split(":")[0]}:{Properties._format_value(key, str(value))}')
|
|
176
|
+
pairs.append(f'{key.split(":")[0]}:{Properties._format_value(key, str(value), property_ref)}')
|
|
128
177
|
return '{' + ','.join(pairs) + '}'
|
|
129
178
|
|
|
130
179
|
def __str__(self) -> str:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/assetmodel.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/core/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/eigeningenuity/historianmulti.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/__init__.py
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
|
{python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/csvwriter.py
RENAMED
|
File without changes
|
{python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/fileanalyser.py
RENAMED
|
File without changes
|
{python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/messages.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/queries/__init__.py
RENAMED
|
File without changes
|
{python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/queries/query.py
RENAMED
|
File without changes
|
{python_eigen_ingenuity-0.5.5 → python_eigen_ingenuity-0.5.6b1}/modelbuilder/src/versionmanager.py
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
|