python-eigen-ingenuity 0.4.36b3__py3-none-any.whl → 0.4.37b2__py3-none-any.whl

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.
@@ -34,14 +34,10 @@ class CSVContentsManager:
34
34
  else:
35
35
  format = ':' + part
36
36
 
37
- print(f'H: {header} -> ({key}, {format}, {type})')
38
-
39
37
  return key, format, type
40
38
 
41
- print(f'HM: {header_mappings}')
42
39
  for header in file_headers:
43
40
 
44
- print(f'H: {header}')
45
41
  this_key, this_format, this_type = split_header(header)
46
42
  unmapped_keys += [this_key]
47
43
 
@@ -178,6 +178,9 @@ class RelationshipFileProcessor:
178
178
  for relation in relationship.split(':'):
179
179
  if relation:
180
180
 
181
+ ## print(f'FN: {from_node}')
182
+ ## print(f'FN: {Properties(from_node).format()}')
183
+ ## print(f'FN: {Properties.format_value(from_node)}')
181
184
  new_labels = [from_labels, to_labels, relation, list(from_node)[0], list(to_node)[0]]
182
185
  query_data = [list(from_node.values())[0], list(to_node.values())[0], properties, time_now]
183
186
 
@@ -204,8 +207,8 @@ class RelationshipFileProcessor:
204
207
  from_labels = batch_keys[from_to_labels][0]
205
208
  to_labels = batch_keys[from_to_labels][1]
206
209
  relationship = batch_keys[from_to_labels][2]
207
- from_key = batch_keys[from_to_labels][3]
208
- to_key = batch_keys[from_to_labels][4]
210
+ from_key, from_type = rm.split_node_key(batch_keys[from_to_labels][3])
211
+ to_key, to_type = rm.split_node_key(batch_keys[from_to_labels][4])
209
212
 
210
213
  batch_num = 1
211
214
  while batch_num <= num_batches:
@@ -221,8 +224,8 @@ class RelationshipFileProcessor:
221
224
  # Combine all the update data...
222
225
  update = updates[(batch_num - 1) * self.batch_rate + this_size]
223
226
  update_properties = update[2] or {} # In case update_properties[2] is {}
224
- update_properties[from_ref] = update[0]
225
- update_properties[to_ref] = update[1]
227
+ update_properties[from_ref + from_type] = update[0]
228
+ update_properties[to_ref + to_type] = update[1]
226
229
  if self.add_system_properties:
227
230
  update_properties[self.update_time_property] = update[3]
228
231
  payload.append(update_properties)
@@ -231,8 +234,9 @@ class RelationshipFileProcessor:
231
234
 
232
235
  formatted_payload = []
233
236
  for a_payload in payload:
237
+ ## print(f'AP: {a_payload}')
234
238
  formatted_payload.append(Properties(a_payload).format())
235
-
239
+ ## print(f'FP: {formatted_payload}')
236
240
  # Build a MERGE query using queries
237
241
  from_keys = " {" + from_key + ":" + payload_ref_dot + from_ref + "}"
238
242
  to_keys = " {" + to_key + ":" + payload_ref_dot + to_ref + "}"
@@ -29,3 +29,13 @@ def validate_relationships(relationships):
29
29
  return validate_relationship_string(relationships)
30
30
  else:
31
31
  return [validate_relationship_string(i) for i in relationships]
32
+
33
+ def split_node_key(node):
34
+ split_node = node.split(':')
35
+ if len(split_node) == 1:
36
+ name = node
37
+ type = ''
38
+ else:
39
+ name = split_node[0]
40
+ type = ':' + split_node[1]
41
+ return name, type
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-eigen-ingenuity
3
- Version: 0.4.36b3
3
+ Version: 0.4.37b2
4
4
  Summary: A python library used to query data from the Eigen Ingenuity system
5
5
  Home-page: https://www.eigen.co/
6
6
  Author: Murray Callander
@@ -16,7 +16,7 @@ modelbuilder/src/assetmodelbuilder.py,sha256=Gii5mU5z8spk1d53_veD4rlgaXL3xtev6OF
16
16
  modelbuilder/src/assetmodelcsvwriter.py,sha256=GKNi_fw7AlY-UG2XhwFIS34Ff3XiVRss-o5MUzyJSV0,1071
17
17
  modelbuilder/src/assetmodelutilities.py,sha256=KwyP8-2EfpRHKmGasPJLV74EGYBjSHgxHBAy8xuvh6k,1743
18
18
  modelbuilder/src/configmanager.py,sha256=LwIGf87so4VeYhIEJ3WVEEj834QCq0svDs2gcyGowuI,22948
19
- modelbuilder/src/csvcontentsmanager.py,sha256=6IIzmCz6zEhpm0gZm-3Nr9_ASKrNo70xJoqn7EJPMD0,6491
19
+ modelbuilder/src/csvcontentsmanager.py,sha256=MLO-dUTk6TAUq8T1OZr2TMJ9QDvV56TrpsfHg1YyNaw,6353
20
20
  modelbuilder/src/csvwriter.py,sha256=m2XVbyZq3Gq2bb36HqvOFuTuet1fi1nRPURL6yEtfjI,14051
21
21
  modelbuilder/src/fileanalyser.py,sha256=LUWrqogjBXsXHV-maoEOmu6FKuu7JmvNZJZMlFhbKQA,3627
22
22
  modelbuilder/src/filemanager.py,sha256=h8BHOEWA94jvDw8WCiGbXwhRDm2FvycJgoTyO1gTi88,18834
@@ -33,14 +33,14 @@ modelbuilder/src/processors/cypherfileprocessor.py,sha256=Y77GddRVhQKNhs6V4jfqwE
33
33
  modelbuilder/src/processors/labelmanager.py,sha256=03fD-JXjdeEyHXUeihst5rVWgmd-3-Y8fSMM42OfsT8,6237
34
34
  modelbuilder/src/processors/nodefileprocessor.py,sha256=Ww9KhNk9YAKSb91LxapLX_NgGdvSwIbnX7bfPPMok-s,12773
35
35
  modelbuilder/src/processors/propertymanager.py,sha256=O47J-2ZBuDWLointG6LhEDh-T_5PXHHSp2cECQ2fpno,3795
36
- modelbuilder/src/processors/relationshipfileprocessor.py,sha256=hSL-094K0lxOW8TkBW54dkUg1GogO2iaEj_d5jM8KDM,14937
37
- modelbuilder/src/processors/relationshipmanager.py,sha256=lDtE_5AdKzL3boq7VD8Gmpai8Uscq79vRxkzYQL8A9A,1105
36
+ modelbuilder/src/processors/relationshipfileprocessor.py,sha256=yH4t_sa4N3ox2xNIXI_J_L9V1D3mXL6MJNDrmug1bNk,15346
37
+ modelbuilder/src/processors/relationshipmanager.py,sha256=Cb9d4DmimLTAnQpe3sHFuVxsCbmLVrRMEK3O7cDiB-g,1328
38
38
  modelbuilder/src/queries/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  modelbuilder/src/queries/cypherbuilder.py,sha256=XHChyxnTyJegfVhN949UU0T3t3Lf1CKgN0yCN8Cx8cM,10384
40
40
  modelbuilder/src/queries/query.py,sha256=gN69uwsf-0F6_dGx9cxLGuM17960_FV58pyimJ9usxY,2472
41
41
  modelbuilder/src/queries/typedefs.py,sha256=8uAnLfE_EyAfrdMZuotfu_YHqORXhWfgPG3Yltvyr5A,6129
42
- python_eigen_ingenuity-0.4.36b3.dist-info/METADATA,sha256=DdaB0r3p5c0oD_SuF0edqSKnUSDjOlNCIGeJa2-8jhQ,32121
43
- python_eigen_ingenuity-0.4.36b3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
44
- python_eigen_ingenuity-0.4.36b3.dist-info/entry_points.txt,sha256=G3LjFQX5xKaN4mqtqCL8uaC-gRbP5T5x9r0gBTJTXXA,70
45
- python_eigen_ingenuity-0.4.36b3.dist-info/top_level.txt,sha256=lFiZ43CY_1bmdtRidIXbA6rrY2d92Rs-9tH8pcgI-XU,28
46
- python_eigen_ingenuity-0.4.36b3.dist-info/RECORD,,
42
+ python_eigen_ingenuity-0.4.37b2.dist-info/METADATA,sha256=ZnyO2ZquplnpjaG3_2whvxHqdkqYl0UIvgISt1FzPhA,32121
43
+ python_eigen_ingenuity-0.4.37b2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
44
+ python_eigen_ingenuity-0.4.37b2.dist-info/entry_points.txt,sha256=G3LjFQX5xKaN4mqtqCL8uaC-gRbP5T5x9r0gBTJTXXA,70
45
+ python_eigen_ingenuity-0.4.37b2.dist-info/top_level.txt,sha256=lFiZ43CY_1bmdtRidIXbA6rrY2d92Rs-9tH8pcgI-XU,28
46
+ python_eigen_ingenuity-0.4.37b2.dist-info/RECORD,,