cognite-neat 0.119.6__py3-none-any.whl → 0.119.8__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.

@@ -963,6 +963,7 @@ class ToSolutionModel(ToExtensionModel):
963
963
  immutable=False,
964
964
  container=container_entity,
965
965
  container_property=self.direct_property,
966
+ connection="direct",
966
967
  )
967
968
  new_containers.append(DMSContainer(container=container_entity))
968
969
  container_properties.append(property_)
@@ -16,7 +16,6 @@ from cognite.neat._rules.transformers import (
16
16
  IncludeReferenced,
17
17
  ToDataProductModel,
18
18
  ToEnterpriseModel,
19
- ToSolutionModel,
20
19
  VerifiedRulesTransformer,
21
20
  )
22
21
  from cognite.neat._utils.reader import NeatReader, PathReader
@@ -82,54 +81,6 @@ class TemplateAPI:
82
81
  self._state.last_reference = last_rules
83
82
  return issues
84
83
 
85
- def solution_model(
86
- self,
87
- data_model_id: DataModelIdentifier,
88
- direct_property: str = "enterprise",
89
- view_prefix: str = "Enterprise",
90
- ) -> IssueList:
91
- """Creates a template for a solution model based on the current data model in the session.
92
- A solution data model is for read and write of instances.
93
- The basis for a solution data model should be an enterprise data model.
94
-
95
- Args:
96
- data_model_id: The solution data model id that is being created.
97
- direct_property: The property to use for the direct connection between the views in the solution data model
98
- and the enterprise data model.
99
- view_prefix: The prefix to use for the views in the enterprise data model.
100
-
101
- What does this function do?
102
- 1. It will create two new views for each view in the current data model. The first view will be read-only and
103
- prefixed with the 'view_prefix'. The second view will be writable and have one property that connects to the
104
- read-only view named 'direct_property'.
105
- 2. It will repeat all connection properties in the new views and update the ValueTypes to match the new views.
106
- 3. Each writable view will have a container with the single property that connects to the read-only view.
107
-
108
- !!! note "Solution Data Model Mode"
109
-
110
- The read-only solution model will only be able to read from the existing containers
111
- from the enterprise data model, therefore the solution data model will not have
112
- containers in the solution data model space. Meaning the solution data model views
113
- will be read-only.
114
-
115
- The write mode will have additional containers in the solution data model space,
116
- allowing in addition to read through the solution model views, also writing to
117
- the containers in the solution data model space.
118
-
119
- """
120
- last_rules = self._state.rule_store.last_verified_rules
121
- issues = self._state.rule_transform(
122
- ToSolutionModel(
123
- new_model_id=data_model_id,
124
- properties="connection",
125
- direct_property=direct_property,
126
- view_prefix=view_prefix,
127
- )
128
- )
129
- if last_rules and not issues.has_errors:
130
- self._state.last_reference = last_rules
131
- return issues
132
-
133
84
  def data_product_model(
134
85
  self,
135
86
  data_model_id: DataModelIdentifier,
@@ -1,6 +1,5 @@
1
1
  import warnings
2
2
  import zipfile
3
- from collections.abc import Collection
4
3
  from pathlib import Path
5
4
  from typing import Any, Literal, cast, overload
6
5
 
@@ -15,7 +14,6 @@ from cognite.neat._issues import IssueList, NeatIssue, catch_issues
15
14
  from cognite.neat._rules import exporters
16
15
  from cognite.neat._rules._constants import PATTERNS
17
16
  from cognite.neat._rules._shared import VerifiedRules
18
- from cognite.neat._rules.exporters._rules2dms import Component
19
17
  from cognite.neat._rules.importers import DMSImporter
20
18
  from cognite.neat._rules.models import DMSRules, InformationRules
21
19
  from cognite.neat._rules.models.dms import DMSMetadata
@@ -348,7 +346,6 @@ class CDFToAPI:
348
346
  existing: Literal["fail", "skip", "update", "force", "recreate"] = "update",
349
347
  dry_run: bool = False,
350
348
  drop_data: bool = False,
351
- components: Component | Collection[Component] | None = None,
352
349
  ) -> UploadResultList:
353
350
  """Export the verified DMS data model to CDF.
354
351
 
@@ -359,7 +356,6 @@ class CDFToAPI:
359
356
  drop_data: If existing is 'force' or 'recreate' and the operation will lead to data loss,
360
357
  the component will be skipped unless drop_data is True. Defaults to False.
361
358
  Note this only applies to spaces and containers if they contain data.
362
- components: The components to export. If None, all components will be exported. Defaults to None.
363
359
 
364
360
  !!! note "Data Model creation modes"
365
361
  - "fail": If any component already exists, the export will fail.
@@ -377,7 +373,7 @@ class CDFToAPI:
377
373
  client_required=True,
378
374
  )
379
375
 
380
- exporter = exporters.DMSExporter(existing=existing, export_components=components, drop_data=drop_data)
376
+ exporter = exporters.DMSExporter(existing=existing, drop_data=drop_data)
381
377
 
382
378
  result = self._state.rule_store.export_to_cdf(exporter, cast(NeatClient, self._state.client), dry_run)
383
379
  print("You can inspect the details with the .inspect.outcome.data_model(...) method.")
cognite/neat/_version.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = "0.119.6"
1
+ __version__ = "0.119.8"
2
2
  __engine__ = "^2.0.4"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: cognite-neat
3
- Version: 0.119.6
3
+ Version: 0.119.8
4
4
  Summary: Knowledge graph transformation
5
5
  License: Apache-2.0
6
6
  Author: Nikola Vasiljevic
@@ -132,7 +132,7 @@ cognite/neat/_rules/models/mapping/_classic2core.py,sha256=AhLWoXk4PlBVA6SgBtY9d
132
132
  cognite/neat/_rules/models/mapping/_classic2core.yaml,sha256=ei-nuivNWVW9HmvzDBKIPF6ZdgaMq64XHw_rKm0CMxg,22584
133
133
  cognite/neat/_rules/transformers/__init__.py,sha256=icjtZq6Hc122fEj9AGEcDB8QuF2JL6dWe4utne73naQ,1617
134
134
  cognite/neat/_rules/transformers/_base.py,sha256=9LnjKbYIf9238PQXedkTZsMXAyEND6glUD187iEaHfc,2783
135
- cognite/neat/_rules/transformers/_converters.py,sha256=-veWPRxJJGYBtExSZGlTm3obeG_AE6lSKyaaWNjlHGY,105167
135
+ cognite/neat/_rules/transformers/_converters.py,sha256=-oBTuOD7AhUo46KLGv63H7d0sWAe-izTi31_4CrUEJs,105212
136
136
  cognite/neat/_rules/transformers/_mapping.py,sha256=QVd96vMF9sGailN5hB22KGdmOU8GzFwZ7IPMD0aVCYY,18237
137
137
  cognite/neat/_rules/transformers/_verification.py,sha256=coZjoLqdfS8yrPP62T_xEKrDZc9ETbPWrLuwEVBSLZQ,4370
138
138
  cognite/neat/_session/__init__.py,sha256=fxQ5URVlUnmEGYyB8Baw7IDq-uYacqkigbc4b-Pr9Fw,58
@@ -149,8 +149,8 @@ cognite/neat/_session/_set.py,sha256=F7q1FcmJO4FnNfglFvxOP2WxAXSZ42vC3jlqt1nT1xo
149
149
  cognite/neat/_session/_show.py,sha256=9c0eUGtvN6pIX594P6hVofxDwO7lDE-N3A52htJjcv0,10546
150
150
  cognite/neat/_session/_state.py,sha256=6b0BSXm7m5-OcsF_O0A_7ec9tt8oPqH8zHImyEhVQQA,6313
151
151
  cognite/neat/_session/_subset.py,sha256=4RFGC8apNLnRSKcoDh95ksXA7zLy8vGLxEV5U0H3Hoc,2687
152
- cognite/neat/_session/_template.py,sha256=__oBxd7Zqd_TxWtEPohu17TxKrgQ_RhpHzx-FOyat_Y,11474
153
- cognite/neat/_session/_to.py,sha256=S7209afgOlLWbsKOA0Z4lAwT57gzLmSDaUWpUaWjJJY,19118
152
+ cognite/neat/_session/_template.py,sha256=_QnmpunL092SsL-PSq4XHbmNc6obai8tWasDJGSh3vU,9035
153
+ cognite/neat/_session/_to.py,sha256=OSjlihit_8zxzU7PISzcMQLc4Kr9Vw18tfJb8x2cQkI,18807
154
154
  cognite/neat/_session/_wizard.py,sha256=9idlzhZy54h2Iwupe9iXKX3RDb5jJQuBZFEouni50L0,1476
155
155
  cognite/neat/_session/engine/__init__.py,sha256=D3MxUorEs6-NtgoICqtZ8PISQrjrr4dvca6n48bu_bI,120
156
156
  cognite/neat/_session/engine/_import.py,sha256=1QxA2_EK613lXYAHKQbZyw2yjo5P9XuiX4Z6_6-WMNQ,169
@@ -178,10 +178,10 @@ cognite/neat/_utils/text.py,sha256=9T0mzcNn6J9X8DriNntLN5ThCXOWbU1BYareukbLT7A,8
178
178
  cognite/neat/_utils/time_.py,sha256=7ayUm0OWZm1JDmy32E4ip8WRr2o0GLwrHwJA8sJ43Z4,357
179
179
  cognite/neat/_utils/upload.py,sha256=xWtM6mFuD2QYQHaZ7zCAuGptbEpPIxcH-raWQu93-Ug,5845
180
180
  cognite/neat/_utils/xml_.py,sha256=FQkq84u35MUsnKcL6nTMJ9ajtG9D5i1u4VBnhGqP2DQ,1710
181
- cognite/neat/_version.py,sha256=PMMvXzjpIQrJcZSFUXSxvBPOKdUWMxSLqlWCXt02gEs,46
181
+ cognite/neat/_version.py,sha256=HdzooeBEuAg1Ro1HQJcV_6dR9Da3Vu4DdrA37UUvyKc,46
182
182
  cognite/neat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
183
- cognite_neat-0.119.6.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
184
- cognite_neat-0.119.6.dist-info/METADATA,sha256=Y_xkuQpxFTBKsbjpHHOpWoHeW6V0tfsa-_ju85U70Ms,7646
185
- cognite_neat-0.119.6.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
186
- cognite_neat-0.119.6.dist-info/entry_points.txt,sha256=SsQlnl8SNMSSjE3acBI835JYFtsIinLSbVmHmMEXv6E,51
187
- cognite_neat-0.119.6.dist-info/RECORD,,
183
+ cognite_neat-0.119.8.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
184
+ cognite_neat-0.119.8.dist-info/METADATA,sha256=fOoW9qGTE0VoQCwt0mDJZwSp3slRxvSJb4rIZqHhXpI,7646
185
+ cognite_neat-0.119.8.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
186
+ cognite_neat-0.119.8.dist-info/entry_points.txt,sha256=SsQlnl8SNMSSjE3acBI835JYFtsIinLSbVmHmMEXv6E,51
187
+ cognite_neat-0.119.8.dist-info/RECORD,,