python-eigen-ingenuity 0.5.12b3__py3-none-any.whl → 0.5.13b1__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/csvcontentsmanager.py +1 -0
- modelbuilder/src/fileanalyser.py +2 -2
- modelbuilder/src/filemanager.py +15 -5
- modelbuilder/src/property.py +2 -1
- modelbuilder/src/queries/query.py +1 -1
- {python_eigen_ingenuity-0.5.12b3.dist-info → python_eigen_ingenuity-0.5.13b1.dist-info}/METADATA +1 -1
- {python_eigen_ingenuity-0.5.12b3.dist-info → python_eigen_ingenuity-0.5.13b1.dist-info}/RECORD +10 -10
- {python_eigen_ingenuity-0.5.12b3.dist-info → python_eigen_ingenuity-0.5.13b1.dist-info}/WHEEL +1 -1
- {python_eigen_ingenuity-0.5.12b3.dist-info → python_eigen_ingenuity-0.5.13b1.dist-info}/entry_points.txt +0 -0
- {python_eigen_ingenuity-0.5.12b3.dist-info → python_eigen_ingenuity-0.5.13b1.dist-info}/top_level.txt +0 -0
|
@@ -10,6 +10,7 @@ class CSVContentsManager:
|
|
|
10
10
|
def __init__(self, csv_data, header_mappings, alias_mappings, default_data_type):
|
|
11
11
|
file_headers = next(csv_data)
|
|
12
12
|
data_list = list(csv_data)
|
|
13
|
+
# self.data_list = [[j.replace('!nl!', '\n') for j in i] for i in data_list if len(i) > 0 and not i[0].startswith('#')]
|
|
13
14
|
self.data_list = [i for i in data_list if len(i) > 0 and not i[0].startswith('#')]
|
|
14
15
|
unmapped_keys = []
|
|
15
16
|
mapped_keys = []
|
modelbuilder/src/fileanalyser.py
CHANGED
|
@@ -41,12 +41,12 @@ class FileAnalyser():
|
|
|
41
41
|
match file_format:
|
|
42
42
|
case 'csv':
|
|
43
43
|
try:
|
|
44
|
-
with open(file_name) as csv_file:
|
|
44
|
+
with open(file_name, encoding='utf-8') as csv_file:
|
|
45
45
|
csv_data = csv.reader(csv_file, delimiter=self.separator)
|
|
46
46
|
contents = CSVContentsManager(csv_data, self.header_mappings, self.alias_mappings, self.default_data_type)
|
|
47
47
|
except:
|
|
48
48
|
try:
|
|
49
|
-
with open(file_name
|
|
49
|
+
with open(file_name) as csv_file:
|
|
50
50
|
csv_data = csv.reader(csv_file, delimiter=self.separator)
|
|
51
51
|
contents = CSVContentsManager(csv_data, self.header_mappings, self.alias_mappings, self.default_data_type)
|
|
52
52
|
except:
|
modelbuilder/src/filemanager.py
CHANGED
|
@@ -168,7 +168,7 @@ class FileManager:
|
|
|
168
168
|
a_file_split = a_file.split(',')
|
|
169
169
|
for a_split_file in a_file_split:
|
|
170
170
|
if a_split_file != '':
|
|
171
|
-
self.analyse_a_file(a_split_file.strip(),
|
|
171
|
+
self.analyse_a_file(a_split_file.strip(), self.config_section)
|
|
172
172
|
|
|
173
173
|
query_list = self.config_manager.get_inline_query_list()
|
|
174
174
|
for a_query in query_list:
|
|
@@ -374,6 +374,9 @@ class FileManager:
|
|
|
374
374
|
except:
|
|
375
375
|
display_rate = 0
|
|
376
376
|
|
|
377
|
+
## total_new_nodes = 0
|
|
378
|
+
## total_new_relationships = 0
|
|
379
|
+
|
|
377
380
|
if display_rate > 0:
|
|
378
381
|
message(f'0 of {num_queries} queries processed at {amu.get_formatted_time_now()}', False)
|
|
379
382
|
|
|
@@ -394,10 +397,14 @@ class FileManager:
|
|
|
394
397
|
if result.get_status() == 200:
|
|
395
398
|
|
|
396
399
|
# Display info on how many of each batch were created
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
400
|
+
## new_nodes = result.get_updates()['nodes created']
|
|
401
|
+
## total_new_nodes += new_nodes
|
|
402
|
+
## new_relationships = result.get_updates()['relationships created']
|
|
403
|
+
## total_new_relationships += new_relationships
|
|
404
|
+
## if new_nodes > 0 or new_relationships > 0:
|
|
405
|
+
## if (query.type == 'batch node' and new_nodes != query.batch_size) or (query.type == 'batch relationship' and new_relationships != query.batch_size):
|
|
406
|
+
## info_message(f'Batch {query_count} contained {query.batch_size} updates: only {new_nodes+new_relationships} created')
|
|
407
|
+
## print(query.text)
|
|
401
408
|
|
|
402
409
|
if self.report_queries:
|
|
403
410
|
result.print_results('Updates made: ')
|
|
@@ -433,6 +440,9 @@ class FileManager:
|
|
|
433
440
|
if display_rate > 0 and not self.report_queries:
|
|
434
441
|
if query_count % display_rate == 0 or query_count == num_queries:
|
|
435
442
|
message(f'{query_count} of {num_queries} queries processed at {amu.get_formatted_time_now()} ({query_count / num_queries * 100:.2f}%)', False)
|
|
443
|
+
## message(f'{query_count} of {num_queries} queries processed at {amu.get_formatted_time_now()} ({query_count / num_queries * 100:.2f}%) Nodes: {total_new_nodes}, Relationships: {total_new_relationships}', False)
|
|
444
|
+
## total_new_nodes = 0
|
|
445
|
+
## total_new_relationships = 0
|
|
436
446
|
else:
|
|
437
447
|
message_no_cr(f'{query_count} of {num_queries} queries processed ({batch_info}{query_count / num_queries * 100:.2f}%) {chr(13)}')
|
|
438
448
|
|
modelbuilder/src/property.py
CHANGED
|
@@ -9,7 +9,8 @@ class Neo4jProperty():
|
|
|
9
9
|
|
|
10
10
|
self.key = pm.validate_property(key)
|
|
11
11
|
# Sanitise the value
|
|
12
|
-
self.value = value.replace('\\', '\\\\').replace('\r', '\\r').replace('\n', '\\n').replace('"', '\\"')
|
|
12
|
+
# self.value = value.replace('\\', '\\\\').replace('\r', '\\r').replace('\n', '\\n').replace('"', '\\"')
|
|
13
|
+
self.value = value.replace('\\', '\\\\').replace('\r', '\\r').replace('"', '\\"')
|
|
13
14
|
|
|
14
15
|
if self.value == "":
|
|
15
16
|
if blank_override:
|
|
@@ -56,7 +56,7 @@ class Neo4jQuery():
|
|
|
56
56
|
|
|
57
57
|
def __init__(self, type, text, time=None, labels=[], new_labels=[], primary_property=[], properties={}, batch_size=1, property_count=0, section='DEFAULT'):
|
|
58
58
|
self.type = type
|
|
59
|
-
self.text = text
|
|
59
|
+
self.text = text.replace('!nl!', '\n')
|
|
60
60
|
self.time_now = time
|
|
61
61
|
self.labels = labels
|
|
62
62
|
self.new_labels = new_labels
|
{python_eigen_ingenuity-0.5.12b3.dist-info → python_eigen_ingenuity-0.5.13b1.dist-info}/RECORD
RENAMED
|
@@ -16,12 +16,12 @@ modelbuilder/src/assetmodelbuilder.py,sha256=qc5cw8EdNT6BcWthtTA62aYBS8hW5gmnYEW
|
|
|
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=ksFI_8tIlFj6YO4D86ECIBb8ueOM0l-auDS0BfevxyA,26958
|
|
19
|
-
modelbuilder/src/csvcontentsmanager.py,sha256=
|
|
19
|
+
modelbuilder/src/csvcontentsmanager.py,sha256=ShPROftohQ245lgJjDYROT5KTpe1zGiAKB3rbaP3YDU,8003
|
|
20
20
|
modelbuilder/src/csvwriter.py,sha256=2Xc6kdV6cYwCjrVF6WaZfS6tVp8-oc0ksIHSOx6iqj8,14132
|
|
21
|
-
modelbuilder/src/fileanalyser.py,sha256=
|
|
22
|
-
modelbuilder/src/filemanager.py,sha256=
|
|
21
|
+
modelbuilder/src/fileanalyser.py,sha256=5bLKB5yTseNK8B28L44ejwBZnesuIwacj77MLnw85-M,4293
|
|
22
|
+
modelbuilder/src/filemanager.py,sha256=11NME-QT2ObISR1Da4V97tTCEWGGeo_EWvbaS_IhvYk,22708
|
|
23
23
|
modelbuilder/src/messages.py,sha256=6JnW-ke6nHGUA4hTEBvo_kVlNJTXoV4LWw8mNwMpBCQ,1325
|
|
24
|
-
modelbuilder/src/property.py,sha256=
|
|
24
|
+
modelbuilder/src/property.py,sha256=PN_w8UTObEjHS5GfiHtZRbV1ZM62EB-H44l8-1fKJNI,12727
|
|
25
25
|
modelbuilder/src/versionmanager.py,sha256=B8mrYY5Der0sWi1GQjduyVGZ6BuAb6rTNVAZzQlP4k4,19148
|
|
26
26
|
modelbuilder/src/connectors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
27
|
modelbuilder/src/connectors/boltconnector.py,sha256=BDlSh1Ah4iBW363y4tnIb0YPwYM8fBMqd_9QseE4oD4,4813
|
|
@@ -37,9 +37,9 @@ modelbuilder/src/processors/relationshipfileprocessor.py,sha256=gT6byUZXlceqFN1F
|
|
|
37
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=VpUGuPo-Ba3skjCVBFjmxm4ORQBGgF5cDiQYnK67hLA,10418
|
|
40
|
-
modelbuilder/src/queries/query.py,sha256=
|
|
41
|
-
python_eigen_ingenuity-0.5.
|
|
42
|
-
python_eigen_ingenuity-0.5.
|
|
43
|
-
python_eigen_ingenuity-0.5.
|
|
44
|
-
python_eigen_ingenuity-0.5.
|
|
45
|
-
python_eigen_ingenuity-0.5.
|
|
40
|
+
modelbuilder/src/queries/query.py,sha256=SI7RtLOlRxZNcnv0752PL0vxQi2_-WJd9TZrOXyOoqs,2590
|
|
41
|
+
python_eigen_ingenuity-0.5.13b1.dist-info/METADATA,sha256=yVOkGgw2YdRUaHcIs1Bi41P17mLk2uZPJ1LKXMekNfI,38358
|
|
42
|
+
python_eigen_ingenuity-0.5.13b1.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
|
43
|
+
python_eigen_ingenuity-0.5.13b1.dist-info/entry_points.txt,sha256=G3LjFQX5xKaN4mqtqCL8uaC-gRbP5T5x9r0gBTJTXXA,70
|
|
44
|
+
python_eigen_ingenuity-0.5.13b1.dist-info/top_level.txt,sha256=lFiZ43CY_1bmdtRidIXbA6rrY2d92Rs-9tH8pcgI-XU,28
|
|
45
|
+
python_eigen_ingenuity-0.5.13b1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|