restructured project to have /src folder

This commit is contained in:
Cian Hughes
2023-10-31 09:44:34 +00:00
parent 1b22fd7861
commit 289922bea7
16 changed files with 2 additions and 1 deletions

View File

View File

@@ -11,6 +11,7 @@ import docker
CLIENT = docker.from_env(version="auto") CLIENT = docker.from_env(version="auto")
ROOT = Path(__file__).parent.parent
type ConfigLabel = str | list[str] type ConfigLabel = str | list[str]
@@ -18,7 +19,7 @@ type ConfigLabel = str | list[str]
def get_config(config_label: ConfigLabel = ["default"]) -> dict: def get_config(config_label: ConfigLabel = ["default"]) -> dict:
if isinstance(config_label, str): if isinstance(config_label, str):
config_label = [config_label] config_label = [config_label]
with open("config.toml", "rb") as f: with open(ROOT / "config.toml", "rb") as f:
configs: dict = tomllib.load(f) configs: dict = tomllib.load(f)
out_config: dict = {} out_config: dict = {}
for c in config_label: for c in config_label: