Skip to content

Commit

Permalink
build; changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
doctrino committed Dec 14, 2024
1 parent caeee0d commit 5fcfd5c
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Changes are grouped as follows
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [7.70.6] - 2024-12-14
### Fixed
- Updating a Sequence and repeating existing columns no longer raises a `CogniteDuplicatedError`.

## [7.70.5] - 2024-12-12
### Fixed
- Upserting a Sequence with columns no longer silently skips the columns, but instead updates them as intended.
Expand Down
2 changes: 1 addition & 1 deletion cognite/client/_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import annotations

__version__ = "7.70.5"
__version__ = "7.70.6"

__api_subversion__ = "20230101"
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.70.5"
version = "7.70.6"

description = "Cognite Python SDK"
readme = "README.md"
Expand Down
52 changes: 52 additions & 0 deletions tests/tests_integration/test_api/test_sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,3 +437,55 @@ def test_upsert_sequence_patch(self, cognite_client: CogniteClient) -> None:
finally:
if created:
cognite_client.sequences.delete(external_id=created.external_id, ignore_unknown_ids=True)

def test_update_sequence_patch(self, cognite_client: CogniteClient) -> None:
original_sequence = SequenceWrite(
external_id=f"update_sequence_{random_string(5)}",
columns=[
SequenceColumnWrite(
description="KW Description",
name="KW Name",
value_type="DOUBLE",
external_id="kw_seq_01",
metadata={},
),
],
description="Description of the Test Sequence",
name="Test Sequence Name",
)
update = SequenceWrite(
external_id=original_sequence.external_id,
columns=[
SequenceColumnWrite(
description="KW Description",
name="KW Name",
value_type="DOUBLE",
external_id="kw_seq_01",
metadata={},
),
SequenceColumnWrite(
description="PW Description",
name="PW Name",
value_type="DOUBLE",
external_id="pw_seq_01",
metadata={},
),
],
)

created: Sequence | None = None
try:
created = cognite_client.sequences.create(original_sequence)

updated = cognite_client.sequences.update(update)

retrieved = cognite_client.sequences.retrieve(external_id=updated.external_id)

assert retrieved is not None
TestCase().assertCountEqual(
retrieved.as_write().columns.dump(),
update.columns.dump(),
)
finally:
if created:
cognite_client.sequences.delete(external_id=created.external_id, ignore_unknown_ids=True)

0 comments on commit 5fcfd5c

Please sign in to comment.