diff options
Diffstat (limited to 'bsie/apps/_loader.py')
-rw-r--r-- | bsie/apps/_loader.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bsie/apps/_loader.py b/bsie/apps/_loader.py index 6411f10..d9ea9bb 100644 --- a/bsie/apps/_loader.py +++ b/bsie/apps/_loader.py @@ -1,5 +1,6 @@ # standard imports +import os import typing # external imports @@ -12,8 +13,7 @@ from bsie.lib.pipeline import Pipeline from bsie.reader import ReaderBuilder # constants -DEFAULT_CONFIG_FILE = 'default_config.yaml' - +DEFAULT_CONFIG_FILE = os.path.join(os.path.dirname(__file__), 'default_config.yaml') # exports __all__: typing.Sequence[str] = ( 'DEFAULT_CONFIG_FILE', @@ -23,7 +23,7 @@ __all__: typing.Sequence[str] = ( ## code ## -def load_pipeline(path: str) -> Pipeline: +def load_pipeline(path: str = DEFAULT_CONFIG_FILE) -> Pipeline: """Load a pipeline according to a config at *path*.""" # load config file with open(path, 'rt', encoding='utf-8') as ifile: |