feat: create config class to replace use of config file in application

This commit is contained in:
WorldTeacher
2024-10-29 16:07:30 +01:00
parent 2137799f9b
commit f3eed7486d
13 changed files with 224 additions and 111 deletions

View File

@@ -1,16 +1,14 @@
import os
from pathlib import Path
from src import database
from omegaconf import OmegaConf
config = OmegaConf.load("config.yaml")
def delete_temp_contents():
"""
delete_temp_contents deletes the contents of the temp directory.
"""
path = config.database.tempdir
path = database.tempdir
path = path.replace("~", str(Path.home()))
path = Path(path)
path = path.resolve()