-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ add generated parameters for Bunch, Flow and Task. #20
- Loading branch information
1 parent
9636f17
commit 206e804
Showing
7 changed files
with
173 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,7 @@ | |
'lark', | ||
'grpcio', | ||
'typer', | ||
'pydantic' | ||
], | ||
|
||
extras_require={ | ||
|
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,4 @@ | ||
|
||
|
||
DEFAULT_HOST = "localhost" | ||
DEFAULT_PORT = "33083" |
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,8 +1,31 @@ | ||
from .task_node import Task | ||
from typing import TYPE_CHECKING, Optional | ||
|
||
from .node_container import NodeContainer | ||
from .parameter import Parameter | ||
|
||
if TYPE_CHECKING: | ||
from .bunch import Bunch | ||
|
||
|
||
class Flow(NodeContainer): | ||
def __init__(self, name: str): | ||
super(Flow, self).__init__(name) | ||
|
||
self.bunch = None # type: Optional[Bunch] | ||
|
||
# Node access -------------------------------------- | ||
|
||
def get_bunch(self): # type: () -> Optional[Bunch] | ||
return self.bunch | ||
|
||
# Parameter ---------------------------------------- | ||
|
||
def find_parent_parameter(self, name: str) -> Optional[Parameter]: | ||
p = super(Flow, self).find_parent_parameter(name) | ||
if p is not None: | ||
return p | ||
|
||
if self.bunch is None: | ||
return None | ||
|
||
return self.bunch.find_parent_parameter(name) |
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