Skip to content

Commit

Permalink
changelog and migration guide entries
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonvt committed Oct 31, 2023
1 parent e4cfd04 commit 2c3067c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ methods are `json` and `yaml` serializable.
- `CogniteResource.to_pandas` and `CogniteResourceList.to_pandas` now converts known timestamps to `datetime` by
default. Can be turned off with the new parameter `convert_timestamps`. Note: To comply with older pandas v1, the
dtype will always be `datetime64[ns]`, although in v2 this could have been `datetime64[ms]`.
- `CogniteImportError` can now be caught as `ImportError`.

### Deprecated
- The Templates API (migrate to Data Modeling).
Expand All @@ -38,6 +39,10 @@ with no easy way to add a prefix. Also, it no longer expands metadata by default
- Additionally, `Asset.to_pandas`, now accepts the parameters `expand_aggregates` and `aggregates_prefix`. Since
the possible `aggregates` keys are known, `camel_case` will also apply to these (if expanded) as opposed to
the metadata keys.
- More narrow exception types like `CogniteNotFoundError` and `CogniteDuplicatedError` are now raised instead of
`CogniteAPIError` for the following methods: `DatapointsAPI.retrieve_latest`, `RawRowsAPI.list`,
`RelationshipsAPI.list`, `SequencesDataAPI.retrieve`, `SyntheticDatapointsAPI.query`. Additionally, all calls
using `partitions` to API methods like `list` (or the generator version) now do the same.
- The `CogniteResource._load` has been made public, i.e., it is now `CogniteResource.load`.
- The `CogniteResourceList._load` has been made public, i.e., it is now `CogniteResourceList.load`.
- All `.delete` and `.retrieve_multiple` methods now accepts an empty sequence, and will return an empty `CogniteResourceList`.
Expand Down
7 changes: 7 additions & 0 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ Changes are grouped as follows:
### Changed
- All `assert`s meant for the SDK user, now raise appropriate errors instead (`ValueError`, `RuntimeError`...).
- `CogniteAssetHierarchyError` is no longer possible to catch as an `AssertionError`.
- More narrow exception types like `CogniteNotFoundError` and `CogniteDuplicatedError` are now raised instead of
`CogniteAPIError` for the following methods: `DatapointsAPI.retrieve_latest`, `RawRowsAPI.list`,
`RelationshipsAPI.list`, `SequencesDataAPI.retrieve`, `SyntheticDatapointsAPI.query`. Additionally, all calls
using `partitions` to API methods like `list` (or the generator version) now do the same.
- Several methods in the data modelling APIs have had parameter names now correctly reflect whether they accept
a single or multiple items (i.e. id -> ids).
- Loading `ObjectDetection` attributes `.attributes`, `.bounding_box`, `.polygon` and
Expand Down Expand Up @@ -83,6 +87,9 @@ Changes are grouped as follows:
- The attribute `columns` in `Sequence` has been changed from `SequenceType[dict]` to `SequnceColumnList`.
-The class `SequenceRows` in `client.data_classes.transformations.common` has been renamed to `SequenceRowsDestination`.

### Optional
- `CogniteImportError` can now be caught as `ImportError`.

## From v5 to v6
### Removed
- Removed support for legacy auth (API keys, service accounts, client.login.status()). Use OIDC to authenticate instead and use `client.iam.token.inspect()` instead of `login.status()`.
Expand Down

0 comments on commit 2c3067c

Please sign in to comment.