Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add specs * add specs * add taskspec * taskspec * taskspec * update * add specs * update tests * fix get_origin_type * update * update * update * update * update * update * improve instances * update * rename * update * refactor spec * improve * task context * add * execution
- Loading branch information
1 parent
4cb9fba
commit 483b9ac
Showing
14 changed files
with
2,428 additions
and
7 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,47 @@ | ||
from typing import Iterable | ||
|
||
|
||
class AdagioError(Exception): | ||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
|
||
|
||
class WorkflowBug(AdagioError): | ||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
|
||
|
||
class CompileError(AdagioError): | ||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
|
||
|
||
class DependencyDefinitionError(CompileError): | ||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
|
||
|
||
class DependencyNotDefinedError(DependencyDefinitionError): | ||
def __init__(self, name: str, expected: Iterable[str], actual: Iterable[str]): | ||
s = f"expected {sorted(expected)}, actual {sorted(actual)}" | ||
super().__init__(f"Task {name} dependencies not well defined: " + s) | ||
|
||
|
||
class WorkflowRuntimeError(AdagioError): | ||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
|
||
|
||
class AbortedError(WorkflowRuntimeError): | ||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
|
||
|
||
class SkippedError(WorkflowRuntimeError): | ||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
|
||
|
||
def assert_on_compile(bool_expr: bool, msg: str) -> None: | ||
if not bool_expr: | ||
raise CompileError(msg) |
Oops, something went wrong.