This commit is contained in:
parent
c4639aef76
commit
4c12bf9a34
|
@ -72,9 +72,9 @@ def convert(
|
||||||
)
|
)
|
||||||
task_obj = rtoml.loads(task_toml_path.read_text())
|
task_obj = rtoml.loads(task_toml_path.read_text())
|
||||||
repo_conf = repo.Config(**repo_obj)
|
repo_conf = repo.Config(**repo_obj)
|
||||||
|
repo_conf.root = root
|
||||||
repo_conf.path = repo_toml_path.relative_to(root)
|
repo_conf.path = repo_toml_path.relative_to(root)
|
||||||
task_conf = task.Config(**task_obj)
|
task_conf = task.Config(**task_obj)
|
||||||
task_conf.path = task_toml_path.relative_to(root)
|
|
||||||
result_model = convert_conf(repo_conf, task_conf)
|
result_model = convert_conf(repo_conf, task_conf)
|
||||||
result_dict = result_model.model_dump(by_alias=True, exclude_none=True)
|
result_dict = result_model.model_dump(by_alias=True, exclude_none=True)
|
||||||
with result_json_path.open("w") as result_file:
|
with result_json_path.open("w") as result_file:
|
||||||
|
|
|
@ -12,7 +12,8 @@ class Files(BaseModel):
|
||||||
|
|
||||||
|
|
||||||
class Config(BaseModel):
|
class Config(BaseModel):
|
||||||
path: Path = Path(".")
|
root: Path = Path(".")
|
||||||
|
path: Path = Path("repo.toml")
|
||||||
teaching_team: List[str]
|
teaching_team: List[str]
|
||||||
max_size: float = Field(..., ge=0)
|
max_size: float = Field(..., ge=0)
|
||||||
release_tags: List[str]
|
release_tags: List[str]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user