diff --git a/bec_plugins/utils/__init__.py b/bec_plugins/utils/__init__.py new file mode 100644 index 0000000..efe7cff --- /dev/null +++ b/bec_plugins/utils/__init__.py @@ -0,0 +1 @@ +from .service_config import load_service_config diff --git a/bec_plugins/utils/service_config.py b/bec_plugins/utils/service_config.py new file mode 100644 index 0000000..28da889 --- /dev/null +++ b/bec_plugins/utils/service_config.py @@ -0,0 +1,13 @@ +import yaml + +CONFIG_PATH = "" + + +def load_service_config() -> dict: + """Load the service configuration from the YAML file.""" + with open(CONFIG_PATH, "r", encoding="utf-8") as stream: + try: + config = yaml.safe_load(stream) + except yaml.YAMLError as exc: + print(exc) + return config diff --git a/setup.py b/setup.py index 4ee4437..5be3657 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,6 @@ from setuptools import setup if __name__ == "__main__": setup( - install_requires=[], + install_requires=["pyyaml"], extras_require={"dev": ["pytest", "pytest-random-order", "coverage"]}, )