python-eigen-ingenuity 0.4.37b2__py3-none-any.whl → 0.4.37b3__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.
- modelbuilder/src/processors/propertymanager.py +11 -0
- modelbuilder/src/processors/relationshipfileprocessor.py +3 -9
- modelbuilder/src/processors/relationshipmanager.py +0 -10
- {python_eigen_ingenuity-0.4.37b2.dist-info → python_eigen_ingenuity-0.4.37b3.dist-info}/METADATA +1 -1
- {python_eigen_ingenuity-0.4.37b2.dist-info → python_eigen_ingenuity-0.4.37b3.dist-info}/RECORD +8 -8
- {python_eigen_ingenuity-0.4.37b2.dist-info → python_eigen_ingenuity-0.4.37b3.dist-info}/WHEEL +0 -0
- {python_eigen_ingenuity-0.4.37b2.dist-info → python_eigen_ingenuity-0.4.37b3.dist-info}/entry_points.txt +0 -0
- {python_eigen_ingenuity-0.4.37b2.dist-info → python_eigen_ingenuity-0.4.37b3.dist-info}/top_level.txt +0 -0
|
@@ -85,3 +85,14 @@ def combine_required_properties(config_properties, override_properties):
|
|
|
85
85
|
unwanted_properties = [i for i in unwanted_override_properties] + [i for i in unwanted_config_properties if i not in valid_override_properties.keys() and i not in retain_override_properties]
|
|
86
86
|
|
|
87
87
|
return required_properties, unwanted_properties
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def split_node_key(node):
|
|
91
|
+
split_node = node.split(':')
|
|
92
|
+
if len(split_node) == 1:
|
|
93
|
+
name = node
|
|
94
|
+
type = ''
|
|
95
|
+
else:
|
|
96
|
+
name = split_node[0]
|
|
97
|
+
type = ':' + split_node[1]
|
|
98
|
+
return name, type
|
|
@@ -5,6 +5,7 @@ import assetmodelutilities as amu
|
|
|
5
5
|
from queries.query import Neo4jQuery
|
|
6
6
|
import processors.labelmanager as lm
|
|
7
7
|
import processors.relationshipmanager as rm
|
|
8
|
+
import processors.propertymanager as pm
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class RelationshipFileProcessor:
|
|
@@ -84,8 +85,6 @@ class RelationshipFileProcessor:
|
|
|
84
85
|
validated_csv_to_labels = lm.validate_labels(self.contents.get_column_values_list(this_row, to_label_columns))
|
|
85
86
|
to_labels = lm.sort_relationship_labels(self.required_labels, validated_csv_to_labels)
|
|
86
87
|
|
|
87
|
-
# We need to create sets of updates that have the same label combinations, and relationship
|
|
88
|
-
|
|
89
88
|
# Build a MERGE query for the relationship(s)
|
|
90
89
|
for relationship in relationships:
|
|
91
90
|
for relation in relationship.split(':'):
|
|
@@ -178,9 +177,6 @@ class RelationshipFileProcessor:
|
|
|
178
177
|
for relation in relationship.split(':'):
|
|
179
178
|
if relation:
|
|
180
179
|
|
|
181
|
-
## print(f'FN: {from_node}')
|
|
182
|
-
## print(f'FN: {Properties(from_node).format()}')
|
|
183
|
-
## print(f'FN: {Properties.format_value(from_node)}')
|
|
184
180
|
new_labels = [from_labels, to_labels, relation, list(from_node)[0], list(to_node)[0]]
|
|
185
181
|
query_data = [list(from_node.values())[0], list(to_node.values())[0], properties, time_now]
|
|
186
182
|
|
|
@@ -207,8 +203,8 @@ class RelationshipFileProcessor:
|
|
|
207
203
|
from_labels = batch_keys[from_to_labels][0]
|
|
208
204
|
to_labels = batch_keys[from_to_labels][1]
|
|
209
205
|
relationship = batch_keys[from_to_labels][2]
|
|
210
|
-
from_key, from_type =
|
|
211
|
-
to_key, to_type =
|
|
206
|
+
from_key, from_type = pm.split_node_key(batch_keys[from_to_labels][3])
|
|
207
|
+
to_key, to_type = pm.split_node_key(batch_keys[from_to_labels][4])
|
|
212
208
|
|
|
213
209
|
batch_num = 1
|
|
214
210
|
while batch_num <= num_batches:
|
|
@@ -234,9 +230,7 @@ class RelationshipFileProcessor:
|
|
|
234
230
|
|
|
235
231
|
formatted_payload = []
|
|
236
232
|
for a_payload in payload:
|
|
237
|
-
## print(f'AP: {a_payload}')
|
|
238
233
|
formatted_payload.append(Properties(a_payload).format())
|
|
239
|
-
## print(f'FP: {formatted_payload}')
|
|
240
234
|
# Build a MERGE query using queries
|
|
241
235
|
from_keys = " {" + from_key + ":" + payload_ref_dot + from_ref + "}"
|
|
242
236
|
to_keys = " {" + to_key + ":" + payload_ref_dot + to_ref + "}"
|
|
@@ -29,13 +29,3 @@ 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
|
{python_eigen_ingenuity-0.4.37b2.dist-info → python_eigen_ingenuity-0.4.37b3.dist-info}/RECORD
RENAMED
|
@@ -32,15 +32,15 @@ modelbuilder/src/processors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
|
32
32
|
modelbuilder/src/processors/cypherfileprocessor.py,sha256=Y77GddRVhQKNhs6V4jfqwE2LhZvINZ1NX0a_lRadlds,2868
|
|
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
|
-
modelbuilder/src/processors/propertymanager.py,sha256=
|
|
36
|
-
modelbuilder/src/processors/relationshipfileprocessor.py,sha256=
|
|
37
|
-
modelbuilder/src/processors/relationshipmanager.py,sha256=
|
|
35
|
+
modelbuilder/src/processors/propertymanager.py,sha256=z49BirLOEDLvV3N_74BFuzjyeLGRg57TV4O3edV4DYQ,4019
|
|
36
|
+
modelbuilder/src/processors/relationshipfileprocessor.py,sha256=gSI2MFEa5SsTht9JoBJ0yZYFxv3epKVu2X0cVAKNPDY,14943
|
|
37
|
+
modelbuilder/src/processors/relationshipmanager.py,sha256=lDtE_5AdKzL3boq7VD8Gmpai8Uscq79vRxkzYQL8A9A,1105
|
|
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.
|
|
43
|
-
python_eigen_ingenuity-0.4.
|
|
44
|
-
python_eigen_ingenuity-0.4.
|
|
45
|
-
python_eigen_ingenuity-0.4.
|
|
46
|
-
python_eigen_ingenuity-0.4.
|
|
42
|
+
python_eigen_ingenuity-0.4.37b3.dist-info/METADATA,sha256=zitg0rbEXR922UfzoglS_P2gzGCVFOcGgFlccpI5DUc,32121
|
|
43
|
+
python_eigen_ingenuity-0.4.37b3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
44
|
+
python_eigen_ingenuity-0.4.37b3.dist-info/entry_points.txt,sha256=G3LjFQX5xKaN4mqtqCL8uaC-gRbP5T5x9r0gBTJTXXA,70
|
|
45
|
+
python_eigen_ingenuity-0.4.37b3.dist-info/top_level.txt,sha256=lFiZ43CY_1bmdtRidIXbA6rrY2d92Rs-9tH8pcgI-XU,28
|
|
46
|
+
python_eigen_ingenuity-0.4.37b3.dist-info/RECORD,,
|
{python_eigen_ingenuity-0.4.37b2.dist-info → python_eigen_ingenuity-0.4.37b3.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|