cognite-neat 1.0.27__py3-none-any.whl → 1.0.28__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/_data_model/importers/_table_importer/data_classes.py +1 -2
- cognite/neat/_data_model/validation/dms/_limits.py +11 -11
- cognite/neat/_version.py +1 -1
- cognite/neat/legacy.py +10 -0
- {cognite_neat-1.0.27.dist-info → cognite_neat-1.0.28.dist-info}/METADATA +10 -9
- {cognite_neat-1.0.27.dist-info → cognite_neat-1.0.28.dist-info}/RECORD +7 -7
- {cognite_neat-1.0.27.dist-info → cognite_neat-1.0.28.dist-info}/WHEEL +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Annotated, Literal, cast, get_args
|
|
2
|
+
from typing import Annotated, Any, Literal, cast, get_args
|
|
3
3
|
|
|
4
4
|
from pydantic import (
|
|
5
5
|
AliasGenerator,
|
|
@@ -12,7 +12,6 @@ from pydantic import (
|
|
|
12
12
|
)
|
|
13
13
|
from pydantic.alias_generators import to_camel
|
|
14
14
|
from pydantic.fields import FieldInfo
|
|
15
|
-
from traitlets import Any
|
|
16
15
|
|
|
17
16
|
from cognite.neat._data_model.models.entities import ParsedEntity, parse_entities, parse_entity
|
|
18
17
|
from cognite.neat._utils.text import title_case
|
|
@@ -11,7 +11,7 @@ from cognite.neat._data_model.models.dms._view_property import (
|
|
|
11
11
|
from cognite.neat._data_model.validation.dms._base import (
|
|
12
12
|
DataModelValidator,
|
|
13
13
|
)
|
|
14
|
-
from cognite.neat._issues import ConsistencyError
|
|
14
|
+
from cognite.neat._issues import ConsistencyError, Recommendation
|
|
15
15
|
|
|
16
16
|
BASE_CODE = "NEAT-DMS-LIMITS"
|
|
17
17
|
|
|
@@ -124,19 +124,19 @@ class ViewContainerCountIsOutOfLimits(DataModelValidator):
|
|
|
124
124
|
Checks that the view references no more containers than the CDF limit allows.
|
|
125
125
|
|
|
126
126
|
## Why is this bad?
|
|
127
|
-
|
|
128
|
-
to
|
|
127
|
+
Mapping too many containers to a single view can lead to performance issues to increasing number of joins
|
|
128
|
+
that need to be performed when querying data through the view.
|
|
129
129
|
|
|
130
130
|
## Example
|
|
131
131
|
If a view references 20 containers and the CDF limit is 10 containers per view,
|
|
132
|
-
this validator will raise a
|
|
132
|
+
this validator will raise a Recommendation.
|
|
133
133
|
"""
|
|
134
134
|
|
|
135
135
|
code = f"{BASE_CODE}-VIEW-002"
|
|
136
|
-
issue_type =
|
|
136
|
+
issue_type = Recommendation
|
|
137
137
|
|
|
138
|
-
def run(self) -> list[
|
|
139
|
-
|
|
138
|
+
def run(self) -> list[Recommendation]:
|
|
139
|
+
recommendations: list[Recommendation] = []
|
|
140
140
|
|
|
141
141
|
# Single loop over all views
|
|
142
142
|
for view_ref in self.validation_resources.merged_data_model.views or []:
|
|
@@ -152,18 +152,18 @@ class ViewContainerCountIsOutOfLimits(DataModelValidator):
|
|
|
152
152
|
}
|
|
153
153
|
)
|
|
154
154
|
if count > self.validation_resources.limits.views.containers:
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
recommendations.append(
|
|
156
|
+
Recommendation(
|
|
157
157
|
message=(
|
|
158
158
|
f"View {view_ref!s} references "
|
|
159
|
-
f"{count} containers, which exceeds
|
|
159
|
+
f"{count} containers, which exceeds a common sense limit of "
|
|
160
160
|
f"{self.validation_resources.limits.views.containers} containers per view."
|
|
161
161
|
),
|
|
162
162
|
code=self.code,
|
|
163
163
|
)
|
|
164
164
|
)
|
|
165
165
|
|
|
166
|
-
return
|
|
166
|
+
return recommendations
|
|
167
167
|
|
|
168
168
|
|
|
169
169
|
class ViewImplementsCountIsOutOfLimits(DataModelValidator):
|
cognite/neat/_version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "1.0.
|
|
1
|
+
__version__ = "1.0.28"
|
|
2
2
|
__engine__ = "^2.0.4"
|
cognite/neat/legacy.py
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
|
|
3
|
+
from cognite.neat._exceptions import NeatImportError
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
importlib.import_module("rdflib")
|
|
7
|
+
except ImportError as e:
|
|
8
|
+
raise NeatImportError("legacy module", "legacy") from e
|
|
9
|
+
|
|
10
|
+
|
|
1
11
|
from cognite.neat._v0.core._utils.auth import get_cognite_client
|
|
2
12
|
from cognite.neat._v0.session._base import NeatSession
|
|
3
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cognite-neat
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.28
|
|
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>
|
|
@@ -17,22 +17,14 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
19
|
Classifier: Operating System :: OS Independent
|
|
20
|
-
Requires-Dist: pandas>=1.5.3,<3.0.0
|
|
21
20
|
Requires-Dist: cognite-sdk>=7.83.0,<8.0.0
|
|
22
|
-
Requires-Dist: rdflib>=7.0.0,<8.0.0
|
|
23
21
|
Requires-Dist: httpx>=0.28.1
|
|
24
22
|
Requires-Dist: pydantic>=2.0.0,<3.0.0
|
|
25
23
|
Requires-Dist: pyyaml>=6.0.1,<7.0.0
|
|
26
|
-
Requires-Dist: requests>=2.28.1,<3.0.0
|
|
27
24
|
Requires-Dist: urllib3>=1.26.15,<3.0.0
|
|
28
25
|
Requires-Dist: openpyxl>=3.0.10,<4.0.0
|
|
29
26
|
Requires-Dist: networkx>=3.4.2,<4.0.0
|
|
30
27
|
Requires-Dist: mixpanel>=4.10.1,<5.0.0
|
|
31
|
-
Requires-Dist: packaging>=22.0
|
|
32
|
-
Requires-Dist: jsonpath-python>=1.0.6,<2.0.0
|
|
33
|
-
Requires-Dist: elementpath>=4.0.0,<5.0.0
|
|
34
|
-
Requires-Dist: pyvis>=0.3.2,<1.0.0
|
|
35
|
-
Requires-Dist: rich[jupyter]>=13.7.1,<14.0.0
|
|
36
28
|
Requires-Dist: exceptiongroup>=1.1.3,<2.0.0 ; python_full_version < '3.11'
|
|
37
29
|
Requires-Dist: backports-strenum>=1.2,<2.0.0 ; python_full_version < '3.11'
|
|
38
30
|
Requires-Dist: typing-extensions>=4.8.0,<5.0.0 ; python_full_version < '3.11'
|
|
@@ -51,6 +43,14 @@ Requires-Dist: mkdocs-autorefs>=0.5.0,<1.0.0 ; extra == 'docs'
|
|
|
51
43
|
Requires-Dist: gspread>=5.0.0,<6.0.0 ; extra == 'google'
|
|
52
44
|
Requires-Dist: google-api-python-client>=2.70.0,<3.0.0 ; extra == 'google'
|
|
53
45
|
Requires-Dist: google-auth-oauthlib>=1.0.0,<2.0.0 ; extra == 'google'
|
|
46
|
+
Requires-Dist: rdflib>=7.0.0,<8.0.0 ; extra == 'legacy'
|
|
47
|
+
Requires-Dist: pandas>=1.5.3,<3.0.0 ; extra == 'legacy'
|
|
48
|
+
Requires-Dist: requests>=2.28.1,<3.0.0 ; extra == 'legacy'
|
|
49
|
+
Requires-Dist: packaging>=22.0 ; extra == 'legacy'
|
|
50
|
+
Requires-Dist: jsonpath-python>=1.0.6,<2.0.0 ; extra == 'legacy'
|
|
51
|
+
Requires-Dist: elementpath>=4.0.0,<5.0.0 ; extra == 'legacy'
|
|
52
|
+
Requires-Dist: pyvis>=0.3.2,<1.0.0 ; extra == 'legacy'
|
|
53
|
+
Requires-Dist: rich[jupyter]>=13.7.1,<14.0.0 ; extra == 'legacy'
|
|
54
54
|
Requires-Dist: lxml>=5.3.0,<6.0.0 ; extra == 'lxml'
|
|
55
55
|
Requires-Dist: oxrdflib>=0.4.0,<0.5.0 ; extra == 'oxi'
|
|
56
56
|
Requires-Dist: pyoxigraph>=0.4.3,<0.5.0 ; extra == 'oxi'
|
|
@@ -61,6 +61,7 @@ Project-URL: GitHub, https://github.com/cognitedata/neat
|
|
|
61
61
|
Project-URL: Changelog, https://github.com/cognitedata/neat/releases
|
|
62
62
|
Provides-Extra: docs
|
|
63
63
|
Provides-Extra: google
|
|
64
|
+
Provides-Extra: legacy
|
|
64
65
|
Provides-Extra: lxml
|
|
65
66
|
Provides-Extra: oxi
|
|
66
67
|
Description-Content-Type: text/markdown
|
|
@@ -41,7 +41,7 @@ cognite/neat/_data_model/importers/__init__.py,sha256=dHnKnC_AXk42z6wzEHK15dxIOh
|
|
|
41
41
|
cognite/neat/_data_model/importers/_api_importer.py,sha256=H8Ow3Tt7utuAuBhC6s7yWvhGqunHAtE0r0XRsVAr6IE,7280
|
|
42
42
|
cognite/neat/_data_model/importers/_base.py,sha256=NRB0FcEBj4GaethU68nRffBfTedBBA866A3zfJNfmiQ,433
|
|
43
43
|
cognite/neat/_data_model/importers/_table_importer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
|
-
cognite/neat/_data_model/importers/_table_importer/data_classes.py,sha256=
|
|
44
|
+
cognite/neat/_data_model/importers/_table_importer/data_classes.py,sha256=_Hfub4GZNxiq01JcxijjeNFaecJXQmmMNoFe7apo0iM,11466
|
|
45
45
|
cognite/neat/_data_model/importers/_table_importer/importer.py,sha256=lQ4_Gpv0haEwQEDYZJaxtR9dL6Y0ys9jbjFfWxH6s2o,8870
|
|
46
46
|
cognite/neat/_data_model/importers/_table_importer/reader.py,sha256=5NkUvem9sR3WUM1vtfm6duu76oD3vQ0gi6UuBOcr3bo,50933
|
|
47
47
|
cognite/neat/_data_model/importers/_table_importer/source.py,sha256=h7u5ur5oetmvBs3wgj7Ody5uPF21QwxeAceoIhJ5qzo,3300
|
|
@@ -82,7 +82,7 @@ cognite/neat/_data_model/validation/dms/_base.py,sha256=G_gMPTgKwyBW62UcCkKIBVHW
|
|
|
82
82
|
cognite/neat/_data_model/validation/dms/_connections.py,sha256=-kUXf2_3V50ckxwXRwJoTHsKkS5zxiBKkkkHg8Dm4WI,30353
|
|
83
83
|
cognite/neat/_data_model/validation/dms/_consistency.py,sha256=IKSUoRQfQQcsymviESW9VuTFX7jsZMXfsObeZHPdov4,2435
|
|
84
84
|
cognite/neat/_data_model/validation/dms/_containers.py,sha256=8pVnmeX6G9tQaGzzwRB_40y7TYUm4guaNbRiFgoGILU,9895
|
|
85
|
-
cognite/neat/_data_model/validation/dms/_limits.py,sha256=
|
|
85
|
+
cognite/neat/_data_model/validation/dms/_limits.py,sha256=rAIh54DJBPi3J7d7eD-jMdldZS8R2vlkQ5MD9RxNsrI,14830
|
|
86
86
|
cognite/neat/_data_model/validation/dms/_orchestrator.py,sha256=qiuUSUmNhekFyBARUUO2yhG-X9AeU_LL49UrJ65JXFA,2964
|
|
87
87
|
cognite/neat/_data_model/validation/dms/_views.py,sha256=pRdnj5ZBnHNnbLKleXGbipteGma8_l5AYsDIfqgAil4,6345
|
|
88
88
|
cognite/neat/_exceptions.py,sha256=mO19TEecZYDNqSvzuc6JmCLFQ70eniT1-Gb0AEbgbzE,2090
|
|
@@ -327,9 +327,9 @@ cognite/neat/_v0/session/_template.py,sha256=BNcvrW5y7LWzRM1XFxZkfR1Nc7e8UgjBClH
|
|
|
327
327
|
cognite/neat/_v0/session/_to.py,sha256=AnsRSDDdfFyYwSgi0Z-904X7WdLtPfLlR0x1xsu_jAo,19447
|
|
328
328
|
cognite/neat/_v0/session/_wizard.py,sha256=baPJgXAAF3d1bn4nbIzon1gWfJOeS5T43UXRDJEnD3c,1490
|
|
329
329
|
cognite/neat/_v0/session/exceptions.py,sha256=jv52D-SjxGfgqaHR8vnpzo0SOJETIuwbyffSWAxSDJw,3495
|
|
330
|
-
cognite/neat/_version.py,sha256=
|
|
331
|
-
cognite/neat/legacy.py,sha256=
|
|
330
|
+
cognite/neat/_version.py,sha256=D8wnGH1r0wYJFo06cmkFVRH6v-0euoV5JeDvOyoYFfE,45
|
|
331
|
+
cognite/neat/legacy.py,sha256=DMFeLCSBLT2enk-nm1KfX1rKR2DQDpxY-w6ThY0y9c8,421
|
|
332
332
|
cognite/neat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
333
|
-
cognite_neat-1.0.
|
|
334
|
-
cognite_neat-1.0.
|
|
335
|
-
cognite_neat-1.0.
|
|
333
|
+
cognite_neat-1.0.28.dist-info/WHEEL,sha256=XV0cjMrO7zXhVAIyyc8aFf1VjZ33Fen4IiJk5zFlC3g,80
|
|
334
|
+
cognite_neat-1.0.28.dist-info/METADATA,sha256=i_1J8DaOFH5SdieuKec3Rp521-bBB0bWdPnO2NSgVZg,6872
|
|
335
|
+
cognite_neat-1.0.28.dist-info/RECORD,,
|
|
File without changes
|