diff --git a/src/AuDaGe/__init__.py b/src/AuDaGe/__init__.py index c1879e4..0e95d0a 100644 --- a/src/AuDaGe/__init__.py +++ b/src/AuDaGe/__init__.py @@ -8,12 +8,18 @@ date: 2026-10-30 desc: Global variables for the AuDaGe package. """ +from importlib import resources + import yaml +CONFIG_PATH = "../../config.yaml" + safe: bool = True """Default to disallowing evaluating Python from YAML files. Can be overridden when calling AuDaGe from the command line with the argument `--unsafe`. """ -with open("config.yaml") as config_file: - folders = yaml.safe_load(config_file.read())["folders"] \ No newline at end of file +config_path = resources.files().joinpath(CONFIG_PATH) + +with config_path.open("r") as config_file: + folders: list[str] = yaml.safe_load(config_file.read())["folders"] \ No newline at end of file