Skip to content

Commit 99e2ac8

Browse files
feldera-botryzhyk
authored andcommitted
[ci] apply automatic fixes
Signed-off-by: feldera-bot <feldera-bot@feldera.com>
1 parent b559583 commit 99e2ac8

File tree

6 files changed

+28
-9
lines changed

6 files changed

+28
-9
lines changed

python/feldera/_callback_runner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ def run(self):
3939
:meta private:
4040
"""
4141

42-
pipeline = self.client.get_pipeline(self.pipeline_name, PipelineFieldSelector.ALL)
42+
pipeline = self.client.get_pipeline(
43+
self.pipeline_name, PipelineFieldSelector.ALL
44+
)
4345

4446
schemas = pipeline.tables + pipeline.views
4547
for schema in schemas:

python/feldera/enums.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from enum import Enum
22
from typing import Optional
33

4+
45
class CompilationProfile(Enum):
56
"""
67
The compilation profile to use when compiling the program.
@@ -336,9 +337,10 @@ def from_str(value):
336337
f"Unknown value '{value}' for enum {FaultToleranceModel.__name__}"
337338
)
338339

340+
339341
class PipelineFieldSelector(Enum):
340342
ALL = "all"
341343
"""Select all fields of a pipeline."""
342344

343345
STATUS = "status"
344-
"""Select only the fields required to know the status of a pipeline."""
346+
"""Select only the fields required to know the status of a pipeline."""

python/feldera/pipeline_builder.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ def create(self) -> Pipeline:
6060
raise ValueError("Name and SQL are required to create a pipeline")
6161

6262
try:
63-
if self.client.get_pipeline(self.name, PipelineFieldSelector.STATUS) is not None:
63+
if (
64+
self.client.get_pipeline(self.name, PipelineFieldSelector.STATUS)
65+
is not None
66+
):
6467
raise RuntimeError(f"Pipeline with name {self.name} already exists")
6568
except FelderaAPIError as err:
6669
if err.error_code != "UnknownPipelineName":

python/feldera/rest/feldera_client.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,19 @@ def localhost(port: int = 8080) -> "FelderaClient":
9494

9595
return FelderaClient(f"http://127.0.0.1:{port}")
9696

97-
def get_pipeline(self, pipeline_name: str, field_selector: PipelineFieldSelector) -> Pipeline:
97+
def get_pipeline(
98+
self, pipeline_name: str, field_selector: PipelineFieldSelector
99+
) -> Pipeline:
98100
"""
99101
Get a pipeline by name
100102
101103
:param pipeline_name: The name of the pipeline
102104
:param field_selector: Choose what pipeline information to refresh; see PipelineFieldSelector enum definition.
103105
"""
104106

105-
resp = self.http.get(f"/pipelines/{pipeline_name}?selector={field_selector.value}")
107+
resp = self.http.get(
108+
f"/pipelines/{pipeline_name}?selector={field_selector.value}"
109+
)
106110

107111
return Pipeline.from_dict(resp)
108112

@@ -506,7 +510,9 @@ def stop_pipeline(
506510
start = time.monotonic()
507511

508512
while time.monotonic() - start < timeout_s:
509-
status = self.get_pipeline(pipeline_name, PipelineFieldSelector.STATUS).deployment_status
513+
status = self.get_pipeline(
514+
pipeline_name, PipelineFieldSelector.STATUS
515+
).deployment_status
510516

511517
if status == "Stopped":
512518
return
@@ -540,7 +546,9 @@ def clear_storage(self, pipeline_name: str, timeout_s: Optional[float] = 300):
540546
start = time.monotonic()
541547

542548
while time.monotonic() - start < timeout_s:
543-
status = self.get_pipeline(pipeline_name, PipelineFieldSelector.STATUS).storage_status
549+
status = self.get_pipeline(
550+
pipeline_name, PipelineFieldSelector.STATUS
551+
).storage_status
544552

545553
if status == "Cleared":
546554
return

python/tests/platform/test_pipeline_lifecycle.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,9 @@ def test_pipeline_clear(pipeline_name):
319319
assert first.status_code == HTTPStatus.ACCEPTED
320320
second = clear_pipeline(pipeline_name, wait=True)
321321
assert second.status_code == HTTPStatus.ACCEPTED
322-
assert get_pipeline(pipeline_name, "status").json().get("storage_status") == "Cleared"
322+
assert (
323+
get_pipeline(pipeline_name, "status").json().get("storage_status") == "Cleared"
324+
)
323325

324326

325327
@gen_pipeline_name

python/tests/platform/test_shared_pipeline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,9 @@ def test_pipeline_resource_config(self):
586586
resources = Resources(config)
587587
self.pipeline.set_runtime_config(RuntimeConfig(resources=resources))
588588
self.pipeline.start()
589-
got = TEST_CLIENT.get_pipeline(self.pipeline.name, PipelineFieldSelector.ALL).runtime_config["resources"]
589+
got = TEST_CLIENT.get_pipeline(
590+
self.pipeline.name, PipelineFieldSelector.ALL
591+
).runtime_config["resources"]
590592
assert got == config
591593

592594
def test_support_bundle(self):

0 commit comments

Comments
 (0)