Skip to content

fix: Retrieving routine revision with zero valued input or empty timeseries external ID in the configuration (#2470) - #2736

Merged
haakonvt merged 3 commits into
pysdk-release-v7from
v7-fix-routine-zero-valued-input
Aug 4, 2026
Merged

fix: Retrieving routine revision with zero valued input or empty timeseries external ID in the configuration (#2470)#2736
haakonvt merged 3 commits into
pysdk-release-v7from
v7-fix-routine-zero-valued-input

Conversation

@MortGron

@MortGron MortGron commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Description

Same as #2470

Checklist:

  • Tests added/updated.
  • Documentation updated. Documentation is generated from docstrings - these must be updated according to your change.
    If a new method has been added it should be referenced in cognite.rst in order to generate docs based on its docstring.
  • The PR title follows the Conventional Commit spec.

… series external ID in the configuration (#2470)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@MortGron
MortGron requested review from a team as code owners August 2, 2026 19:01

@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 resolves an issue where falsy values (such as 0 or an empty string) in SimulatorRoutineInput were incorrectly parsed as missing, resulting in an UnknownCogniteObject. The fix ensures that value and sourceExternalId are explicitly checked for non-None status, raises a ValueError if both are provided, and adds unit tests to verify this behavior. There are no review comments, so I have no feedback to provide.

@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.05%. Comparing base (1fafd7f) to head (404c104).
⚠️ Report is 4 commits behind head on pysdk-release-v7.

Additional details and impacted files
@@                 Coverage Diff                  @@
##           pysdk-release-v7    #2736      +/-   ##
====================================================
- Coverage             91.06%   91.05%   -0.02%     
====================================================
  Files                   192      192              
  Lines                 26278    26282       +4     
====================================================
  Hits                  23931    23931              
- Misses                 2347     2351       +4     
Files with missing lines Coverage Δ
...lient/data_classes/simulators/routine_revisions.py 91.51% <100.00%> (+0.10%) ⬆️

... and 4 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 previously approved these changes Aug 4, 2026

@haakonvt haakonvt 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.

🦄

Comment thread tests/tests_unit/test_data_classes/test_simulators.py Outdated
@haakonvt haakonvt self-assigned this Aug 4, 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 Aug 4, 2026
@haakonvt

haakonvt commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@MortGron you need to pull in a few of the latest "test fixes commits" as well 😅

@MortGron

MortGron commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@MortGron you need to pull in a few of the latest "test fixes commits" as well 😅

@haakonvt fixed it now

@haakonvt haakonvt 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.

🦄

@haakonvt
haakonvt merged commit 1634437 into pysdk-release-v7 Aug 4, 2026
20 checks passed
@haakonvt
haakonvt deleted the v7-fix-routine-zero-valued-input branch August 4, 2026 21:50
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.

3 participants