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

chore: fix typo - worklow -> workflow #408

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# © Copyright 2022-2023 Zapata Computing Inc.
# © Copyright 2022-2024 Zapata Computing Inc.
################################################################################
"""Repositories that encapsulate data access used by dorq commands.

Expand Down Expand Up @@ -94,7 +94,7 @@ def list_wf_run_summaries(
max_age: t.Optional[str] = None,
state: t.Optional[t.Union[State, t.List[State]]] = None,
) -> t.List[WorkflowRunSummary]:
"""Asks the runtime for sumaries of all workflow runs that match the filters.
"""Asks the runtime for summaries of all workflow runs that match the filters.

Args:
config: the configuration specifying the runtime to be interrogated.
Expand Down Expand Up @@ -653,9 +653,11 @@ def wf_list_summary(self, wf_runs: t.List[WorkflowRunSummary]) -> ui_models.WFLi
A WFList containing summary lines for the specified workflows.
"""
wf_runs.sort(
key=lambda wf_run: wf_run.status.start_time
if wf_run.status.start_time
else from_unix_time(0)
key=lambda wf_run: (
wf_run.status.start_time
if wf_run.status.start_time
else from_unix_time(0)
)
)

return ui_models.WFList(wf_rows=[_ui_model_from_wf(wf) for wf in wf_runs])
Expand Down Expand Up @@ -812,7 +814,7 @@ def get_module_from_spec(self, module_spec: str):
module_name=dotted_name, sys_path=sys.path
)

def get_worklow_names(self, module: ModuleType) -> t.Sequence[str]:
def get_workflow_names(self, module: ModuleType) -> t.Sequence[str]:
"""Get the names of all workflows defined in a module.

Args:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# © Copyright 2023 Zapata Computing Inc.
# © Copyright 2023 - 2024 Zapata Computing Inc.
################################################################################
"""Code for 'orq workflow submit'."""
import typing as t
Expand Down Expand Up @@ -97,7 +97,7 @@ def _on_cmd_call_with_exceptions(
else:
# Get all workflow def names in the module
try:
wf_names = self._wf_def_repo.get_worklow_names(resolved_module)
wf_names = self._wf_def_repo.get_workflow_names(resolved_module)
except exceptions.NoWorkflowDefinitionsFound:
# Explicit re-raise
raise
Expand Down
6 changes: 3 additions & 3 deletions projects/orquestra-sdk/tests/cli/test_repos.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# © Copyright 2023 Zapata Computing Inc.
# © Copyright 2023 - 2024 Zapata Computing Inc.
################################################################################
"""
Tests for repos. Isolated unit tests unless explicitly named as integration.
Expand Down Expand Up @@ -1497,7 +1497,7 @@ def test_examples_module():
repo = _repos.WorkflowDefRepo()

# When
names = repo.get_worklow_names(_example_wfs)
names = repo.get_workflow_names(_example_wfs)

# Then
assert names == [
Expand Down Expand Up @@ -1539,7 +1539,7 @@ def test_empty_module(tmp_packages_site):
# Then
with pytest.raises(exceptions.NoWorkflowDefinitionsFound):
# When
_ = repo.get_worklow_names(module)
_ = repo.get_workflow_names(module)

class TestGetWorkflowDef:
@staticmethod
Expand Down
8 changes: 4 additions & 4 deletions projects/orquestra-sdk/tests/cli/workflow/test_submit.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# © Copyright 2023 Zapata Computing Inc.
# © Copyright 2023 - 2024 Zapata Computing Inc.
################################################################################
"""
Unit tests for 'orq wf submit' glue code.
Expand Down Expand Up @@ -121,7 +121,7 @@ def test_multiple_wf_defs_in_module(force: bool):

wf_def_repo = create_autospec(_repos.WorkflowDefRepo)
wf_def_repo.get_module_from_spec.return_value = module
wf_def_repo.get_worklow_names.return_value = wf_names
wf_def_repo.get_workflow_names.return_value = wf_names

wf_def_sentinel = "<wf def sentinel>"
wf_def_repo.get_workflow_def.return_value = wf_def_sentinel
Expand Down Expand Up @@ -181,7 +181,7 @@ def test_single_wf_def(force: bool):

wf_def_repo = create_autospec(_repos.WorkflowDefRepo)
wf_def_repo.get_module_from_spec.return_value = module
wf_def_repo.get_worklow_names.return_value = wf_names
wf_def_repo.get_workflow_names.return_value = wf_names

wf_def_sentinel = "<wf def sentinel>"
wf_def_repo.get_workflow_def.return_value = wf_def_sentinel
Expand Down Expand Up @@ -232,7 +232,7 @@ def test_no_wf_defs_in_module(force: bool):
error_presenter = create_autospec(_presenters.WrappedCorqOutputPresenter)
wf_run_repo = create_autospec(_repos.WorkflowRunRepo)
wf_def_repo = create_autospec(_repos.WorkflowDefRepo)
wf_def_repo.get_worklow_names.side_effect = (
wf_def_repo.get_workflow_names.side_effect = (
exceptions.NoWorkflowDefinitionsFound(module_name=module)
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
################################################################################
# © Copyright 2022 Zapata Computing Inc.
# © Copyright 2022 - 2024 Zapata Computing Inc.
################################################################################
"""Example project file that contains utils used from the worklow_defs module."""
"""Example project file that contains utils used from the workflow_defs module."""


def capitalize_helper(text: str):
Expand Down
Loading