add recipes dir to dir manager

This commit is contained in:
Daniel 2023-12-05 18:58:51 +01:00
parent c05f79e36c
commit 52922a5be3
4 changed files with 35 additions and 21 deletions

View file

@ -16,12 +16,14 @@ class DirManager:
...
"""
def __init__(self, output_dir: Path | str, session_id: str):
# root test dir
def __init__(self, output_dir: Path | str, session_id: str, recipes_dir: Path | str = ""):
if isinstance(output_dir, str):
output_dir = Path(output_dir)
self.output_dir = output_dir.resolve()
self.session_id = session_id
if isinstance(recipes_dir, str):
recipes_dir = Path(recipes_dir)
self.recipes_dir = recipes_dir
def create_all_dirs(self) -> None:
dirs: list[Path] = [
@ -63,3 +65,7 @@ class DirManager:
@property
def RESULTS(self):
return self.SESSION / "results"
@property
def RECIPES(self):
return self.recipes_dir