From 0b6b1d27756d1c02a2a667ebfc1a119081ff079f Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Wed, 5 Apr 2023 17:22:59 +0200 Subject: config file fix --- bsie/apps/_loader.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bsie/apps/_loader.py') 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: -- cgit v1.2.3