Skip to content

Commit

Permalink
Fix unit conversion for self-splitting datapoints tasks (#1488)
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonvt authored Nov 9, 2023
1 parent 2b36747 commit f716981
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ Changes are grouped as follows
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [6.39.4] - 2023-11-09
## Fixed
- Fetching datapoints from dense time series using a `targetUnit` or a target `targetUnitSystem` could result
in some batches not being converted to the new unit.

## [6.39.3] - 2023-11-08
## Fixed
- The newely introduced parameter `connectionType` was assumed to be required from the API. This is not the case.
- The newely introduced parameter `connectionType` was assumed to be required from the API. This is not the case.

## [6.39.2] - 2023-11-08
## Fixed
Expand Down
4 changes: 4 additions & 0 deletions cognite/client/_api/datapoint_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,8 @@ def __init__(
self.parent = parent
self.is_raw_query = is_raw_query
self.max_query_limit = max_query_limit
self.target_unit = target_unit
self.target_unit_system = target_unit_system
self.is_done = False

self.static_kwargs = identifier.as_dict()
Expand Down Expand Up @@ -763,6 +765,8 @@ def _static_params(self) -> dict[str, Any]:
granularity=self.granularity,
max_query_limit=self.max_query_limit,
is_raw_query=self.is_raw_query,
target_unit=self.target_unit,
target_unit_system=self.target_unit_system,
)

def store_partial_result(self, res: DataPointListItem) -> list[SplittingFetchSubtask] | None:
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__ = "6.39.3"
__version__ = "6.39.4"
__api_subversion__ = "V20220125"
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 = "6.39.3"
version = "6.39.4"
description = "Cognite Python SDK"
readme = "README.md"
documentation = "https://cognite-sdk-python.readthedocs-hosted.com"
Expand Down

0 comments on commit f716981

Please sign in to comment.