-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CDF-22879] Update extraction pipeline with NotificationConfig (#1978)
- Loading branch information
Showing
5 changed files
with
58 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from __future__ import annotations | ||
|
||
__version__ = "7.63.4" | ||
__version__ = "7.63.5" | ||
__api_subversion__ = "20230101" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,29 @@ | |
import pytest | ||
|
||
from cognite.client import CogniteClient | ||
from cognite.client.data_classes import ExtractionPipeline, ExtractionPipelineRun, ExtractionPipelineUpdate | ||
from cognite.client.data_classes.extractionpipelines import ExtractionPipelineContact, ExtractionPipelineRunList | ||
from cognite.client.data_classes import ( | ||
ExtractionPipeline, | ||
ExtractionPipelineRun, | ||
ExtractionPipelineUpdate, | ||
ExtractionPipelineWrite, | ||
) | ||
from cognite.client.data_classes.extractionpipelines import ( | ||
ExtractionPipelineContact, | ||
ExtractionPipelineNotificationConfiguration, | ||
ExtractionPipelineRunList, | ||
) | ||
from cognite.client.exceptions import CogniteNotFoundError | ||
from cognite.client.utils import datetime_to_ms | ||
from cognite.client.utils._text import random_string | ||
from cognite.client.utils._time import DayAligner | ||
|
||
|
||
@pytest.fixture(scope="function") | ||
def new_extpipe(cognite_client: CogniteClient): | ||
def new_extpipe(cognite_client: CogniteClient) -> ExtractionPipeline: | ||
testid = random_string(50) | ||
dataset = cognite_client.data_sets.list()[0] | ||
extpipe = cognite_client.extraction_pipelines.create( | ||
ExtractionPipeline( | ||
ExtractionPipelineWrite( | ||
external_id=f"testid-{testid}", | ||
name=f"Test extpipe {testid}", | ||
data_set_id=dataset.id, | ||
|
@@ -26,6 +35,7 @@ def new_extpipe(cognite_client: CogniteClient): | |
name="John Doe", email="[email protected]", role="owner", send_notification=False | ||
) | ||
], | ||
notification_config=ExtractionPipelineNotificationConfiguration(allowed_not_seen_range_in_minutes=10), | ||
schedule="Continuous", | ||
) | ||
) | ||
|