Skip to content
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

Add workflow trigger upsert method, deprecated trigger create #1945

Merged
merged 5 commits into from
Sep 26, 2024

Conversation

VerstraeteBert
Copy link
Contributor

@VerstraeteBert VerstraeteBert commented Sep 25, 2024

Description

Added

  • Add new client.workflows.triggers.upsert, this allows upserts of triggers.

Deprecated

  • Deprecate client.workflows.triggers.create, as its functionality is covered by the new client.workflows.triggers.upsert

Replaces: #1944

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.

@VerstraeteBert VerstraeteBert requested review from a team as code owners September 25, 2024 11:56
@VerstraeteBert VerstraeteBert requested review from vincent-cognite, doctrino and haakonvt and removed request for a team September 25, 2024 11:57
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.23%. Comparing base (3abca3a) to head (e532fc5).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1945   +/-   ##
=======================================
  Coverage   90.22%   90.23%           
=======================================
  Files         135      135           
  Lines       21573    21577    +4     
=======================================
+ Hits        19465    19469    +4     
  Misses       2108     2108           
Files with missing lines Coverage Δ
cognite/client/_api/workflows.py 89.40% <100.00%> (+0.21%) ⬆️
cognite/client/_version.py 100.00% <100.00%> (ø)
cognite/client/data_classes/__init__.py 100.00% <ø> (ø)
cognite/client/data_classes/workflows.py 94.95% <100.00%> (+<0.01%) ⬆️

... and 5 files with indirect coverage changes

Comment on lines +108 to +110
"""`[DEPRECATED] Create or update a trigger for a workflow. <https://api-docs.cognite.com/20230101/tag/Workflow-triggers/operation/CreateOrUpdateTriggers>`_

This method is deprecated, use '.upsert' instead. It will be completely removed October 2024.
Copy link
Contributor

Choose a reason for hiding this comment

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

Check out DatapointsAPI.retrieve_dataframe_in_tz for a deprecation warning that stands out

@VerstraeteBert VerstraeteBert merged commit ef4e034 into master Sep 26, 2024
14 checks passed
@VerstraeteBert VerstraeteBert deleted the workflow-upsert-2 branch September 26, 2024 08:32
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