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

Quality of Life on client.extraction_pipelines.runs.list #1322

Merged
merged 18 commits into from
Nov 29, 2023

Conversation

doctrino
Copy link
Contributor

@doctrino doctrino commented Aug 20, 2023

Description

A small QoL improvement to the client.extraction_pipelines.runs.list method.

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.

@doctrino doctrino requested review from a team as code owners August 20, 2023 15:47
@codecov
Copy link

codecov bot commented Aug 20, 2023

Codecov Report

Merging #1322 (359ae99) into master (6354682) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1322      +/-   ##
==========================================
+ Coverage   91.78%   91.83%   +0.04%     
==========================================
  Files         120      120              
  Lines       15579    15584       +5     
==========================================
+ Hits        14299    14311      +12     
+ Misses       1280     1273       -7     
Files Coverage Δ
cognite/client/_api/extractionpipelines.py 92.59% <100.00%> (+3.11%) ⬆️
cognite/client/_version.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@haakonvt
Copy link
Contributor

I see test_full failed on windows... due to bad use of RNG in test data (written by me 😉 ), so I decided to fix that once and for all: #1323

@doctrino doctrino requested a review from haakonvt October 3, 2023 12:28
@doctrino doctrino changed the title Add extraction pipeline search endpoint Quality of Life on client.extraction_pipelines.runs.list Oct 3, 2023
cognite/client/_api/extractionpipelines.py Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
cognite/client/_api/extractionpipelines.py Outdated Show resolved Hide resolved
cognite/client/_api/extractionpipelines.py Outdated Show resolved Hide resolved
@@ -33,6 +36,28 @@ def new_extpipe(cognite_client):
assert cognite_client.extraction_pipelines.retrieve(extpipe.id) is None


@pytest.fixture
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add some broader scoping here to avoid re-running for each test using it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is only used once, and due to the scope of new_extpipe, this cannot be made broader without rewriting all the tests below.

@doctrino doctrino requested a review from haakonvt November 29, 2023 07:03
Copy link
Contributor

@haakonvt haakonvt left a comment

Choose a reason for hiding this comment

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

Lgtm, 2 comment-related comments

cognite/client/_api/extractionpipelines.py Outdated Show resolved Hide resolved
cognite/client/_api/extractionpipelines.py Outdated Show resolved Hide resolved
Comment on lines +55 to +58
created = []
for run in runs:
new_run = cognite_client.extraction_pipelines.runs.create(run)
created.append(new_run)
Copy link
Contributor

Choose a reason for hiding this comment

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

🏌️-opportunity

@doctrino doctrino merged commit b0bdb05 into master Nov 29, 2023
8 checks passed
@doctrino doctrino deleted the add-extraction-pipeline-search branch November 29, 2023 11:02
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.

2 participants