cognite-toolkit 0.6.106__py3-none-any.whl → 0.6.108__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.
@@ -4,6 +4,7 @@ from typing import Annotated, Any
4
4
 
5
5
  import questionary
6
6
  import typer
7
+ from cognite.client.data_classes import Annotation
7
8
  from cognite.client.data_classes.data_modeling import ContainerId
8
9
 
9
10
  from cognite_toolkit._cdf_tk.client import ToolkitClient
@@ -19,6 +20,7 @@ from cognite_toolkit._cdf_tk.commands._migrate.creators import (
19
20
  )
20
21
  from cognite_toolkit._cdf_tk.commands._migrate.data_mapper import AssetCentricMapper
21
22
  from cognite_toolkit._cdf_tk.commands._migrate.migration_io import (
23
+ AnnotationMigrationIO,
22
24
  AssetCentricMigrationIO,
23
25
  )
24
26
  from cognite_toolkit._cdf_tk.commands._migrate.selectors import (
@@ -31,6 +33,7 @@ from cognite_toolkit._cdf_tk.utils.cli_args import parse_view_str
31
33
  from cognite_toolkit._cdf_tk.utils.interactive_select import (
32
34
  AssetInteractiveSelect,
33
35
  DataModelingSelect,
36
+ FileMetadataInteractiveSelect,
34
37
  ResourceViewMappingInteractiveSelect,
35
38
  )
36
39
  from cognite_toolkit._cdf_tk.utils.useful_types import AssetCentricKind
@@ -49,6 +52,7 @@ class MigrateApp(typer.Typer):
49
52
  self.command("events")(self.events)
50
53
  self.command("timeseries")(self.timeseries)
51
54
  self.command("files")(self.files)
55
+ self.command("annotations")(self.annotations)
52
56
  self.command("canvas")(self.canvas)
53
57
  # Uncomment when infield v2 config migration is ready
54
58
  # self.command("infield-configs")(self.infield_configs)
@@ -694,6 +698,149 @@ class MigrateApp(typer.Typer):
694
698
  )
695
699
  )
696
700
 
701
+ @classmethod
702
+ def annotations(
703
+ cls,
704
+ ctx: typer.Context,
705
+ mapping_file: Annotated[
706
+ Path | None,
707
+ typer.Option(
708
+ "--mapping-file",
709
+ "-m",
710
+ help="Path to the mapping file that contains the mapping from Annotations to CogniteDiagramAnnotation. "
711
+ "This file is expected to have the following columns: [id, space, externalId, ingestionView].",
712
+ ),
713
+ ] = None,
714
+ data_set_id: Annotated[
715
+ str | None,
716
+ typer.Option(
717
+ "--data-set-id",
718
+ "-s",
719
+ help="The data set ID to select for the annotations to migrate. If not provided and the mapping file is not provided, "
720
+ "an interactive selection will be performed to select the data set to migrate annotations from.",
721
+ ),
722
+ ] = None,
723
+ instance_space: Annotated[
724
+ str | None,
725
+ typer.Option(
726
+ "--instance-space",
727
+ "-i",
728
+ help="The instance space to use for the migrated annotations. Required when using --data-set-id.",
729
+ ),
730
+ ] = None,
731
+ asset_annotation_mapping: Annotated[
732
+ str | None,
733
+ typer.Option(
734
+ "--asset-annotation-mapping",
735
+ "-a",
736
+ help="The ingestion mapping to use for asset-linked annotations. If not provided, "
737
+ "the default mapping (cdf_asset_annotations_mapping) will be used.",
738
+ ),
739
+ ] = None,
740
+ file_annotation_mapping: Annotated[
741
+ str | None,
742
+ typer.Option(
743
+ "--file-annotation-mapping",
744
+ "-f",
745
+ help="The ingestion mapping to use for file-linked annotations. If not provided, "
746
+ "the default mapping (cdf_file_annotations_mapping) will be used.",
747
+ ),
748
+ ] = None,
749
+ log_dir: Annotated[
750
+ Path,
751
+ typer.Option(
752
+ "--log-dir",
753
+ "-l",
754
+ help="Path to the directory where logs will be stored. If the directory does not exist, it will be created.",
755
+ ),
756
+ ] = Path(f"migration_logs_{TODAY!s}"),
757
+ dry_run: Annotated[
758
+ bool,
759
+ typer.Option(
760
+ "--dry-run",
761
+ "-d",
762
+ help="If set, the migration will not be executed, but only a report of what would be done is printed.",
763
+ ),
764
+ ] = False,
765
+ verbose: Annotated[
766
+ bool,
767
+ typer.Option(
768
+ "--verbose",
769
+ "-v",
770
+ help="Turn on to get more verbose output when running the command",
771
+ ),
772
+ ] = False,
773
+ ) -> None:
774
+ """Migrate Annotations to CogniteDiagramAnnotation edges in data modeling.
775
+
776
+ Annotations are diagram annotations that link assets or files to other resources. This command
777
+ migrates them to edges in the data modeling space, preserving the relationships and metadata.
778
+ """
779
+ client = EnvironmentVariables.create_from_environment().get_client()
780
+
781
+ if data_set_id is not None and mapping_file is not None:
782
+ raise typer.BadParameter("Cannot specify both data_set_id and mapping_file")
783
+ elif mapping_file is not None:
784
+ selected: AssetCentricMigrationSelector = MigrationCSVFileSelector(
785
+ datafile=mapping_file, kind="Annotations"
786
+ )
787
+ annotation_io = AnnotationMigrationIO(client)
788
+ elif data_set_id is not None:
789
+ if instance_space is None:
790
+ raise typer.BadParameter("--instance-space is required when using --data-set-id")
791
+ selected = MigrateDataSetSelector(data_set_external_id=data_set_id, kind="Annotations")
792
+ annotation_io = AnnotationMigrationIO(
793
+ client,
794
+ instance_space=instance_space,
795
+ default_asset_annotation_mapping=asset_annotation_mapping,
796
+ default_file_annotation_mapping=file_annotation_mapping,
797
+ )
798
+ else:
799
+ # Interactive selection
800
+ selector = FileMetadataInteractiveSelect(client, "migrate")
801
+ selected_data_set_id = selector.select_data_set(allow_empty=False)
802
+ dm_selector = DataModelingSelect(client, "migrate")
803
+ selected_instance_space = dm_selector.select_instance_space(
804
+ multiselect=False,
805
+ message="In which instance space do you want to create the annotations?",
806
+ include_empty=True,
807
+ )
808
+ if selected_instance_space is None:
809
+ raise typer.Abort()
810
+ asset_annotations_selector = ResourceViewMappingInteractiveSelect(client, "migrate asset annotations")
811
+ asset_annotation_mapping = asset_annotations_selector.select_resource_view_mapping(
812
+ resource_type="assetAnnotation",
813
+ ).external_id
814
+ file_annotations_selector = ResourceViewMappingInteractiveSelect(client, "migrate file annotations")
815
+ file_annotation_mapping = file_annotations_selector.select_resource_view_mapping(
816
+ resource_type="fileAnnotation",
817
+ ).external_id
818
+
819
+ selected = MigrateDataSetSelector(data_set_external_id=selected_data_set_id, kind="Annotations")
820
+ annotation_io = AnnotationMigrationIO(
821
+ client,
822
+ instance_space=selected_instance_space,
823
+ default_asset_annotation_mapping=asset_annotation_mapping,
824
+ default_file_annotation_mapping=file_annotation_mapping,
825
+ )
826
+
827
+ dry_run = questionary.confirm("Do you want to perform a dry run?", default=dry_run).ask()
828
+ verbose = questionary.confirm("Do you want verbose output?", default=verbose).ask()
829
+ if any(res is None for res in [dry_run, verbose]):
830
+ raise typer.Abort()
831
+
832
+ cmd = MigrationCommand()
833
+ cmd.run(
834
+ lambda: cmd.migrate(
835
+ selected=selected,
836
+ data=annotation_io,
837
+ mapper=AssetCentricMapper[Annotation](client),
838
+ log_dir=log_dir,
839
+ dry_run=dry_run,
840
+ verbose=verbose,
841
+ )
842
+ )
843
+
697
844
  @staticmethod
698
845
  def canvas(
699
846
  ctx: typer.Context,
@@ -10,6 +10,7 @@ from cognite.client.data_classes.data_modeling import (
10
10
  NodeApplyResultList,
11
11
  NodeId,
12
12
  NodeList,
13
+ ViewId,
13
14
  filters,
14
15
  query,
15
16
  )
@@ -347,6 +348,9 @@ class SpaceSourceAPI:
347
348
  return results
348
349
 
349
350
 
351
+ _T_Cached = TypeVar("_T_Cached", bound=NodeId | ViewId)
352
+
353
+
350
354
  class LookupAPI:
351
355
  def __init__(self, instance_api: ExtendedInstancesAPI, resource_type: AssetCentricType) -> None:
352
356
  self._instance_api = instance_api
@@ -354,13 +358,15 @@ class LookupAPI:
354
358
  self._view_id = InstanceSource.get_source()
355
359
  self._node_id_by_id: dict[int, NodeId | None] = {}
356
360
  self._node_id_by_external_id: dict[str, NodeId | None] = {}
361
+ self._consumer_view_id_by_id: dict[int, ViewId | None] = {}
362
+ self._consumer_view_id_by_external_id: dict[str, ViewId | None] = {}
357
363
  self._RETRIEVE_LIMIT = 1000
358
364
 
359
365
  @overload
360
366
  def __call__(self, id: int, external_id: None = None) -> NodeId | None: ...
361
367
 
362
368
  @overload
363
- def __call__(self, id: Sequence[int], external_id: None = None) -> dict[int, NodeId]: ...
369
+ def __call__(self, id: SequenceNotStr[int], external_id: None = None) -> dict[int, NodeId]: ...
364
370
 
365
371
  @overload
366
372
  def __call__(self, *, external_id: str) -> NodeId | None: ...
@@ -369,7 +375,7 @@ class LookupAPI:
369
375
  def __call__(self, *, external_id: SequenceNotStr[str]) -> dict[str, NodeId]: ...
370
376
 
371
377
  def __call__(
372
- self, id: int | Sequence[int] | None = None, external_id: str | SequenceNotStr[str] | None = None
378
+ self, id: int | SequenceNotStr[int] | None = None, external_id: str | SequenceNotStr[str] | None = None
373
379
  ) -> dict[int, NodeId] | dict[str, NodeId] | NodeId | None:
374
380
  """Lookup NodeId by either internal ID or external ID.
375
381
 
@@ -382,35 +388,87 @@ class LookupAPI:
382
388
 
383
389
  """
384
390
  if id is not None and external_id is None:
385
- return self._lookup_by_id(id)
391
+ return self._lookup(
392
+ identifier=id,
393
+ cache=self._node_id_by_id,
394
+ property_name="id",
395
+ return_type=NodeId,
396
+ input_type=int,
397
+ )
386
398
  elif external_id is not None and id is None:
387
- return self._lookup_by_external_id(external_id)
399
+ return self._lookup(
400
+ identifier=external_id,
401
+ cache=self._node_id_by_external_id,
402
+ property_name="classicExternalId",
403
+ return_type=NodeId,
404
+ input_type=str,
405
+ )
388
406
  else:
389
- raise ValueError("Either id or external_id must be provided, but not both.")
407
+ raise TypeError("Either id or external_id must be provided, but not both.")
390
408
 
391
- def _lookup_by_id(self, id: int | Sequence[int]) -> dict[int, NodeId] | NodeId | None:
392
- ids: list[int] = [id] if isinstance(id, int) else list(id)
409
+ @overload
410
+ def consumer_view(self, id: int, external_id: None = None) -> ViewId | None: ...
393
411
 
394
- missing = [id_ for id_ in ids if id_ not in self._node_id_by_id]
395
- if missing:
396
- self._fetch_and_cache(missing, by="id")
397
- if isinstance(id, int):
398
- return self._node_id_by_id.get(id)
399
- return {id_: node_id for id_ in ids if isinstance(node_id := self._node_id_by_id.get(id_), NodeId)}
412
+ @overload
413
+ def consumer_view(self, id: SequenceNotStr[int], external_id: None = None) -> dict[int, ViewId]: ...
400
414
 
401
- def _lookup_by_external_id(self, external_id: str | SequenceNotStr[str]) -> dict[str, NodeId] | NodeId | None:
402
- external_ids: list[str] = [external_id] if isinstance(external_id, str) else list(external_id)
415
+ @overload
416
+ def consumer_view(self, *, external_id: str) -> ViewId | None: ...
417
+
418
+ @overload
419
+ def consumer_view(self, *, external_id: SequenceNotStr[str]) -> dict[str, ViewId]: ...
420
+
421
+ def consumer_view(
422
+ self, id: int | SequenceNotStr[int] | None = None, external_id: str | SequenceNotStr[str] | None = None
423
+ ) -> dict[int, ViewId] | dict[str, ViewId] | ViewId | None:
424
+ """Lookup Consumer ViewId by either internal ID or external ID.
425
+
426
+ Args:
427
+ id (int | Sequence[int] | None): The internal ID(s) to lookup.
428
+ external_id (str | SequenceNotStr[str] | None): The external ID(s) to lookup.
429
+ Returns:
430
+ ViewId | dict[int, ViewId] | dict[str, ViewId] | None
431
+ """
432
+ if id is not None and external_id is None:
433
+ return self._lookup(
434
+ identifier=id,
435
+ cache=self._consumer_view_id_by_id,
436
+ property_name="id",
437
+ return_type=ViewId,
438
+ input_type=int,
439
+ )
440
+ elif external_id is not None and id is None:
441
+ return self._lookup(
442
+ identifier=external_id,
443
+ cache=self._consumer_view_id_by_external_id,
444
+ property_name="classicExternalId",
445
+ return_type=ViewId,
446
+ input_type=str,
447
+ )
448
+ else:
449
+ raise TypeError("Either id or external_id must be provided, but not both.")
403
450
 
404
- missing = [ext_id for ext_id in external_ids if ext_id not in self._node_id_by_external_id]
451
+ def _lookup(
452
+ self,
453
+ identifier: _T | SequenceNotStr[_T],
454
+ cache: dict[_T, _T_Cached | None],
455
+ property_name: Literal["id", "classicExternalId"],
456
+ return_type: type[_T_Cached],
457
+ input_type: type[_T],
458
+ ) -> dict[_T, _T_Cached] | _T_Cached | None:
459
+ """Generic lookup method for both NodeId and ViewId by id or external_id."""
460
+ is_single = isinstance(identifier, input_type)
461
+ # MyPy does not understand that if is_single is True, identifier is _T, else SequenceNotStr[_T].
462
+ identifiers: list[_T] = [identifier] if is_single else list(identifier) # type: ignore[arg-type, list-item]
463
+
464
+ missing = [id_ for id_ in identifiers if id_ not in cache]
405
465
  if missing:
406
- self._fetch_and_cache(missing, by="classicExternalId")
407
- if isinstance(external_id, str):
408
- return self._node_id_by_external_id.get(external_id)
409
- return {
410
- ext_id: node_id
411
- for ext_id in external_ids
412
- if isinstance(node_id := self._node_id_by_external_id.get(ext_id), NodeId)
413
- }
466
+ self._fetch_and_cache(missing, by=property_name)
467
+
468
+ if is_single:
469
+ return cache.get(identifier) # type: ignore[arg-type]
470
+
471
+ return {id_: value for id_ in identifiers if isinstance(value := cache.get(id_), return_type)}
414
472
 
415
473
  def _fetch_and_cache(self, identifiers: Sequence[int | str], by: Literal["id", "classicExternalId"]) -> None:
416
474
  for chunk in chunker_sequence(identifiers, self._RETRIEVE_LIMIT):
@@ -433,17 +491,25 @@ class LookupAPI:
433
491
  instance_source = InstanceSource._load(item.dump())
434
492
  node_id = instance_source.as_id()
435
493
  self._node_id_by_id[instance_source.id_] = node_id
494
+ self._consumer_view_id_by_id[instance_source.id_] = instance_source.consumer_view()
436
495
  if instance_source.classic_external_id:
437
496
  self._node_id_by_external_id[instance_source.classic_external_id] = node_id
497
+ self._consumer_view_id_by_external_id[instance_source.classic_external_id] = (
498
+ instance_source.consumer_view()
499
+ )
438
500
  missing = set(chunk) - set(self._node_id_by_id.keys()) - set(self._node_id_by_external_id.keys())
439
501
  if by == "id":
440
502
  for missing_id in cast(set[int], missing):
441
503
  if missing_id not in self._node_id_by_id:
442
504
  self._node_id_by_id[missing_id] = None
505
+ if missing_id not in self._consumer_view_id_by_id:
506
+ self._consumer_view_id_by_id[missing_id] = None
443
507
  elif by == "classicExternalId":
444
508
  for missing_ext_id in cast(set[str], missing):
445
509
  if missing_ext_id not in self._node_id_by_external_id:
446
510
  self._node_id_by_external_id[missing_ext_id] = None
511
+ if missing_ext_id not in self._consumer_view_id_by_external_id:
512
+ self._consumer_view_id_by_external_id[missing_ext_id] = None
447
513
 
448
514
 
449
515
  class MigrationLookupAPI:
@@ -114,6 +114,14 @@ class InstanceSource(_InstanceSourceProperties, TypedNode):
114
114
  self.preferred_consumer_view_id = preferred_consumer_view_id
115
115
  self.ingestion_view = DirectRelationReference.load(ingestion_view) if ingestion_view else None
116
116
 
117
+ def dump(self, camel_case: bool = True) -> dict[str, Any]:
118
+ output = super().dump(camel_case)
119
+ if self.preferred_consumer_view_id:
120
+ output["properties"]["cognite_migration"]["InstanceSource/v1"]["preferredConsumerViewId"] = (
121
+ self.preferred_consumer_view_id.dump(camel_case=camel_case)
122
+ )
123
+ return output
124
+
117
125
  @classmethod
118
126
  def _load_properties(cls, resource: dict[str, Any]) -> dict[str, Any]:
119
127
  if "preferredConsumerViewId" in resource:
@@ -25,7 +25,7 @@ from cognite_toolkit._cdf_tk.exceptions import ToolkitValueError
25
25
  from cognite_toolkit._cdf_tk.storageio._base import T_Selector, T_WriteCogniteResource
26
26
  from cognite_toolkit._cdf_tk.utils import humanize_collection
27
27
  from cognite_toolkit._cdf_tk.utils.useful_types import (
28
- T_AssetCentricResource,
28
+ T_AssetCentricResourceExtended,
29
29
  )
30
30
 
31
31
 
@@ -57,7 +57,7 @@ class DataMapper(Generic[T_Selector, T_CogniteResource, T_WriteCogniteResource],
57
57
 
58
58
 
59
59
  class AssetCentricMapper(
60
- DataMapper[AssetCentricMigrationSelector, AssetCentricMapping[T_AssetCentricResource], InstanceApply]
60
+ DataMapper[AssetCentricMigrationSelector, AssetCentricMapping[T_AssetCentricResourceExtended], InstanceApply]
61
61
  ):
62
62
  def __init__(self, client: ToolkitClient) -> None:
63
63
  self.client = client
@@ -87,7 +87,7 @@ class AssetCentricMapper(
87
87
  )
88
88
 
89
89
  def map(
90
- self, source: Sequence[AssetCentricMapping[T_AssetCentricResource]]
90
+ self, source: Sequence[AssetCentricMapping[T_AssetCentricResourceExtended]]
91
91
  ) -> Sequence[tuple[InstanceApply | None, ConversionIssue]]:
92
92
  """Map a chunk of asset-centric data to InstanceApplyList format."""
93
93
  # We update the direct relation cache in bulk for all resources in the chunk.
@@ -99,7 +99,7 @@ class AssetCentricMapper(
99
99
  return output
100
100
 
101
101
  def _map_single_item(
102
- self, item: AssetCentricMapping[T_AssetCentricResource]
102
+ self, item: AssetCentricMapping[T_AssetCentricResourceExtended]
103
103
  ) -> tuple[NodeApply | EdgeApply | None, ConversionIssue]:
104
104
  mapping = item.mapping
105
105
  ingestion_view = mapping.get_ingestion_view()
@@ -235,14 +235,14 @@ class AnnotationMigrationIO(
235
235
  self,
236
236
  client: ToolkitClient,
237
237
  instance_space: str | None = None,
238
- default_asset_annotation_mapping: str = ASSET_ANNOTATIONS_ID,
239
- default_file_annotation_mapping: str = FILE_ANNOTATIONS_ID,
238
+ default_asset_annotation_mapping: str | None = None,
239
+ default_file_annotation_mapping: str | None = None,
240
240
  ) -> None:
241
241
  super().__init__(client)
242
242
  self.annotation_io = AnnotationIO(client)
243
243
  self.instance_space = instance_space
244
- self.default_asset_annotation_mapping = default_asset_annotation_mapping
245
- self.default_file_annotation_mapping = default_file_annotation_mapping
244
+ self.default_asset_annotation_mapping = default_asset_annotation_mapping or ASSET_ANNOTATIONS_ID
245
+ self.default_file_annotation_mapping = default_file_annotation_mapping or FILE_ANNOTATIONS_ID
246
246
 
247
247
  def as_id(self, item: AssetCentricMapping[Annotation]) -> str:
248
248
  return f"Annotation_{item.mapping.id}"
@@ -2,7 +2,7 @@ from collections.abc import Hashable, Iterable, Sequence
2
2
  from typing import Any
3
3
 
4
4
  from cognite.client.data_classes.agents import Agent, AgentList, AgentUpsert, AgentUpsertList
5
- from cognite.client.data_classes.capabilities import Capability
5
+ from cognite.client.data_classes.capabilities import AgentsAcl, Capability
6
6
  from cognite.client.exceptions import CogniteAPIError
7
7
  from cognite.client.utils.useful_types import SequenceNotStr
8
8
 
@@ -37,7 +37,12 @@ class AgentCRUD(ResourceCRUD[str, AgentUpsert, Agent, AgentUpsertList, AgentList
37
37
  def get_required_capability(
38
38
  cls, items: Sequence[AgentUpsert] | None, read_only: bool
39
39
  ) -> Capability | list[Capability]:
40
- return []
40
+ if not items and items is not None:
41
+ return []
42
+
43
+ actions = [AgentsAcl.Action.READ] if read_only else [AgentsAcl.Action.READ, AgentsAcl.Action.WRITE]
44
+
45
+ return AgentsAcl(actions, AgentsAcl.Scope.All())
41
46
 
42
47
  def create(self, items: AgentUpsertList) -> AgentList:
43
48
  return self.client.agents.upsert(items)
@@ -81,7 +81,6 @@ class RoboticFrameCRUD(ResourceCRUD[str, FrameWrite, Frame, FrameWriteList, Fram
81
81
  capabilities.RoboticsAcl.Action.Create,
82
82
  capabilities.RoboticsAcl.Action.Delete,
83
83
  capabilities.RoboticsAcl.Action.Update,
84
- capabilities.RoboticsAcl.Action.Delete,
85
84
  ],
86
85
  capabilities.RoboticsAcl.Scope.All(),
87
86
  )
@@ -154,7 +153,6 @@ class RoboticLocationCRUD(ResourceCRUD[str, LocationWrite, Location, LocationWri
154
153
  capabilities.RoboticsAcl.Action.Create,
155
154
  capabilities.RoboticsAcl.Action.Delete,
156
155
  capabilities.RoboticsAcl.Action.Update,
157
- capabilities.RoboticsAcl.Action.Delete,
158
156
  ]
159
157
  )
160
158
 
@@ -230,7 +228,6 @@ class RoboticsDataPostProcessingCRUD(
230
228
  capabilities.RoboticsAcl.Action.Create,
231
229
  capabilities.RoboticsAcl.Action.Delete,
232
230
  capabilities.RoboticsAcl.Action.Update,
233
- capabilities.RoboticsAcl.Action.Delete,
234
231
  ]
235
232
  )
236
233
 
@@ -325,7 +322,6 @@ class RobotCapabilityCRUD(
325
322
  capabilities.RoboticsAcl.Action.Create,
326
323
  capabilities.RoboticsAcl.Action.Delete,
327
324
  capabilities.RoboticsAcl.Action.Update,
328
- capabilities.RoboticsAcl.Action.Delete,
329
325
  ]
330
326
  )
331
327
 
@@ -423,7 +419,6 @@ class RoboticMapCRUD(ResourceCRUD[str, MapWrite, Map, MapWriteList, MapList]):
423
419
  capabilities.RoboticsAcl.Action.Create,
424
420
  capabilities.RoboticsAcl.Action.Delete,
425
421
  capabilities.RoboticsAcl.Action.Update,
426
- capabilities.RoboticsAcl.Action.Delete,
427
422
  ]
428
423
  )
429
424
 
@@ -12,7 +12,7 @@ jobs:
12
12
  environment: dev
13
13
  name: Deploy
14
14
  container:
15
- image: cognite/toolkit:0.6.106
15
+ image: cognite/toolkit:0.6.108
16
16
  env:
17
17
  CDF_CLUSTER: ${{ vars.CDF_CLUSTER }}
18
18
  CDF_PROJECT: ${{ vars.CDF_PROJECT }}
@@ -10,7 +10,7 @@ jobs:
10
10
  environment: dev
11
11
  name: Deploy Dry Run
12
12
  container:
13
- image: cognite/toolkit:0.6.106
13
+ image: cognite/toolkit:0.6.108
14
14
  env:
15
15
  CDF_CLUSTER: ${{ vars.CDF_CLUSTER }}
16
16
  CDF_PROJECT: ${{ vars.CDF_PROJECT }}
@@ -4,7 +4,7 @@ default_env = "<DEFAULT_ENV_PLACEHOLDER>"
4
4
  [modules]
5
5
  # This is the version of the modules. It should not be changed manually.
6
6
  # It will be updated by the 'cdf modules upgrade' command.
7
- version = "0.6.106"
7
+ version = "0.6.108"
8
8
 
9
9
  [alpha_flags]
10
10
  external-libraries = true
@@ -1 +1 @@
1
- __version__ = "0.6.106"
1
+ __version__ = "0.6.108"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cognite_toolkit
3
- Version: 0.6.106
3
+ Version: 0.6.108
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=0abeQr1Tfk4lkGaoXyrnFC28wDSlR_8UGrh10noGduQ,6085
3
- cognite_toolkit/_version.py,sha256=Yr4MUMyngYF8CK8gD1i_5CFjzdbc9C-zEFAB5ViLDNk,24
3
+ cognite_toolkit/_version.py,sha256=Ld9CJTmo6UAAAhfrT6vbnYlc1obPLtNQLTmXJM2ppEI,24
4
4
  cognite_toolkit/_cdf_tk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  cognite_toolkit/_cdf_tk/cdf_toml.py,sha256=VSWV9h44HusWIaKpWgjrOMrc3hDoPTTXBXlp6-NOrIM,9079
6
6
  cognite_toolkit/_cdf_tk/constants.py,sha256=Gi7iGGzdUrOnBeIK6ix3XiBieHIwzLJO5BWjDI3a6l4,7082
@@ -19,7 +19,7 @@ cognite_toolkit/_cdf_tk/apps/_dev_app.py,sha256=q8DBr4BAK33AwsHW3gAWZWSjSaQRuCis
19
19
  cognite_toolkit/_cdf_tk/apps/_download_app.py,sha256=Io7mW3DhYpLiDrqJfThSQThHDWrXN9c8huu9zYd0u7E,19408
20
20
  cognite_toolkit/_cdf_tk/apps/_dump_app.py,sha256=Ec0aEqbKwCkxni09i06rfY31qZUyOVwbbvo7MHh4cf8,39056
21
21
  cognite_toolkit/_cdf_tk/apps/_landing_app.py,sha256=HxzSln3fJXs5NzulfQGUMropXcwMobUYpyePrCrQTQs,1502
22
- cognite_toolkit/_cdf_tk/apps/_migrate_app.py,sha256=xkXo1h3eQ14D5uQ0qQdq01etS1FV_fg6ZnvxMt8H-os,30580
22
+ cognite_toolkit/_cdf_tk/apps/_migrate_app.py,sha256=JuzY1t5pkW94Dyygr-mT2lheluR7cL8AmD2MfaXhc8Y,37093
23
23
  cognite_toolkit/_cdf_tk/apps/_modules_app.py,sha256=95_H2zccRJl2mWn0oQ5mjCaEDnG63sPKOkB81IgWcIk,7637
24
24
  cognite_toolkit/_cdf_tk/apps/_profile_app.py,sha256=vSRJW54bEvIul8_4rOqyOYA7ztXx7TFOvZRZWZTxMbg,7007
25
25
  cognite_toolkit/_cdf_tk/apps/_purge.py,sha256=e8IgDK2Fib2u30l71Q2trbJ1az90zSLWr5TViTINmL0,15415
@@ -54,7 +54,7 @@ cognite_toolkit/_cdf_tk/client/api/fixed_transformations.py,sha256=m66cqbx4oCtjv
54
54
  cognite_toolkit/_cdf_tk/client/api/infield.py,sha256=yt1Y-I20aK9dFd9CB50XfinaCR09Ny7SER1H9g2c2Ck,7247
55
55
  cognite_toolkit/_cdf_tk/client/api/location_filters.py,sha256=TIbomUbpUNDxOON_a3pwBmCBdltxL1jMQBXKcIjRx44,3759
56
56
  cognite_toolkit/_cdf_tk/client/api/lookup.py,sha256=c-cvtgfGGGYyk8ROcJu44qlo1ocqbk0o1zafCql79fU,17652
57
- cognite_toolkit/_cdf_tk/client/api/migration.py,sha256=cuB42cbdRIMBWJH71tgJrxCymfDR9KVCJ6VxQmLm6n4,20378
57
+ cognite_toolkit/_cdf_tk/client/api/migration.py,sha256=jjQ-3HyBgEPWO8RB8mI1sp8ZWHrUmtaYsufuUGp_3ew,23055
58
58
  cognite_toolkit/_cdf_tk/client/api/project.py,sha256=Hj0uDCLyPofG-T4626EdeoRRtBaovhU-SMAQ7VWJ1M4,1063
59
59
  cognite_toolkit/_cdf_tk/client/api/search.py,sha256=L4cDPip7pJVP7bEgAiSOjqINIHg8AULNBtR29G5khEQ,612
60
60
  cognite_toolkit/_cdf_tk/client/api/search_config.py,sha256=31rPCSOnzfiLv8FKU6F3tF9ZesEV8moSlbnkFPNh13g,1824
@@ -88,7 +88,7 @@ cognite_toolkit/_cdf_tk/client/data_classes/infield.py,sha256=MK-iD704Xw5VbLcr-M
88
88
  cognite_toolkit/_cdf_tk/client/data_classes/instance_api.py,sha256=dCgCYqvQHiuFhe8CRb1_lYderkVHoHWki1vcf07F8tw,4929
89
89
  cognite_toolkit/_cdf_tk/client/data_classes/instances.py,sha256=aGV3XtBGwG1ELks3kqFkScO-MGC5zvcSZtYXOVWL2BE,2501
90
90
  cognite_toolkit/_cdf_tk/client/data_classes/location_filters.py,sha256=IgHU7Hto0Zz3Bk_QW17JC3vUw0yN1oaTeJ3ZPKOGFAE,12112
91
- cognite_toolkit/_cdf_tk/client/data_classes/migration.py,sha256=DSxa5anY8YAWgm94j_adLP1xGTfR8hdrYL000ZqqF84,18264
91
+ cognite_toolkit/_cdf_tk/client/data_classes/migration.py,sha256=AoYgqwSoYn1ok_ksG9Lljb270J4zPF_qyJSu5ZHtD_Q,18632
92
92
  cognite_toolkit/_cdf_tk/client/data_classes/pending_instances_ids.py,sha256=W99jhHMLzW_0TvZoaeeaeWXljN9GjuXPoFO-SRjsd-s,1888
93
93
  cognite_toolkit/_cdf_tk/client/data_classes/project.py,sha256=y0rcIZvoTf5b3LPgz9ufUU2UTkDTyzz-HmNgH6cXRNA,1226
94
94
  cognite_toolkit/_cdf_tk/client/data_classes/raw.py,sha256=CfFqUKP9_b3yg_1br6fwpkZsmGbMmbj5_D3P6HwoIvQ,14708
@@ -130,11 +130,11 @@ cognite_toolkit/_cdf_tk/commands/_migrate/command.py,sha256=jNoqqq81lbdfDTAQ5w2c
130
130
  cognite_toolkit/_cdf_tk/commands/_migrate/conversion.py,sha256=Ew9JRYrd-Ol9G9csTzpnhXAgCFnX67MwDYOTsdJLP3E,16803
131
131
  cognite_toolkit/_cdf_tk/commands/_migrate/creators.py,sha256=FTu7w3G8KyPY8pagG3KdPpOmpLcjehaAg2auEy6iM7A,9605
132
132
  cognite_toolkit/_cdf_tk/commands/_migrate/data_classes.py,sha256=_vMS_qAPj4yup1VnmmojPVigAZtyPQH7PM0Raby5tao,10619
133
- cognite_toolkit/_cdf_tk/commands/_migrate/data_mapper.py,sha256=Q1K-zuRe04AyKHm8nYp5qVxB4eeHC0poKT3Ob1pNL-c,5646
133
+ cognite_toolkit/_cdf_tk/commands/_migrate/data_mapper.py,sha256=Y7MrE6FGa15uvboBjNyWNlslsBv4FpeP5WsrFsooxsA,5678
134
134
  cognite_toolkit/_cdf_tk/commands/_migrate/data_model.py,sha256=i1eUsNX6Dueol9STIEwyksBnBsWUk13O8qHIjW964pM,7860
135
135
  cognite_toolkit/_cdf_tk/commands/_migrate/default_mappings.py,sha256=ERn3qFrJFXdtXaMjHq3Gk7MxH03MGFk3FrtWCOBJQts,5544
136
136
  cognite_toolkit/_cdf_tk/commands/_migrate/issues.py,sha256=lWSnuS3CfRDbA7i1g12gJ2reJnQcLmZWxHDK19-Wxkk,5772
137
- cognite_toolkit/_cdf_tk/commands/_migrate/migration_io.py,sha256=UtmfXMjajSM-oNu8ORNPCVnAHtZBmvT92i-ebYvuB-Q,16247
137
+ cognite_toolkit/_cdf_tk/commands/_migrate/migration_io.py,sha256=wrdBH5P6NgiZQSYLR0iJ3ZvqfQ5fY-_Ne2yKv9E1g4o,16277
138
138
  cognite_toolkit/_cdf_tk/commands/_migrate/prepare.py,sha256=RfqaNoso5CyBwc-p6ckwcYqBfZXKhdJgdGIyd0TATaI,2635
139
139
  cognite_toolkit/_cdf_tk/commands/_migrate/selectors.py,sha256=N1H_-rBpPUD6pbrlcofn1uEK1bA694EUXEe1zIXeqyo,2489
140
140
  cognite_toolkit/_cdf_tk/cruds/__init__.py,sha256=kxiB8gZo0Y4TyttWHGTLPCW5R1DUkN1uTZewTvaZRjo,6298
@@ -142,7 +142,7 @@ cognite_toolkit/_cdf_tk/cruds/_base_cruds.py,sha256=3ExMHowKi9jV-EwfKL1jfeSfQLM5
142
142
  cognite_toolkit/_cdf_tk/cruds/_data_cruds.py,sha256=PacTXdXaw0sf38tM6_DgNXVYdZXf_J90ZUeLk5v2VRg,9071
143
143
  cognite_toolkit/_cdf_tk/cruds/_worker.py,sha256=XdLm6DMFln9DqDgEbeqzepw9WRSXx7WdChbDtmOc89Q,9358
144
144
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/__init__.py,sha256=gSbQHXTgbkguEc2kFckgt13JVO5GXol_JXT2LW4T5o0,2879
145
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/agent.py,sha256=2pcpwAJQ4GPvW2jM0J-Odm7d1sTlaaoBLKEXPHHz2VQ,5091
145
+ cognite_toolkit/_cdf_tk/cruds/_resource_cruds/agent.py,sha256=yB6t-ZL6XtcneWE_njIZcVVZtcvKu9yaFsysLnsHJUc,5317
146
146
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/auth.py,sha256=iGG2_btpEqip3o6OKpcKfrh5IljOH9NbrJcGBKX0bn4,24971
147
147
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/classic.py,sha256=7RdiWvh6MLI1lLmt3gcqDQj61xbwREhsvoyjFuJn2F0,26402
148
148
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/configuration.py,sha256=KrL7bj8q5q18mGB2V-NDkW5U5nfseZOyorXiUbp2uLw,6100
@@ -159,7 +159,7 @@ cognite_toolkit/_cdf_tk/cruds/_resource_cruds/location.py,sha256=NWbL4JopbHWV-yd
159
159
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/migration.py,sha256=BPjlYYwU31DSKe0cs24hhYv4UCTHJ87mDSfmQDI_S2o,4744
160
160
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/raw.py,sha256=8Ojq7MpatpsiYRD0IzlljMFHTbNP3Iwv_OToxggNcNQ,12341
161
161
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/relationship.py,sha256=eXfMaUL7AIpvTBxTPgDn23oMLtrvNdYjrKWLGmuuzQc,6427
162
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/robotics.py,sha256=SgSFWxcNt0r5Bs-mn8Fm16RQVYMS1skOSDFkqrf1uBE,17489
162
+ cognite_toolkit/_cdf_tk/cruds/_resource_cruds/robotics.py,sha256=dG45TvMcmpwV6OyHAtkaJVEHegOxs2NBBe3a5aui9Bw,17209
163
163
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/streams.py,sha256=-vFcurvfoWZJLBXla7qmMFAtu81Nbcerx2IoizDC7EQ,3266
164
164
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/three_d_model.py,sha256=YmzIQp1cjU6ttqmwwDfU9wXFkKaW5ZuypdEu-LZsOXY,7545
165
165
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/timeseries.py,sha256=VUvg6geF8d7N6PY1kMXs6v2xbWReiSbbRhQNqlAlhUM,23518
@@ -300,13 +300,13 @@ cognite_toolkit/_repo_files/.gitignore,sha256=ip9kf9tcC5OguF4YF4JFEApnKYw0nG0vPi
300
300
  cognite_toolkit/_repo_files/AzureDevOps/.devops/README.md,sha256=OLA0D7yCX2tACpzvkA0IfkgQ4_swSd-OlJ1tYcTBpsA,240
301
301
  cognite_toolkit/_repo_files/AzureDevOps/.devops/deploy-pipeline.yml,sha256=brULcs8joAeBC_w_aoWjDDUHs3JheLMIR9ajPUK96nc,693
302
302
  cognite_toolkit/_repo_files/AzureDevOps/.devops/dry-run-pipeline.yml,sha256=OBFDhFWK1mlT4Dc6mDUE2Es834l8sAlYG50-5RxRtHk,723
303
- cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml,sha256=1jeTnCHshDXK-_BpeGjx-DcYIyJXP4JobQOsrd1YdIg,668
304
- cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml,sha256=2uWDnr4F_8dy6F2dwTwae5_pkKMF9pUB4tMeV8BsN7Y,2431
305
- cognite_toolkit/_resources/cdf.toml,sha256=C8EeKYvi8E10kX1WeG0difC8zHWuFseZo4vy6-bt1rI,488
303
+ cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml,sha256=dd1a4r1yPhWGZNiuUgz5ywOuECEdJ6n3Rd0Etma6sOU,668
304
+ cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml,sha256=be_1m-aAgnzTGWdnEHIoJcQQrAm4ghUx-h171Hjzwww,2431
305
+ cognite_toolkit/_resources/cdf.toml,sha256=HmbxZ9XLAQUSXhGmt6zXsKjO1fgeX9TAuU6DLjAsM9I,488
306
306
  cognite_toolkit/demo/__init__.py,sha256=-m1JoUiwRhNCL18eJ6t7fZOL7RPfowhCuqhYFtLgrss,72
307
307
  cognite_toolkit/demo/_base.py,sha256=6xKBUQpXZXGQ3fJ5f7nj7oT0s2n7OTAGIa17ZlKHZ5U,8052
308
- cognite_toolkit-0.6.106.dist-info/METADATA,sha256=KvtAg2Al4AexHjxlR3MsdRVkqApWm7BWVxSbuQCdYI4,4502
309
- cognite_toolkit-0.6.106.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
310
- cognite_toolkit-0.6.106.dist-info/entry_points.txt,sha256=JlR7MH1_UMogC3QOyN4-1l36VbrCX9xUdQoHGkuJ6-4,83
311
- cognite_toolkit-0.6.106.dist-info/licenses/LICENSE,sha256=CW0DRcx5tL-pCxLEN7ts2S9g2sLRAsWgHVEX4SN9_Mc,752
312
- cognite_toolkit-0.6.106.dist-info/RECORD,,
308
+ cognite_toolkit-0.6.108.dist-info/METADATA,sha256=Nne190DHpFhzrXHLX6poNNcqltn9G0uwJ4-daOK1b4s,4502
309
+ cognite_toolkit-0.6.108.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
310
+ cognite_toolkit-0.6.108.dist-info/entry_points.txt,sha256=JlR7MH1_UMogC3QOyN4-1l36VbrCX9xUdQoHGkuJ6-4,83
311
+ cognite_toolkit-0.6.108.dist-info/licenses/LICENSE,sha256=CW0DRcx5tL-pCxLEN7ts2S9g2sLRAsWgHVEX4SN9_Mc,752
312
+ cognite_toolkit-0.6.108.dist-info/RECORD,,