diff --git a/joj3_config_generator/main.py b/joj3_config_generator/main.py index 271954f..eaf9c04 100644 --- a/joj3_config_generator/main.py +++ b/joj3_config_generator/main.py @@ -72,9 +72,9 @@ def convert( ) task_obj = rtoml.loads(task_toml_path.read_text()) repo_conf = repo.Config(**repo_obj) + repo_conf.root = root repo_conf.path = repo_toml_path.relative_to(root) task_conf = task.Config(**task_obj) - 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/repo.py b/joj3_config_generator/models/repo.py index 288096f..5149e18 100644 --- a/joj3_config_generator/models/repo.py +++ b/joj3_config_generator/models/repo.py @@ -12,7 +12,8 @@ class Files(BaseModel): class Config(BaseModel): - path: Path = Path(".") + root: Path = Path(".") + path: Path = Path("repo.toml") teaching_team: List[str] max_size: float = Field(..., ge=0) release_tags: List[str]