refactor/main #11

Merged
李衍志523370910113 merged 23 commits from refactor/main into dev 2025-02-27 15:51:32 +08:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 4c12bf9a34 - Show all commits
joj3_config_generator

View File

@ -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)

repo_conf.path as absolute

`repo_conf.path` as absolute
task_conf = task.Config(**task_obj)
task_conf.path = task_toml_path.relative_to(root)
result_model = convert_conf(repo_conf, task_conf)

task_conf.path as absolute

`task_conf.path` as absolute
result_dict = result_model.model_dump(by_alias=True, exclude_none=True)
with result_json_path.open("w") as result_file:

View File

@ -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]