diff --git a/joj3_config_generator/main.py b/joj3_config_generator/main.py index eaf9c04..cf522c9 100644 --- a/joj3_config_generator/main.py +++ b/joj3_config_generator/main.py @@ -75,6 +75,8 @@ def convert( repo_conf.root = root repo_conf.path = repo_toml_path.relative_to(root) task_conf = task.Config(**task_obj) + task_conf.root = root + task_conf.path = task_toml_path.relative_to(root) result_model = convert_conf(repo_conf, task_conf) result_dict = result_model.model_dump(by_alias=True, exclude_none=True) with result_json_path.open("w") as result_file: diff --git a/joj3_config_generator/models/task.py b/joj3_config_generator/models/task.py index ab15bf7..6672d02 100644 --- a/joj3_config_generator/models/task.py +++ b/joj3_config_generator/models/task.py @@ -33,7 +33,8 @@ class Release(BaseModel): class Config(BaseModel): - path: Path = Path(".") + root: Path = Path(".") + path: Path = Path("conf.toml") task: str # Task name (e.g., hw3 ex5) release: Release # Release configuration stages: List[Stage] # list of stage configurations