From 66ad0b0b77800a1a9ec19f912a487c0bc552b660 Mon Sep 17 00:00:00 2001 From: Mithila Jayalath <86347777+mithilacognite@users.noreply.github.com> Date: Tue, 19 Sep 2023 12:43:06 +0530 Subject: [PATCH] fix: ThreeDModel does not return data_set_id (#1366) --- CHANGELOG.md | 4 ++++ cognite/client/_version.py | 2 +- cognite/client/data_classes/three_d.py | 3 +++ pyproject.toml | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3dbafab0..28193ab32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ Changes are grouped as follows - `Fixed` for any bug fixes. - `Security` in case of vulnerabilities. +## [6.25.3] - 2023-09-19 +### Added +- Support for setting and retrieving `data_set_id` in data class `client.data_classes.ThreeDModel`. + ## [6.25.2] - 2023-09-12 ### Fixed - Using the `HasData` filter would raise an API error in CDF. diff --git a/cognite/client/_version.py b/cognite/client/_version.py index cb30ab762..000e7f74b 100644 --- a/cognite/client/_version.py +++ b/cognite/client/_version.py @@ -1,5 +1,5 @@ from __future__ import annotations -__version__ = "6.25.2" +__version__ = "6.25.3" __api_subversion__ = "V20220125" diff --git a/cognite/client/data_classes/three_d.py b/cognite/client/data_classes/three_d.py index 66828a340..a03beae40 100644 --- a/cognite/client/data_classes/three_d.py +++ b/cognite/client/data_classes/three_d.py @@ -61,6 +61,7 @@ class ThreeDModel(CogniteResource): name (str | None): The name of the model. id (int | None): The ID of the model. created_time (int | None): The creation time of the resource, in milliseconds since January 1, 1970 at 00:00 UTC. + data_set_id (int | None): The id of the dataset this 3D model belongs to. metadata (dict[str, str] | None): Custom, application specific metadata. String key -> String value. Limits: Maximum length of key is 32 bytes, value 512 bytes, up to 16 key-value pairs. cognite_client (CogniteClient | None): The client to associate with this object. """ @@ -70,12 +71,14 @@ def __init__( name: str | None = None, id: int | None = None, created_time: int | None = None, + data_set_id: int | None = None, metadata: dict[str, str] | None = None, cognite_client: CogniteClient | None = None, ) -> None: self.name = name self.id = id self.created_time = created_time + self.data_set_id = data_set_id self.metadata = metadata self._cognite_client = cast("CogniteClient", cognite_client) diff --git a/pyproject.toml b/pyproject.toml index 6441a8472..fea778677 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "cognite-sdk" -version = "6.25.2" +version = "6.25.3" description = "Cognite Python SDK" readme = "README.md"