cognite-neat 0.81.2__py3-none-any.whl → 0.81.4__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/graph/loaders/_rdf2dms.py +3 -1
- cognite/neat/legacy/rules/exporters/_rules2pydantic_models.py +3 -2
- cognite/neat/rules/models/dms/_exporter.py +6 -0
- {cognite_neat-0.81.2.dist-info → cognite_neat-0.81.4.dist-info}/METADATA +1 -1
- {cognite_neat-0.81.2.dist-info → cognite_neat-0.81.4.dist-info}/RECORD +9 -9
- {cognite_neat-0.81.2.dist-info → cognite_neat-0.81.4.dist-info}/LICENSE +0 -0
- {cognite_neat-0.81.2.dist-info → cognite_neat-0.81.4.dist-info}/WHEEL +0 -0
- {cognite_neat-0.81.2.dist-info → cognite_neat-0.81.4.dist-info}/entry_points.txt +0 -0
cognite/neat/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.81.
|
|
1
|
+
__version__ = "0.81.4"
|
|
@@ -22,6 +22,7 @@ from cognite.neat.issues import NeatIssue, NeatIssueList
|
|
|
22
22
|
from cognite.neat.rules.models import DMSRules
|
|
23
23
|
from cognite.neat.rules.models.data_types import _DATA_TYPE_BY_DMS_TYPE
|
|
24
24
|
from cognite.neat.utils.upload import UploadDiffsID
|
|
25
|
+
from cognite.neat.utils.utils import create_sha256_hash
|
|
25
26
|
|
|
26
27
|
from ._base import CDFLoader
|
|
27
28
|
|
|
@@ -217,9 +218,10 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
|
|
|
217
218
|
tracker.issue(error)
|
|
218
219
|
yield error
|
|
219
220
|
for target in values:
|
|
221
|
+
external_id = f"{identifier}.{prop}.{target}"
|
|
220
222
|
yield dm.EdgeApply(
|
|
221
223
|
space=self.instance_space,
|
|
222
|
-
external_id=
|
|
224
|
+
external_id=external_id if len(external_id) < 256 else create_sha256_hash(external_id),
|
|
223
225
|
type=edge.type,
|
|
224
226
|
start_node=dm.DirectRelationReference(self.instance_space, identifier),
|
|
225
227
|
end_node=dm.DirectRelationReference(self.instance_space, target),
|
|
@@ -21,7 +21,7 @@ from cognite.neat.legacy.rules.exporters._rules2dms import DMSSchemaComponents
|
|
|
21
21
|
from cognite.neat.legacy.rules.exporters._validation import are_entity_names_dms_compliant
|
|
22
22
|
from cognite.neat.legacy.rules.models.rules import Property, Rules
|
|
23
23
|
from cognite.neat.legacy.rules.models.value_types import ValueTypeMapping
|
|
24
|
-
from cognite.neat.utils.utils import generate_exception_report
|
|
24
|
+
from cognite.neat.utils.utils import create_sha256_hash, generate_exception_report
|
|
25
25
|
|
|
26
26
|
if sys.version_info >= (3, 11):
|
|
27
27
|
from datetime import UTC
|
|
@@ -683,9 +683,10 @@ def to_edge(self, data_model: DMSSchemaComponents, add_class_prefix: bool = Fals
|
|
|
683
683
|
stacklevel=2,
|
|
684
684
|
)
|
|
685
685
|
|
|
686
|
+
external_id = f"{self.external_id}.{edge_one_to_many}.{end_node_external_id}"
|
|
686
687
|
edge = EdgeApply(
|
|
687
688
|
space=data_model.views[view_id].space,
|
|
688
|
-
external_id=
|
|
689
|
+
external_id=external_id if len(external_id) < 256 else create_sha256_hash(external_id),
|
|
689
690
|
type=(data_model.views[view_id].space, edge_type_id),
|
|
690
691
|
start_node=(data_model.views[view_id].space, self.external_id),
|
|
691
692
|
end_node=(data_model.views[view_id].space, end_node_external_id),
|
|
@@ -228,6 +228,11 @@ class _DMSExporter:
|
|
|
228
228
|
issues.dms.HasDataFilterOnViewWithReferencesWarning(view.as_id(), list(references)), stacklevel=2
|
|
229
229
|
)
|
|
230
230
|
|
|
231
|
+
if data_model_type == DataModelType.enterprise:
|
|
232
|
+
# Enterprise Model needs to create node types for all views,
|
|
233
|
+
# as they are expected for the solution model.
|
|
234
|
+
unique_node_types.add(dm.NodeId(space=view.space, external_id=view.external_id))
|
|
235
|
+
|
|
231
236
|
return views, NodeApplyDict(
|
|
232
237
|
[dm.NodeApply(space=node.space, external_id=node.external_id) for node in unique_node_types]
|
|
233
238
|
)
|
|
@@ -389,6 +394,7 @@ class _DMSExporter:
|
|
|
389
394
|
}
|
|
390
395
|
if dms_view and isinstance(dms_view.reference, ReferenceEntity):
|
|
391
396
|
referenced_node_ids.add(dms_view.reference.as_node_entity())
|
|
397
|
+
|
|
392
398
|
if referenced_node_ids:
|
|
393
399
|
return NodeTypeFilter(inner=list(referenced_node_ids))
|
|
394
400
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
cognite/neat/__init__.py,sha256=v-rRiDOgZ3sQSMQKq0vgUQZvpeOkoHFXissAx6Ktg84,61
|
|
2
|
-
cognite/neat/_version.py,sha256=
|
|
2
|
+
cognite/neat/_version.py,sha256=cqRrmzm9IAfJ6qhJfemvII7l-WW4gXEf9hbjPRwEJBg,23
|
|
3
3
|
cognite/neat/app/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
cognite/neat/app/api/asgi/metrics.py,sha256=nxFy7L5cChTI0a-zkCiJ59Aq8yLuIJp5c9Dg0wRXtV0,152
|
|
5
5
|
cognite/neat/app/api/configuration.py,sha256=2U5M6M252swvQPQyooA1EBzFUZNtcTmuSaywfJDgckM,4232
|
|
@@ -70,7 +70,7 @@ cognite/neat/graph/issues/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
70
70
|
cognite/neat/graph/issues/loader.py,sha256=v8YDsehkUT1QUG61JM9BDV_lqowMUnDmGmbay0aFzN4,3085
|
|
71
71
|
cognite/neat/graph/loaders/__init__.py,sha256=hHC9sfFfbnGSVFTYeuNTIEu4tdLSJ2mWV07fereLelo,125
|
|
72
72
|
cognite/neat/graph/loaders/_base.py,sha256=bdYC6CwsHVqnQa1QzOhL68qQhF1OtrsearqH6D-z3E4,4037
|
|
73
|
-
cognite/neat/graph/loaders/_rdf2dms.py,sha256=
|
|
73
|
+
cognite/neat/graph/loaders/_rdf2dms.py,sha256=w0y2ECKw7RrQndGyTVIWeFF2WDxs9yvl_eWNqg-tKO8,13018
|
|
74
74
|
cognite/neat/graph/models.py,sha256=AtLgZh2qyRP6NRetjQCy9qLMuTQB0CH52Zsev-qa2sk,149
|
|
75
75
|
cognite/neat/graph/stores/__init__.py,sha256=G-VG_YwfRt1kuPao07PDJyZ3w_0-eguzLUM13n-Z_RA,64
|
|
76
76
|
cognite/neat/graph/stores/_base.py,sha256=6MZAXygT6sHTQ1LWm_TDb2Ws6fgNJ-r4evwcLywpBVk,9481
|
|
@@ -135,7 +135,7 @@ cognite/neat/legacy/rules/exporters/_rules2dms.py,sha256=13CptTLvY9ghcrLPhumUOg6
|
|
|
135
135
|
cognite/neat/legacy/rules/exporters/_rules2excel.py,sha256=ytHsqw2j26T9yLNZHuUSItV8Jp3AvvpIwX8D5-L9GO8,8312
|
|
136
136
|
cognite/neat/legacy/rules/exporters/_rules2graphql.py,sha256=oXBU5z-qFyxG7MW83HYlW-hazhDDNAPKAbJJcsZfcU4,6251
|
|
137
137
|
cognite/neat/legacy/rules/exporters/_rules2ontology.py,sha256=m6adoKOP5EVVEjFX4Qi9yw7UflrDRVgNiBxQ9QVgz6g,18458
|
|
138
|
-
cognite/neat/legacy/rules/exporters/_rules2pydantic_models.py,sha256=
|
|
138
|
+
cognite/neat/legacy/rules/exporters/_rules2pydantic_models.py,sha256=YqiyTzAD0vEEhLbIPNTkK0AzKUG0yfBjz47Rg1mSTq8,28949
|
|
139
139
|
cognite/neat/legacy/rules/exporters/_rules2rules.py,sha256=KlBm1hWkx4Ly5G-_gdcURUwADolMJFnueus02IW51uQ,3881
|
|
140
140
|
cognite/neat/legacy/rules/exporters/_rules2triples.py,sha256=ItkLy6Rji4g5UqLtxaOeodGUvpQG-LVr_ss70PcCPZs,1085
|
|
141
141
|
cognite/neat/legacy/rules/exporters/_validation.py,sha256=saDorwUqJ4Fo6yeCMSRH0Hp3AGCr-rdjb-sOGo91xL0,5767
|
|
@@ -220,7 +220,7 @@ cognite/neat/rules/models/_types/_field.py,sha256=h2RrhjxdaRbzHG5EyduyHLkCJJmQoy
|
|
|
220
220
|
cognite/neat/rules/models/data_types.py,sha256=lanwkhwG8iHKfjYfia4v2SBTJrMeXOsqaVkVEP2QMXs,6078
|
|
221
221
|
cognite/neat/rules/models/dms/__init__.py,sha256=Wzyqzz2ZIjpUbDg04CMuuIAw-f2A02DayNeqO9R-2Hw,491
|
|
222
222
|
cognite/neat/rules/models/dms/_converter.py,sha256=QaJT0z0Yo4gkG9tHPZkU8idF8PK7c-tDahbyIT-WJQU,5959
|
|
223
|
-
cognite/neat/rules/models/dms/_exporter.py,sha256=
|
|
223
|
+
cognite/neat/rules/models/dms/_exporter.py,sha256=DRL5ahcBEdBltHLA2rzLyUfqG5SZkqINkqmYGDkQVg0,24785
|
|
224
224
|
cognite/neat/rules/models/dms/_rules.py,sha256=XTIEWG49VjNs_bICGlgMd6uk4hseY1H6UVe2KMfHAWQ,16152
|
|
225
225
|
cognite/neat/rules/models/dms/_rules_input.py,sha256=apDDTQll9UAyYL5gS2vDxHsujWrGBilTp7lK2kzJWO8,13467
|
|
226
226
|
cognite/neat/rules/models/dms/_schema.py,sha256=byMG67i80a4sSQS_0k8YGrDvh7whio4iLbmPEIy_P44,49514
|
|
@@ -294,8 +294,8 @@ cognite/neat/workflows/steps_registry.py,sha256=fkTX14ZA7_gkUYfWIlx7A1XbCidvqR23
|
|
|
294
294
|
cognite/neat/workflows/tasks.py,sha256=dqlJwKAb0jlkl7abbY8RRz3m7MT4SK8-7cntMWkOYjw,788
|
|
295
295
|
cognite/neat/workflows/triggers.py,sha256=_BLNplzoz0iic367u1mhHMHiUrCwP-SLK6_CZzfODX0,7071
|
|
296
296
|
cognite/neat/workflows/utils.py,sha256=gKdy3RLG7ctRhbCRwaDIWpL9Mi98zm56-d4jfHDqP1E,453
|
|
297
|
-
cognite_neat-0.81.
|
|
298
|
-
cognite_neat-0.81.
|
|
299
|
-
cognite_neat-0.81.
|
|
300
|
-
cognite_neat-0.81.
|
|
301
|
-
cognite_neat-0.81.
|
|
297
|
+
cognite_neat-0.81.4.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
|
|
298
|
+
cognite_neat-0.81.4.dist-info/METADATA,sha256=TwNNE_wMcbd50v_jgDb_5DHsMUHbtyzH0wf-2816AEg,9290
|
|
299
|
+
cognite_neat-0.81.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
300
|
+
cognite_neat-0.81.4.dist-info/entry_points.txt,sha256=61FPqiWb25vbqB0KI7znG8nsg_ibLHBvTjYnkPvNFso,50
|
|
301
|
+
cognite_neat-0.81.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|