cognite-toolkit 0.7.68__py3-none-any.whl → 0.7.69__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.
@@ -486,6 +486,10 @@ class FunctionScheduleCRUD(ResourceCRUD[FunctionScheduleID, FunctionScheduleWrit
486
486
  raise ToolkitRequiredValueError("FunctionSchedule must have functionExternalId and Name set.")
487
487
  return FunctionScheduleID(item.function_external_id, item.name)
488
488
 
489
+ @classmethod
490
+ def as_str(cls, id: FunctionScheduleID) -> str:
491
+ return sanitize_filename(f"{id.function_external_id}-{id.name}")
492
+
489
493
  @classmethod
490
494
  def get_dependent_items(cls, item: dict) -> Iterable[tuple[type[ResourceCRUD], Hashable]]:
491
495
  if "functionExternalId" in item:
@@ -624,10 +628,17 @@ class FunctionScheduleCRUD(ResourceCRUD[FunctionScheduleID, FunctionScheduleWrit
624
628
  if parent_ids is None:
625
629
  yield from self.client.functions.schedules
626
630
  else:
627
- for parent_id in parent_ids:
628
- if not isinstance(parent_id, str):
629
- continue
630
- yield from self.client.functions.schedules(function_external_id=parent_id)
631
+ external_ids = [external_id for external_id in parent_ids if isinstance(external_id, str)]
632
+ if not external_ids:
633
+ return
634
+ internal_ids = self.client.lookup.functions.id(external_ids)
635
+ for func_id in internal_ids:
636
+ funct_external_id = self.client.lookup.functions.external_id(func_id)
637
+ for schedule in self.client.functions.schedules(function_id=func_id):
638
+ # FunctionExternalId is not set in the schedule object returned from the API,
639
+ # so we need to set it here.
640
+ schedule.function_external_id = funct_external_id
641
+ yield schedule
631
642
 
632
643
  def sensitive_strings(self, item: FunctionScheduleWrite) -> Iterable[str]:
633
644
  id_ = self.get_id(item)
@@ -12,7 +12,7 @@ jobs:
12
12
  environment: dev
13
13
  name: Deploy
14
14
  container:
15
- image: cognite/toolkit:0.7.68
15
+ image: cognite/toolkit:0.7.69
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.7.68
13
+ image: cognite/toolkit:0.7.69
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.7.68"
7
+ version = "0.7.69"
8
8
 
9
9
 
10
10
  [plugins]
@@ -1 +1 @@
1
- __version__ = "0.7.68"
1
+ __version__ = "0.7.69"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cognite_toolkit
3
- Version: 0.7.68
3
+ Version: 0.7.69
4
4
  Summary: Official Cognite Data Fusion tool for project templates and configuration deployment
5
5
  Author: Cognite AS
6
6
  Author-email: Cognite AS <support@cognite.com>
@@ -274,7 +274,7 @@ cognite_toolkit/_cdf_tk/cruds/_resource_cruds/datamodel.py,sha256=Deyx0iAxiGmw3j
274
274
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/extraction_pipeline.py,sha256=yzRGAp1h7G0LN1ix81ZXpq-QZw0qHAjlW8aNaI0ehT8,17712
275
275
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/fieldops.py,sha256=WEFfSnkzKSUrDamAEDxzJvrJlmK1nnu6Mc_2feqic4Q,21007
276
276
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/file.py,sha256=LvlukwvRIQm8cX-YWfTGVjO74ZnPMDGv3m5Cd7pfgx8,14977
277
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/function.py,sha256=HwKu-RtBOIkKB32EcrjsMBoLYDXqNnoelb_VzCRDQ70,28977
277
+ cognite_toolkit/_cdf_tk/cruds/_resource_cruds/function.py,sha256=OSJlIiqyBqbSiEf4w7EGflMAk9Yvc96J3VFkYZlk3zw,29605
278
278
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/group_scoped.py,sha256=WEg8-CxMP64WfE_XXIlH114zM51K0uLaYa4atd992zI,1690
279
279
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/hosted_extractors.py,sha256=pRyClYj2-NwDJOr7jo2-yaduLirf1Uts_IrLKb5-nR0,17764
280
280
  cognite_toolkit/_cdf_tk/cruds/_resource_cruds/industrial_tool.py,sha256=iZJGzo02cVjs_9zcVobe84mkBe5HcTzFEZU7HAA1RZ0,7867
@@ -432,13 +432,13 @@ cognite_toolkit/_repo_files/.gitignore,sha256=ip9kf9tcC5OguF4YF4JFEApnKYw0nG0vPi
432
432
  cognite_toolkit/_repo_files/AzureDevOps/.devops/README.md,sha256=OLA0D7yCX2tACpzvkA0IfkgQ4_swSd-OlJ1tYcTBpsA,240
433
433
  cognite_toolkit/_repo_files/AzureDevOps/.devops/deploy-pipeline.yml,sha256=brULcs8joAeBC_w_aoWjDDUHs3JheLMIR9ajPUK96nc,693
434
434
  cognite_toolkit/_repo_files/AzureDevOps/.devops/dry-run-pipeline.yml,sha256=OBFDhFWK1mlT4Dc6mDUE2Es834l8sAlYG50-5RxRtHk,723
435
- cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml,sha256=Iwq43lowmWSYOF2Go1ve0GZLw6IauZRKh_ZQkcpimQ0,667
436
- cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml,sha256=cOOyMF6XnD2ejFfMgBsW-cwCow4uzfUhnbR_vHOlUKc,2430
437
- cognite_toolkit/_resources/cdf.toml,sha256=Ichf1svtm1IvjxRIrKaJZSxcGsMXiLg_fj9RjM3i7MQ,475
438
- cognite_toolkit/_version.py,sha256=_6QHdVtUxX6ebdvBnyY3uH22dCrqQAiBIRPdDfFUz0A,23
435
+ cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml,sha256=rO8Ceht4Jh2rnupys9_8R0sP_cRFCVXZgsFsOIidKM4,667
436
+ cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml,sha256=VVDswRUPjGB1Tuos7wIrosCGWxGwL00qeezxPOktqjs,2430
437
+ cognite_toolkit/_resources/cdf.toml,sha256=OD9OU4ttadY_fbsrIl4Sg--gdyQ2lsIqSRLjaTmu5ug,475
438
+ cognite_toolkit/_version.py,sha256=-EyWXhaEWFqS003guf7ZKVXSVStQfXgzDiYaRM2QH-8,23
439
439
  cognite_toolkit/demo/__init__.py,sha256=-m1JoUiwRhNCL18eJ6t7fZOL7RPfowhCuqhYFtLgrss,72
440
440
  cognite_toolkit/demo/_base.py,sha256=6xKBUQpXZXGQ3fJ5f7nj7oT0s2n7OTAGIa17ZlKHZ5U,8052
441
- cognite_toolkit-0.7.68.dist-info/WHEEL,sha256=fAguSjoiATBe7TNBkJwOjyL1Tt4wwiaQGtNtjRPNMQA,80
442
- cognite_toolkit-0.7.68.dist-info/entry_points.txt,sha256=EtZ17K2mUjh-AY0QNU1CPIB_aDSSOdmtNI_4Fj967mA,84
443
- cognite_toolkit-0.7.68.dist-info/METADATA,sha256=0cyiw6FtLVnRRN7FU7Bh0dIQ02aDbexz5LVwAGnnnGI,5026
444
- cognite_toolkit-0.7.68.dist-info/RECORD,,
441
+ cognite_toolkit-0.7.69.dist-info/WHEEL,sha256=fAguSjoiATBe7TNBkJwOjyL1Tt4wwiaQGtNtjRPNMQA,80
442
+ cognite_toolkit-0.7.69.dist-info/entry_points.txt,sha256=EtZ17K2mUjh-AY0QNU1CPIB_aDSSOdmtNI_4Fj967mA,84
443
+ cognite_toolkit-0.7.69.dist-info/METADATA,sha256=-jEe0RFWeQnRji14r7pzcEz2oCZ0l_IgEfcv2xjdA4I,5026
444
+ cognite_toolkit-0.7.69.dist-info/RECORD,,