cognite-neat 1.0.9__py3-none-any.whl → 1.0.10__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.
- cognite/neat/_session/_html/templates/deployment.html +1 -1
- cognite/neat/_session/_html/templates/issues.html +1 -1
- cognite/neat/_session/_wrappers.py +22 -7
- cognite/neat/_version.py +1 -1
- {cognite_neat-1.0.9.dist-info → cognite_neat-1.0.10.dist-info}/METADATA +1 -1
- {cognite_neat-1.0.9.dist-info → cognite_neat-1.0.10.dist-info}/RECORD +7 -7
- {cognite_neat-1.0.9.dist-info → cognite_neat-1.0.10.dist-info}/WHEEL +1 -1
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</h2>
|
|
19
19
|
<div class="deployment-stats issues-stats">
|
|
20
20
|
<div class="stat-item active" data-filter="all">
|
|
21
|
-
<span class="stat-number">{{total_changes}}</span> Total
|
|
21
|
+
<span class="stat-number">{{total_changes}}</span> Total Insights
|
|
22
22
|
</div>
|
|
23
23
|
<div class="stat-item" data-filter="failed">
|
|
24
24
|
<span class="stat-number">{{failed}}</span> Failed
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<h2 class="issues-title">Session Issues</h2>
|
|
13
13
|
<div class="issues-stats">
|
|
14
14
|
<div class="stat-item active" data-filter="all">
|
|
15
|
-
<span class="stat-number">{{total}}</span> Total
|
|
15
|
+
<span class="stat-number">{{total}}</span> Total Insights
|
|
16
16
|
</div>
|
|
17
17
|
<div class="stat-item" data-filter="ModelSyntaxError">
|
|
18
18
|
<span class="stat-number">{{syntax_errors}}</span> Syntax Errors
|
|
@@ -2,6 +2,7 @@ from collections.abc import Callable
|
|
|
2
2
|
from functools import wraps
|
|
3
3
|
from typing import Any, Protocol, TypeVar
|
|
4
4
|
|
|
5
|
+
from cognite.neat._issues import ConsistencyError, Recommendation
|
|
5
6
|
from cognite.neat._session._usage_analytics._collector import Collector
|
|
6
7
|
from cognite.neat._store._store import NeatStore
|
|
7
8
|
from cognite.neat._utils.text import NEWLINE, split_on_capitals
|
|
@@ -33,19 +34,33 @@ def session_wrapper(cls: type[T_Class]) -> type[T_Class]:
|
|
|
33
34
|
_COLLECTOR.collect("action", {"action": identifier, "success": True})
|
|
34
35
|
return res
|
|
35
36
|
change = self._store.provenance[-1]
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
|
|
38
|
+
recommendation_count = (
|
|
39
|
+
len(change.issues) if change.issues and change.issues.by_type().get(Recommendation) else 0
|
|
40
|
+
)
|
|
41
|
+
consistency_errors_count = (
|
|
42
|
+
len(change.errors) if change.errors and change.errors.by_type().get(ConsistencyError) else 0
|
|
43
|
+
)
|
|
44
|
+
syntax_errors_count = len(change.errors) if change.errors else 0
|
|
45
|
+
errors_count = consistency_errors_count + syntax_errors_count
|
|
46
|
+
total_insights = recommendation_count + consistency_errors_count + syntax_errors_count
|
|
39
47
|
|
|
40
48
|
data_model_not_read = not change.successful and "ReadPhysicalDataModel" in identifier
|
|
41
49
|
|
|
50
|
+
if not change.successful:
|
|
51
|
+
success_icon = "❌"
|
|
52
|
+
elif change.successful and consistency_errors_count:
|
|
53
|
+
success_icon = "⚠️"
|
|
54
|
+
else:
|
|
55
|
+
success_icon = "✅"
|
|
56
|
+
|
|
42
57
|
print(
|
|
43
58
|
f"{display_name} "
|
|
44
|
-
f"{
|
|
45
|
-
f"{f' |
|
|
59
|
+
f"{success_icon}"
|
|
60
|
+
f"{f' | Insights: {total_insights} (of which {errors_count} errors)' if total_insights > 0 else ''}"
|
|
46
61
|
f"{NEWLINE + '⚠️ Data model not read into session' if data_model_not_read else ''}"
|
|
47
|
-
f"{NEWLINE + '📋 For details on issues run
|
|
48
|
-
f"{NEWLINE + '📊 For details on result run
|
|
62
|
+
f"{NEWLINE + '📋 For details on issues run .issues' if change.issues or change.errors else ''}"
|
|
63
|
+
f"{NEWLINE + '📊 For details on result run .result' if change.result else ''}"
|
|
49
64
|
)
|
|
50
65
|
if _COLLECTOR.can_collect:
|
|
51
66
|
event = change.as_mixpanel_event()
|
cognite/neat/_version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "1.0.
|
|
1
|
+
__version__ = "1.0.10"
|
|
2
2
|
__engine__ = "^2.0.4"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cognite-neat
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.10
|
|
4
4
|
Summary: Knowledge graph transformation
|
|
5
5
|
Author: Nikola Vasiljevic, Anders Albert
|
|
6
6
|
Author-email: Nikola Vasiljevic <nikola.vasiljevic@cognite.com>, Anders Albert <anders.albert@cognite.com>
|
|
@@ -90,8 +90,8 @@ cognite/neat/_session/_html/static/issues.css,sha256=Egvqo2cnY8FKTtZp_v3rTWcIgb1
|
|
|
90
90
|
cognite/neat/_session/_html/static/issues.js,sha256=NHx_iAsZTvpZjOoFsxFU_sxqjF4-F4EdHRmoc2DjpIE,6348
|
|
91
91
|
cognite/neat/_session/_html/static/shared.css,sha256=uUm5fqK1zrMBWCuAWdUoBRaAj9AO611hUxuGvxMzbzc,4190
|
|
92
92
|
cognite/neat/_session/_html/templates/__init__.py,sha256=hgufJuBxUZ2nLCMTCxGixmk5ztZF38HzPcvtBkWJwxw,128
|
|
93
|
-
cognite/neat/_session/_html/templates/deployment.html,sha256=
|
|
94
|
-
cognite/neat/_session/_html/templates/issues.html,sha256=
|
|
93
|
+
cognite/neat/_session/_html/templates/deployment.html,sha256=aLDXMbF3pcSqnCpUYVGmIWfqU2jyYUUTaGfpSHRLzdU,3715
|
|
94
|
+
cognite/neat/_session/_html/templates/issues.html,sha256=zjhkJcPK0hMp_ZKJ9RCf88tuZxQyTYRPxzpqx33Nkt0,1661
|
|
95
95
|
cognite/neat/_session/_issues.py,sha256=E8UQeSJURg2dm4MF1pfD9dp-heSRT7pgQZgKlD1-FGs,2723
|
|
96
96
|
cognite/neat/_session/_physical.py,sha256=plYgj4D6e8iOA0AP4Pw-yC_WZFxip74rnXo4iFatWT0,11378
|
|
97
97
|
cognite/neat/_session/_result/__init__.py,sha256=8A0BKgsqnjxkiHUlCpHBNl3mrFWtyjaWYnh0jssE6QU,50
|
|
@@ -106,7 +106,7 @@ cognite/neat/_session/_usage_analytics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JC
|
|
|
106
106
|
cognite/neat/_session/_usage_analytics/_collector.py,sha256=8yVfzt8KFfZ-ldkVjDWazuQbs45Q3r6vWKcZEwU8i18,4734
|
|
107
107
|
cognite/neat/_session/_usage_analytics/_constants.py,sha256=-tVdYrCTMKfuMlbO7AlzC29Nug41ug6uuX9DFuihpJg,561
|
|
108
108
|
cognite/neat/_session/_usage_analytics/_storage.py,sha256=w3mUvmPysww6vM3PZBjg6jzNEsDISl7FJ1j19LNs26E,7779
|
|
109
|
-
cognite/neat/_session/_wrappers.py,sha256=
|
|
109
|
+
cognite/neat/_session/_wrappers.py,sha256=lpmqQM1OueXvgzUYZDsA_w1ZvshBr4K-BHQmtC_xfsk,4280
|
|
110
110
|
cognite/neat/_state_machine/__init__.py,sha256=wrtQUHETiLzYM0pFo7JC6pJCiXetHADQbyMu8pU8rQU,195
|
|
111
111
|
cognite/neat/_state_machine/_base.py,sha256=-ZpeAhM6l6N6W70dET25tAzOxaaK5aa474eabwZVzjA,1112
|
|
112
112
|
cognite/neat/_state_machine/_states.py,sha256=nmj4SmunpDYcBsNx8A284xnXGS43wuUuWpMMORha2DE,1170
|
|
@@ -315,9 +315,9 @@ cognite/neat/_v0/session/_template.py,sha256=BNcvrW5y7LWzRM1XFxZkfR1Nc7e8UgjBClH
|
|
|
315
315
|
cognite/neat/_v0/session/_to.py,sha256=AnsRSDDdfFyYwSgi0Z-904X7WdLtPfLlR0x1xsu_jAo,19447
|
|
316
316
|
cognite/neat/_v0/session/_wizard.py,sha256=baPJgXAAF3d1bn4nbIzon1gWfJOeS5T43UXRDJEnD3c,1490
|
|
317
317
|
cognite/neat/_v0/session/exceptions.py,sha256=jv52D-SjxGfgqaHR8vnpzo0SOJETIuwbyffSWAxSDJw,3495
|
|
318
|
-
cognite/neat/_version.py,sha256=
|
|
318
|
+
cognite/neat/_version.py,sha256=XbBE6_LPiQy1IOEDwd2ObF6iRw55dtwS7MwFwF0Y-VU,45
|
|
319
319
|
cognite/neat/legacy.py,sha256=eI2ecxOV8ilGHyLZlN54ve_abtoK34oXognkFv3yvF0,219
|
|
320
320
|
cognite/neat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
321
|
-
cognite_neat-1.0.
|
|
322
|
-
cognite_neat-1.0.
|
|
323
|
-
cognite_neat-1.0.
|
|
321
|
+
cognite_neat-1.0.10.dist-info/WHEEL,sha256=xDCZ-UyfvkGuEHPeI7BcJzYKIZzdqN8A8o1M5Om8IyA,79
|
|
322
|
+
cognite_neat-1.0.10.dist-info/METADATA,sha256=2Y1TPJdz702eXTK03TixOJVJ2HXWBM46-4AYFzZf54A,6091
|
|
323
|
+
cognite_neat-1.0.10.dist-info/RECORD,,
|