Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change of double type is handled. #1916

Merged
merged 6 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ Changes are grouped as follows
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [7.58.7] - 2024-09-06
### Changed
- [Feature Preview - alpha] Updated the `Core Model` and added `ExtractorExtension` model handling of the reserved
property names `type` and `version` (`cognite.client.data_classed.data_modeling.cdm` and
`cognite.client.data_classed.data_modeling.extractor_extension`). Now, these properties are prefixed with
the original view external id instead of suffixed with underscore. For example, `CogniteAsset` now has
`asset_type` instead of `type_` attribute. This is to avoid confusion with the node type, which is
the `type` attribute.

## [7.58.6] - 2024-09-05
### Fixed
- Data modeling convenience filter `SpaceFilter` now allows listing of global nodes by using `equals`
Expand Down
2 changes: 1 addition & 1 deletion cognite/client/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations

__version__ = "7.58.6"
__version__ = "7.58.7"
__api_subversion__ = "20230101"
168 changes: 84 additions & 84 deletions cognite/client/data_classes/data_modeling/cdm/v1.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class CogniteExtractorTimeSeriesApply(
space (str): The space where the node is located.
external_id (str): The external id of the Cognite extractor time series.
is_step (bool): Defines whether the time series is a step series or not.
type_ (Literal["numeric", "string"]): Defines data type of the data points.
time_series_type (Literal["numeric", "string"]): Defines data type of the data points.
name (str | None): Name of the instance
description (str | None): Description of the instance
tags (list[str] | None): Text based labels for generic use, limited to 1000
Expand All @@ -356,7 +356,7 @@ def __init__(
external_id: str,
*,
is_step: bool,
type_: Literal["numeric", "string"],
time_series_type: Literal["numeric", "string"],
name: str | None = None,
description: str | None = None,
tags: list[str] | None = None,
Expand Down Expand Up @@ -392,7 +392,7 @@ def __init__(
source_created_user=source_created_user,
source_updated_user=source_updated_user,
is_step=is_step,
type_=type_,
time_series_type=time_series_type,
source_unit=source_unit,
unit=unit,
assets=assets,
Expand All @@ -417,7 +417,7 @@ class CogniteExtractorTimeSeries(_CogniteExtractorTimeSeriesProperties, CogniteT
last_updated_time (int): The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
created_time (int): The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
is_step (bool): Defines whether the time series is a step series or not.
type_ (Literal["numeric", "string"]): Defines data type of the data points.
time_series_type (Literal["numeric", "string"]): Defines data type of the data points.
name (str | None): Name of the instance
description (str | None): Description of the instance
tags (list[str] | None): Text based labels for generic use, limited to 1000
Expand Down Expand Up @@ -447,7 +447,7 @@ def __init__(
created_time: int,
*,
is_step: bool,
type_: Literal["numeric", "string"],
time_series_type: Literal["numeric", "string"],
name: str | None = None,
description: str | None = None,
tags: list[str] | None = None,
Expand Down Expand Up @@ -486,7 +486,7 @@ def __init__(
source_created_user=source_created_user,
source_updated_user=source_updated_user,
is_step=is_step,
type_=type_,
time_series_type=time_series_type,
source_unit=source_unit,
unit=unit,
assets=assets,
Expand All @@ -511,7 +511,7 @@ def as_write(self) -> CogniteExtractorTimeSeriesApply:
self.space,
self.external_id,
is_step=self.is_step,
type_=self.type_,
time_series_type=self.time_series_type,
name=self.name,
description=self.description,
tags=self.tags,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "cognite-sdk"

version = "7.58.6"
version = "7.58.7"
description = "Cognite Python SDK"
readme = "README.md"
documentation = "https://cognite-sdk-python.readthedocs-hosted.com"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def core_model_v1_node_test_cases() -> Iterable[ParameterSet]:
cdm.CogniteTimeSeriesApply(
space=DATA_SPACE,
external_id="test_time_series_base",
type_="numeric",
time_series_type="numeric",
is_step=False,
name="Test time series base",
description="Test time series base for core model v1 tests with Python SDK",
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_integration/test_api/test_time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def test_create_retrieve_update_delete_with_instance_id(
my_ts = CogniteTimeSeriesApply(
space=alpha_test_space.space,
external_id="ts_python_sdk_instance_id_tests",
type_="numeric",
time_series_type="numeric",
is_step=False,
source_unit="pressure:psi",
name="Create Retrieve Delete with instance_id",
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_unit/test_data_classes/test_cdm/test_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_dump(self) -> None:
"my_model",
name="The model",
description="A model",
type_="PointCloud",
model_type="PointCloud",
aliases=["alias1", "alias2"],
tags=["tag1", "tag2"],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def cognite_asset_kwargs() -> dict[str, Any]:
space="my-space",
external_id="my-xid",
type=DirectRelationReference("should-be", "at-root"),
type_=DirectRelationReference("should-be", "in-properties"),
asset_type=DirectRelationReference("should-be", "in-properties"),
source_created_time=datetime(2020, 1, 1),
)

Expand Down
Loading