Skip to content

feat(Data Modeling, Time Series): Extend Data Modeling with Time Series /retrieve + /list (DM-3843)#2672

Merged
haakonvt merged 5 commits into
masterfrom
add-dm-ts
Jun 9, 2026
Merged

feat(Data Modeling, Time Series): Extend Data Modeling with Time Series /retrieve + /list (DM-3843)#2672
haakonvt merged 5 commits into
masterfrom
add-dm-ts

Conversation

@haakonvt

@haakonvt haakonvt commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Makes it much easier to work with time series created through data modeling by adding a separate API class for it (following in the footsteps of "DM Files" #2665.

@haakonvt haakonvt requested review from a team as code owners June 8, 2026 06:57

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the DataModelingTimeSeriesAPI (and its sync counterpart) to support retrieving and listing time series nodes. It also refactors the source resolution logic from the files API into a shared utility module _data_modeling.py. Feedback on the changes suggests avoiding bare dict in type hints for the sort parameter in both async and sync list methods to adhere to strong typing principles, and removing a redundant top-level import of AsyncCogniteClient in the sync time series API file to prevent potential circular imports.

Comment thread cognite/client/_api/data_modeling/time_series.py
Comment thread cognite/client/_sync_api/data_modeling/time_series.py
Comment thread cognite/client/_sync_api/data_modeling/time_series.py
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.86364% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.63%. Comparing base (f95510f) to head (32aeb7e).
⚠️ Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
cognite/client/_api/data_modeling/time_series.py 97.22% 1 Missing ⚠️
cognite/client/utils/_data_modeling.py 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2672      +/-   ##
==========================================
+ Coverage   93.62%   93.63%   +0.01%     
==========================================
  Files         493      498       +5     
  Lines       50100    50245     +145     
==========================================
+ Hits        46905    47046     +141     
- Misses       3195     3199       +4     
Files with missing lines Coverage Δ
cognite/client/_api/data_modeling/__init__.py 100.00% <100.00%> (ø)
cognite/client/_api/data_modeling/files.py 97.91% <100.00%> (-0.27%) ⬇️
cognite/client/_cognite_client.py 95.76% <100.00%> (+0.03%) ⬆️
cognite/client/_sync_api/data_modeling/__init__.py 100.00% <100.00%> (ø)
cognite/client/_sync_api/data_modeling/files.py 95.23% <ø> (ø)
...nite/client/_sync_api/data_modeling/time_series.py 100.00% <100.00%> (ø)
cognite/client/testing.py 100.00% <100.00%> (ø)
...on/test_api/test_data_modeling/test_time_series.py 100.00% <100.00%> (ø)
...sts_unit/test_api/test_data_modeling/test_files.py 99.34% <100.00%> (-0.05%) ⬇️
tests/tests_unit/test_docstring_examples.py 100.00% <100.00%> (ø)
... and 3 more

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@haakonvt

haakonvt commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

🦄

@haakonvt haakonvt self-assigned this Jun 8, 2026
@haakonvt haakonvt added risk-review-ongoing Risk review is in progress waiting-for-team Waiting for the submitter or reviewer of the PR to take an action labels Jun 8, 2026
@haakonvt haakonvt added this pull request to the merge queue Jun 8, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 8, 2026
@haakonvt haakonvt added this pull request to the merge queue Jun 9, 2026
Merged via the queue into master with commit d8e8d83 Jun 9, 2026
35 of 36 checks passed
@haakonvt haakonvt deleted the add-dm-ts branch June 9, 2026 09:00
@haakonvt haakonvt changed the title feat(Data Modeling, Time Series): Extend Data Modeling with Time Series /retrieve + /list (DM-3842) feat(Data Modeling, Time Series): Extend Data Modeling with Time Series /retrieve + /list (DM-3843) Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk-review-ongoing Risk review is in progress waiting-for-team Waiting for the submitter or reviewer of the PR to take an action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants