-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from Sage-Bionetworks-Workflows/bwmac/orca-164…
…/tower_execution_status [ORCA-164] adds `get_workflow` and `get_workflow_status` methods to ops
- Loading branch information
Showing
8 changed files
with
200 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from enum import Enum | ||
|
||
|
||
class TaskStatus(Enum): | ||
"""enum containing all possible status values for | ||
Nextflow Tower runs. terminal_states set which | ||
statuses result in a run being determined to be | ||
"complete" | ||
""" | ||
|
||
SUBMITTED = "SUBMITTED" | ||
RUNNING = "RUNNING" | ||
SUCCEEDED = "SUCCEEDED" | ||
FAILED = "FAILED" | ||
CANCELLED = "CANCELLED" | ||
UNKNOWN = "UNKNOWN" | ||
|
||
terminal_states = [SUCCEEDED, FAILED, CANCELLED, UNKNOWN] |
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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from orca.services.nextflowtower.models.enums import TaskStatus | ||
|
||
|
||
def test_that_TaskStatus_contant_values_are_correct(): | ||
assert TaskStatus.SUBMITTED.value == "SUBMITTED" | ||
assert TaskStatus.RUNNING.value == "RUNNING" | ||
assert TaskStatus.SUCCEEDED.value == "SUCCEEDED" | ||
assert TaskStatus.FAILED.value == "FAILED" | ||
assert TaskStatus.CANCELLED.value == "CANCELLED" | ||
assert TaskStatus.UNKNOWN.value == "UNKNOWN" | ||
|
||
|
||
def test_that_TaskStatus_terminal_states_are_in_terminal_states_list(): | ||
assert TaskStatus.SUCCEEDED.value in TaskStatus.terminal_states.value | ||
assert TaskStatus.FAILED.value in TaskStatus.terminal_states.value | ||
assert TaskStatus.CANCELLED.value in TaskStatus.terminal_states.value | ||
assert TaskStatus.UNKNOWN.value in TaskStatus.terminal_states.value |
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