cognite-toolkit 0.7.18__py3-none-any.whl → 0.7.20__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_toolkit/_cdf_tk/storageio/_asset_centric.py +30 -4
- cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml +1 -1
- cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml +1 -1
- cognite_toolkit/_resources/cdf.toml +1 -1
- cognite_toolkit/_version.py +1 -1
- {cognite_toolkit-0.7.18.dist-info → cognite_toolkit-0.7.20.dist-info}/METADATA +1 -1
- {cognite_toolkit-0.7.18.dist-info → cognite_toolkit-0.7.20.dist-info}/RECORD +10 -10
- {cognite_toolkit-0.7.18.dist-info → cognite_toolkit-0.7.20.dist-info}/WHEEL +0 -0
- {cognite_toolkit-0.7.18.dist-info → cognite_toolkit-0.7.20.dist-info}/entry_points.txt +0 -0
- {cognite_toolkit-0.7.18.dist-info → cognite_toolkit-0.7.20.dist-info}/licenses/LICENSE +0 -0
|
@@ -219,9 +219,16 @@ class UploadableAssetCentricIO(
|
|
|
219
219
|
security_category_names.add(security_category_external_id)
|
|
220
220
|
self.client.lookup.security_categories.id(list(security_category_names))
|
|
221
221
|
|
|
222
|
-
def
|
|
223
|
-
self,
|
|
224
|
-
) -> T_ResourceRequest:
|
|
222
|
+
def rows_to_data(
|
|
223
|
+
self, rows: list[tuple[str, dict[str, JsonVal]]], selector: AssetCentricSelector | None = None
|
|
224
|
+
) -> Sequence[UploadItem[T_ResourceRequest]]:
|
|
225
|
+
# We need to populate caches for any external IDs used in the rows before converting to resources.
|
|
226
|
+
# Thus, we override this method instead of row_to_resource, and reuse the json_to_resource method that
|
|
227
|
+
# does the cache population.
|
|
228
|
+
return self.json_chunk_to_data([(source_id, self.row_to_json(row)) for source_id, row in rows])
|
|
229
|
+
|
|
230
|
+
@classmethod
|
|
231
|
+
def row_to_json(cls, row: dict[str, JsonVal]) -> dict[str, JsonVal]:
|
|
225
232
|
metadata: dict[str, JsonVal] = {}
|
|
226
233
|
cleaned_row: dict[str, JsonVal] = {}
|
|
227
234
|
for key, value in row.items():
|
|
@@ -232,7 +239,14 @@ class UploadableAssetCentricIO(
|
|
|
232
239
|
cleaned_row[key] = value
|
|
233
240
|
if metadata:
|
|
234
241
|
cleaned_row["metadata"] = metadata
|
|
235
|
-
return
|
|
242
|
+
return cleaned_row
|
|
243
|
+
|
|
244
|
+
def row_to_resource(
|
|
245
|
+
self, source_id: str, row: dict[str, JsonVal], selector: AssetCentricSelector | None = None
|
|
246
|
+
) -> T_ResourceRequest:
|
|
247
|
+
raise NotImplementedError(
|
|
248
|
+
f"This method should not be called. {type(self).__name__} overrides rows_to_data instead."
|
|
249
|
+
)
|
|
236
250
|
|
|
237
251
|
|
|
238
252
|
class AssetIO(UploadableAssetCentricIO[Asset, AssetWrite]):
|
|
@@ -303,6 +317,9 @@ class AssetIO(UploadableAssetCentricIO[Asset, AssetWrite]):
|
|
|
303
317
|
asset_subtree_external_ids=asset_subtree_external_ids,
|
|
304
318
|
data_set_external_ids=data_set_external_ids,
|
|
305
319
|
aggregated_properties=["child_count", "path", "depth"],
|
|
320
|
+
# We cannot use partitions here as it is not thread safe. This spawn multiple threads
|
|
321
|
+
# that are not shut down until all data is downloaded. We need to be able to abort.
|
|
322
|
+
partitions=None,
|
|
306
323
|
):
|
|
307
324
|
self._collect_dependencies(asset_list, selector)
|
|
308
325
|
yield Page(worker_id="main", items=asset_list)
|
|
@@ -423,6 +440,9 @@ class FileMetadataIO(AssetCentricIO[FileMetadata]):
|
|
|
423
440
|
limit=limit,
|
|
424
441
|
asset_subtree_external_ids=asset_subtree_external_ids,
|
|
425
442
|
data_set_external_ids=data_set_external_ids,
|
|
443
|
+
# We cannot use partitions here as it is not thread safe. This spawn multiple threads
|
|
444
|
+
# that are not shut down until all data is downloaded. We need to be able to abort.
|
|
445
|
+
partitions=None,
|
|
426
446
|
):
|
|
427
447
|
self._collect_dependencies(file_list, selector)
|
|
428
448
|
yield Page(worker_id="main", items=file_list)
|
|
@@ -470,6 +490,9 @@ class TimeSeriesIO(UploadableAssetCentricIO[TimeSeries, TimeSeriesWrite]):
|
|
|
470
490
|
limit=limit,
|
|
471
491
|
asset_subtree_external_ids=asset_subtree_external_ids,
|
|
472
492
|
data_set_external_ids=data_set_external_ids,
|
|
493
|
+
# We cannot use partitions here as it is not thread safe. This spawn multiple threads
|
|
494
|
+
# that are not shut down until all data is downloaded. We need to be able to abort.
|
|
495
|
+
partitions=None,
|
|
473
496
|
):
|
|
474
497
|
self._collect_dependencies(ts_list, selector)
|
|
475
498
|
yield Page(worker_id="main", items=ts_list)
|
|
@@ -597,6 +620,9 @@ class EventIO(UploadableAssetCentricIO[Event, EventWrite]):
|
|
|
597
620
|
limit=limit,
|
|
598
621
|
asset_subtree_external_ids=asset_subtree_external_ids,
|
|
599
622
|
data_set_external_ids=data_set_external_ids,
|
|
623
|
+
# We cannot use partitions here as it is not thread safe. This spawn multiple threads
|
|
624
|
+
# that are not shut down until all data is downloaded. We need to be able to abort.
|
|
625
|
+
partitions=None,
|
|
600
626
|
):
|
|
601
627
|
self._collect_dependencies(event_list, selector)
|
|
602
628
|
yield Page(worker_id="main", items=event_list)
|
cognite_toolkit/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.7.
|
|
1
|
+
__version__ = "0.7.20"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cognite_toolkit
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.20
|
|
4
4
|
Summary: Official Cognite Data Fusion tool for project templates and configuration deployment
|
|
5
5
|
Project-URL: Homepage, https://docs.cognite.com/cdf/deploy/cdf_toolkit/
|
|
6
6
|
Project-URL: Changelog, https://github.com/cognitedata/toolkit/releases
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
cognite_toolkit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
cognite_toolkit/_cdf.py,sha256=sefGD2JQuOTBZhEqSj_ECbNZ7nTRN4AwGwX1pSUhoow,5636
|
|
3
|
-
cognite_toolkit/_version.py,sha256=
|
|
3
|
+
cognite_toolkit/_version.py,sha256=k_NYgI0xLUB_dPJL4N6BdDmPFD0V9fwqtEqrNG-_EGQ,23
|
|
4
4
|
cognite_toolkit/config.dev.yaml,sha256=M33FiIKdS3XKif-9vXniQ444GTZ-bLXV8aFH86u9iUQ,332
|
|
5
5
|
cognite_toolkit/_cdf_tk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
cognite_toolkit/_cdf_tk/cdf_toml.py,sha256=VSWV9h44HusWIaKpWgjrOMrc3hDoPTTXBXlp6-NOrIM,9079
|
|
@@ -245,7 +245,7 @@ cognite_toolkit/_cdf_tk/resource_classes/robotics/map.py,sha256=j77z7CzCMiMj8r94
|
|
|
245
245
|
cognite_toolkit/_cdf_tk/storageio/__init__.py,sha256=h5Wr4i7zNIgsslrsRJxmp7ls4bNRKl0uZzQ7GLRMP7g,1920
|
|
246
246
|
cognite_toolkit/_cdf_tk/storageio/_annotations.py,sha256=JI_g18_Y9S7pbc9gm6dZMyo3Z-bCndJXF9C2lOva0bQ,4848
|
|
247
247
|
cognite_toolkit/_cdf_tk/storageio/_applications.py,sha256=VlTRHqp8jVu16SW7LtrN05BNYZHSPtJ_wf9EsBAAsvE,16419
|
|
248
|
-
cognite_toolkit/_cdf_tk/storageio/_asset_centric.py,sha256=
|
|
248
|
+
cognite_toolkit/_cdf_tk/storageio/_asset_centric.py,sha256=TirKLSNPoLqKjczsw0djWAsR0VvopwmU23aUxrBOJN8,32464
|
|
249
249
|
cognite_toolkit/_cdf_tk/storageio/_base.py,sha256=ElvqhIEBnhcz0yY1Ds164wVN0_7CFNK-uT0-z7LcR9U,13067
|
|
250
250
|
cognite_toolkit/_cdf_tk/storageio/_data_classes.py,sha256=s3TH04BJ1q7rXndRhEbVMEnoOXjxrGg4n-w9Z5uUL-o,3480
|
|
251
251
|
cognite_toolkit/_cdf_tk/storageio/_datapoints.py,sha256=xE1YgoP98-mJjIeF5536KwChzhVY90KYl-bW5sRVhFQ,20206
|
|
@@ -305,13 +305,13 @@ cognite_toolkit/_repo_files/.gitignore,sha256=ip9kf9tcC5OguF4YF4JFEApnKYw0nG0vPi
|
|
|
305
305
|
cognite_toolkit/_repo_files/AzureDevOps/.devops/README.md,sha256=OLA0D7yCX2tACpzvkA0IfkgQ4_swSd-OlJ1tYcTBpsA,240
|
|
306
306
|
cognite_toolkit/_repo_files/AzureDevOps/.devops/deploy-pipeline.yml,sha256=brULcs8joAeBC_w_aoWjDDUHs3JheLMIR9ajPUK96nc,693
|
|
307
307
|
cognite_toolkit/_repo_files/AzureDevOps/.devops/dry-run-pipeline.yml,sha256=OBFDhFWK1mlT4Dc6mDUE2Es834l8sAlYG50-5RxRtHk,723
|
|
308
|
-
cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml,sha256=
|
|
309
|
-
cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml,sha256=
|
|
310
|
-
cognite_toolkit/_resources/cdf.toml,sha256=
|
|
308
|
+
cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml,sha256=sVWo0P7uvKyz1D1mrYhdiRak7DOy0o8GxTNtAR3tNrg,667
|
|
309
|
+
cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml,sha256=nLRRf5K6lur4MsjQPl3wSLMTFb4vAf8MBeAmq8bFBok,2430
|
|
310
|
+
cognite_toolkit/_resources/cdf.toml,sha256=V0xczqShauGTujzM49gbP9aLYGTWf4SWo7ZDWDWkxEM,475
|
|
311
311
|
cognite_toolkit/demo/__init__.py,sha256=-m1JoUiwRhNCL18eJ6t7fZOL7RPfowhCuqhYFtLgrss,72
|
|
312
312
|
cognite_toolkit/demo/_base.py,sha256=6xKBUQpXZXGQ3fJ5f7nj7oT0s2n7OTAGIa17ZlKHZ5U,8052
|
|
313
|
-
cognite_toolkit-0.7.
|
|
314
|
-
cognite_toolkit-0.7.
|
|
315
|
-
cognite_toolkit-0.7.
|
|
316
|
-
cognite_toolkit-0.7.
|
|
317
|
-
cognite_toolkit-0.7.
|
|
313
|
+
cognite_toolkit-0.7.20.dist-info/METADATA,sha256=ouWrKIy9SwM_KVNSweTz9FxFNOmODdelIly77qGRhy0,4501
|
|
314
|
+
cognite_toolkit-0.7.20.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
315
|
+
cognite_toolkit-0.7.20.dist-info/entry_points.txt,sha256=JlR7MH1_UMogC3QOyN4-1l36VbrCX9xUdQoHGkuJ6-4,83
|
|
316
|
+
cognite_toolkit-0.7.20.dist-info/licenses/LICENSE,sha256=CW0DRcx5tL-pCxLEN7ts2S9g2sLRAsWgHVEX4SN9_Mc,752
|
|
317
|
+
cognite_toolkit-0.7.20.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|