Skip to content

fix(simulators): Consistency for filtering #2148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

lpereiracgn
Copy link
Contributor

@lpereiracgn lpereiracgn commented Apr 15, 2025

Description

Some of our API listing methods currently require an import to perform filtering, while others allow users to pass arguments directly without additional imports. To improve the user experience, we are standardizing on the latter approach across all instances.

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.
  • Changelog updated in CHANGELOG.md.
  • Version bumped. If triggering a new release is desired, bump the version number in _version.py and pyproject.toml per semantic versioning.

@lpereiracgn lpereiracgn marked this pull request as ready for review April 15, 2025 12:16
@lpereiracgn lpereiracgn requested review from a team as code owners April 15, 2025 12:16
Copy link

codecov bot commented Apr 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.63%. Comparing base (a439d2c) to head (61fb99d).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2148      +/-   ##
==========================================
- Coverage   90.64%   90.63%   -0.01%     
==========================================
  Files         159      159              
  Lines       24039    24046       +7     
==========================================
+ Hits        21789    21794       +5     
- Misses       2250     2252       +2     
Files with missing lines Coverage Δ
cognite/client/_api/simulators/integrations.py 96.77% <100.00%> (+0.10%) ⬆️
cognite/client/_api/simulators/models.py 98.33% <100.00%> (+0.02%) ⬆️
cognite/client/_api/simulators/models_revisions.py 98.00% <100.00%> (+0.08%) ⬆️
cognite/client/data_classes/simulators/filters.py 98.14% <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.

@polomani polomani added waiting-for-risk-review Waiting for a member of the risk review team to take an action and removed waiting-for-risk-review Waiting for a member of the risk review team to take an action labels May 23, 2025
@polomani polomani requested a review from doctrino May 23, 2025 09:12
@polomani
Copy link
Contributor

@doctrino @erlendvollset if any of you could have a look?

Comment on lines +51 to +52
self.created_time: TimestampRange | None = None
self.last_updated_time: TimestampRange | None = None
Copy link
Contributor

@polomani polomani May 23, 2025

Choose a reason for hiding this comment

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

Suggested change
self.created_time: TimestampRange | None = None
self.last_updated_time: TimestampRange | None = None
self.created_time = created_time
self.last_updated_time = last_updated_time

Copy link
Contributor

@polomani polomani left a comment

Choose a reason for hiding this comment

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

found a bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants