cognite-neat 0.123.35__py3-none-any.whl → 0.123.36__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.
Potentially problematic release.
This version of cognite-neat might be problematic. Click here for more details.
- cognite/neat/_version.py +1 -1
- cognite/neat/v0/core/_data_model/_constants.py +2 -0
- cognite/neat/v0/core/_data_model/models/physical/_exporter.py +10 -1
- {cognite_neat-0.123.35.dist-info → cognite_neat-0.123.36.dist-info}/METADATA +3 -4
- {cognite_neat-0.123.35.dist-info → cognite_neat-0.123.36.dist-info}/RECORD +7 -7
- {cognite_neat-0.123.35.dist-info → cognite_neat-0.123.36.dist-info}/WHEEL +0 -0
- {cognite_neat-0.123.35.dist-info → cognite_neat-0.123.36.dist-info}/licenses/LICENSE +0 -0
cognite/neat/_version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "0.123.
|
|
1
|
+
__version__ = "0.123.36"
|
|
2
2
|
__engine__ = "^2.0.4"
|
|
@@ -128,6 +128,8 @@ SPLIT_ON_EQUAL_PATTERN = re.compile(r"=(?![^(]*\))")
|
|
|
128
128
|
# Very special Edge Entity parsing
|
|
129
129
|
SPLIT_ON_EDGE_ENTITY_ARGS_PATTERN = re.compile(r"(\btype\b|\bproperties\b|\bdirection\b)\s*=\s*([^,]+)")
|
|
130
130
|
|
|
131
|
+
CONSTRAINT_ID_MAX_LENGTH = 43
|
|
132
|
+
|
|
131
133
|
|
|
132
134
|
class _Patterns:
|
|
133
135
|
@cached_property
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import hashlib
|
|
1
2
|
import warnings
|
|
2
3
|
from collections import defaultdict
|
|
3
4
|
from collections.abc import Collection, Hashable, Sequence
|
|
@@ -25,6 +26,7 @@ from cognite.neat.v0.core._constants import (
|
|
|
25
26
|
DMS_DIRECT_RELATION_LIST_DEFAULT_LIMIT,
|
|
26
27
|
DMS_PRIMITIVE_LIST_DEFAULT_LIMIT,
|
|
27
28
|
)
|
|
29
|
+
from cognite.neat.v0.core._data_model._constants import CONSTRAINT_ID_MAX_LENGTH
|
|
28
30
|
from cognite.neat.v0.core._data_model.models.data_types import DataType, Double, Enum, Float, LangString, String
|
|
29
31
|
from cognite.neat.v0.core._data_model.models.entities import (
|
|
30
32
|
ConceptEntity,
|
|
@@ -409,12 +411,19 @@ class _DMSExporter:
|
|
|
409
411
|
for container in containers:
|
|
410
412
|
if container.constraints:
|
|
411
413
|
container.constraints = {
|
|
412
|
-
name: const
|
|
414
|
+
self._truncate_constraint_name(name): const
|
|
413
415
|
for name, const in container.constraints.items()
|
|
414
416
|
if not (isinstance(const, dm.RequiresConstraint) and const.require in container_to_drop)
|
|
415
417
|
}
|
|
416
418
|
return ContainerApplyDict([container for container in containers if container.as_id() not in container_to_drop])
|
|
417
419
|
|
|
420
|
+
@staticmethod
|
|
421
|
+
def _truncate_constraint_name(name: str) -> str:
|
|
422
|
+
if len(name) <= CONSTRAINT_ID_MAX_LENGTH:
|
|
423
|
+
return name
|
|
424
|
+
half_length = int(CONSTRAINT_ID_MAX_LENGTH / 2)
|
|
425
|
+
return f"{name[: half_length - 1]}{hashlib.md5(name.encode()).hexdigest()[:half_length]}"
|
|
426
|
+
|
|
418
427
|
@staticmethod
|
|
419
428
|
def _gather_properties(
|
|
420
429
|
properties: Sequence[PhysicalProperty],
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cognite-neat
|
|
3
|
-
Version: 0.123.
|
|
3
|
+
Version: 0.123.36
|
|
4
4
|
Summary: Knowledge graph transformation
|
|
5
5
|
Project-URL: Documentation, https://cognite-neat.readthedocs-hosted.com/
|
|
6
6
|
Project-URL: Homepage, https://cognite-neat.readthedocs-hosted.com/
|
|
7
7
|
Project-URL: GitHub, https://github.com/cognitedata/neat
|
|
8
8
|
Project-URL: Changelog, https://github.com/cognitedata/neat/releases
|
|
9
|
-
Author-email: Nikola Vasiljevic <nikola.vasiljevic@cognite.com>, Anders Albert <anders.albert@cognite.com
|
|
9
|
+
Author-email: Nikola Vasiljevic <nikola.vasiljevic@cognite.com>, Anders Albert <anders.albert@cognite.com>
|
|
10
10
|
License-Expression: Apache-2.0
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Requires-Python: >=3.10
|
|
@@ -96,16 +96,15 @@ The plot below shows the NEAT authorship from the start until present day.
|
|
|
96
96
|
#### Current authors
|
|
97
97
|
- [Nikola Vasiljević](www.linkedin.com/in/thisisnikola)
|
|
98
98
|
- [Anders Albert](https://www.linkedin.com/in/anders-albert-00790483/)
|
|
99
|
-
- [Rogerio Júnior](https://www.linkedin.com/in/rogerio-saboia-j%C3%BAnior-087118a7/)
|
|
100
99
|
|
|
101
100
|
#### Former authors
|
|
102
101
|
- [Aleksandrs Livincovs](https://www.linkedin.com/in/aleksandrslivincovs/)
|
|
103
102
|
- [Julia Graham](https://www.linkedin.com/in/julia-graham-959a78a7/)
|
|
103
|
+
- [Rogerio Júnior](https://www.linkedin.com/in/rogerio-saboia-j%C3%BAnior-087118a7/)
|
|
104
104
|
|
|
105
105
|
### Contributors
|
|
106
106
|
We are very grateful for the contributions made by:
|
|
107
107
|
|
|
108
|
-
|
|
109
108
|
- [Marie Solvik Lepoutre](https://www.linkedin.com/in/mslepoutre/), who improved RDF triples projections to Cognite Data Fusion
|
|
110
109
|
- [Bård Henning Tvedt](https://www.linkedin.com/in/bhtvedt/), who implemented IMF importer
|
|
111
110
|
- [Hassan Gomaa](https://www.linkedin.com/in/dr-hassan-gomaa-232638121/), who extended the DEXPI extractor
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
cognite/neat/__init__.py,sha256=Lo4DbjDOwnhCYUoAgPp5RG1fDdF7OlnomalTe7n1ydw,211
|
|
2
|
-
cognite/neat/_version.py,sha256=
|
|
2
|
+
cognite/neat/_version.py,sha256=jaav_lFeEoGh_VeTDKjQPDYC__mrYSbc7TXSKhz9g7c,47
|
|
3
3
|
cognite/neat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
cognite/neat/_data_model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
cognite/neat/_data_model/_constants.py,sha256=NGGvWHlQqhkkSBP_AqoofGYjNph3SiZX6QPINlMsy04,107
|
|
@@ -42,7 +42,7 @@ cognite/neat/v0/core/_client/data_classes/neat_sequence.py,sha256=QZWSfWnwk6KlYJ
|
|
|
42
42
|
cognite/neat/v0/core/_client/data_classes/schema.py,sha256=YoLm0YQIhbYSFuSgC-GB3jgNy7qZw4WhT3A-jKkIVhk,25079
|
|
43
43
|
cognite/neat/v0/core/_client/data_classes/statistics.py,sha256=GU-u41cOTig0Y5pYhW5KqzCsuAUIX9tOmdizMEveYuw,4487
|
|
44
44
|
cognite/neat/v0/core/_data_model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
45
|
-
cognite/neat/v0/core/_data_model/_constants.py,sha256=
|
|
45
|
+
cognite/neat/v0/core/_data_model/_constants.py,sha256=BEzWHWnEmtkYSPJVcGv3rL7JuYIZZNeI4Y5IUhtqTFk,6071
|
|
46
46
|
cognite/neat/v0/core/_data_model/_shared.py,sha256=ug6B_Vz7seg464xMMn0v3SKN_FNCNG1QeLqW-Bto-yA,2100
|
|
47
47
|
cognite/neat/v0/core/_data_model/analysis/__init__.py,sha256=v3hSfz7AEEqcmdjL71I09tP8Hl-gPZYOiDYMp_CW4vg,70
|
|
48
48
|
cognite/neat/v0/core/_data_model/analysis/_base.py,sha256=AfaKN-NlrXT5J-Tf3CuVzZHwbJXuJbdXwFRJ9uGI_Qg,24472
|
|
@@ -91,7 +91,7 @@ cognite/neat/v0/core/_data_model/models/mapping/__init__.py,sha256=T68Hf7rhiXa7b
|
|
|
91
91
|
cognite/neat/v0/core/_data_model/models/mapping/_classic2core.py,sha256=F0zusTh9pPR4z-RExPw3o4EMBSU2si6FJLuej2a3JzM,1430
|
|
92
92
|
cognite/neat/v0/core/_data_model/models/mapping/_classic2core.yaml,sha256=ei-nuivNWVW9HmvzDBKIPF6ZdgaMq64XHw_rKm0CMxg,22584
|
|
93
93
|
cognite/neat/v0/core/_data_model/models/physical/__init__.py,sha256=pH5ZF8jiW0A2w7VCSoHUsXxe894QFvTtgjxXNGVVaxk,990
|
|
94
|
-
cognite/neat/v0/core/_data_model/models/physical/_exporter.py,sha256=
|
|
94
|
+
cognite/neat/v0/core/_data_model/models/physical/_exporter.py,sha256=Dfll4NU5roUCCvjZ5_q25SYjZntCl5LucuH5Fr4JjQY,30744
|
|
95
95
|
cognite/neat/v0/core/_data_model/models/physical/_unverified.py,sha256=7la586tAfj7a1_Ql8-Z_amf5mFeBXjAJ57bVdNggIrE,20140
|
|
96
96
|
cognite/neat/v0/core/_data_model/models/physical/_validation.py,sha256=I954pfdIA2OWAwQP7foyNa6FBJUVB3U-aqf6Likoqp0,41188
|
|
97
97
|
cognite/neat/v0/core/_data_model/models/physical/_verified.py,sha256=WU0HV8coZfRw-XIEVJZl9PxUaY0Y6q75fBoUF2MgwU4,26813
|
|
@@ -212,7 +212,7 @@ cognite/neat/v0/session/engine/__init__.py,sha256=D3MxUorEs6-NtgoICqtZ8PISQrjrr4
|
|
|
212
212
|
cognite/neat/v0/session/engine/_import.py,sha256=1QxA2_EK613lXYAHKQbZyw2yjo5P9XuiX4Z6_6-WMNQ,169
|
|
213
213
|
cognite/neat/v0/session/engine/_interface.py,sha256=3W-cYr493c_mW3P5O6MKN1xEQg3cA7NHR_ev3zdF9Vk,533
|
|
214
214
|
cognite/neat/v0/session/engine/_load.py,sha256=u0x7vuQCRoNcPt25KJBJRn8sJabonYK4vtSZpiTdP4k,5201
|
|
215
|
-
cognite_neat-0.123.
|
|
216
|
-
cognite_neat-0.123.
|
|
217
|
-
cognite_neat-0.123.
|
|
218
|
-
cognite_neat-0.123.
|
|
215
|
+
cognite_neat-0.123.36.dist-info/METADATA,sha256=6blXCoQDpvS6J53dTnL1gs756MQJTNF5h3O3EyDdDvY,9148
|
|
216
|
+
cognite_neat-0.123.36.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
217
|
+
cognite_neat-0.123.36.dist-info/licenses/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
|
|
218
|
+
cognite_neat-0.123.36.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|