Skip to content

Commit

Permalink
feat(runner): add verbose property to BaseRunner class, add new TestR…
Browse files Browse the repository at this point in the history
…unner class with 'hello' and 'world' methods
  • Loading branch information
entelecheia committed Aug 2, 2023
1 parent 081bb1e commit 9ffee8e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/hyfi/runner/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class BaseRunner(BaseModel):
_config_name_: str = "__init__"

calls: Optional[List[Union[str, Dict]]] = []
verbose: bool = False

def __call__(self) -> None:
self.run()
Expand Down Expand Up @@ -46,3 +47,16 @@ def run_calls(self):
len(self.tasks or []),
elapsed(),
)


class TestRunner(BaseRunner):
_config_name_: str = "__test__"

def __init__(self, **kwargs):
super().__init__(**kwargs)

def hello(self, **kwargs):
print("Hello World!", kwargs)

def world(self, **kwargs):
print("World Hello!", kwargs)

0 comments on commit 9ffee8e

Please sign in to comment.