chore: organize fields
This commit is contained in:
parent
26824fd93c
commit
6769e19d83
|
@ -34,6 +34,9 @@ class Issue(BaseModel):
|
|||
|
||||
|
||||
class Config(BaseModel):
|
||||
root: Path = Field(Path("."), exclude=True)
|
||||
path: Path = Field(Path("repo.toml"), exclude=True)
|
||||
|
||||
max_size: float = Field(
|
||||
10, ge=0, validation_alias=AliasChoices("max-size", "max_size")
|
||||
)
|
||||
|
@ -61,8 +64,6 @@ class Config(BaseModel):
|
|||
),
|
||||
)
|
||||
groups: Groups = Groups()
|
||||
root: Path = Path(".")
|
||||
path: Path = Path("repo.toml")
|
||||
grading_repo_name: str = Field(
|
||||
"",
|
||||
validation_alias=AliasChoices("grading-repo-name", "grading_repo_name"),
|
||||
|
|
|
@ -263,20 +263,20 @@ class Penalties(BaseModel):
|
|||
|
||||
|
||||
class Config(BaseModel):
|
||||
root: Path = Path(".")
|
||||
path: Path = Path("task.toml")
|
||||
root: Path = Field(Path("."), exclude=True)
|
||||
path: Path = Field(Path("task.toml"), exclude=True)
|
||||
suffix: str = Field("", exclude=True)
|
||||
|
||||
task: Task = Task() # Task name (e.g., hw3 ex5)
|
||||
time: SubmissionTime = SubmissionTime() # Valid time configuration
|
||||
release: Release = Release() # Release configuration
|
||||
stages: List[Stage] = [] # list of stage configurations
|
||||
groups: Groups = Groups()
|
||||
penalties: Penalties = Penalties()
|
||||
max_total_score: Optional[int] = Field(
|
||||
None, validation_alias=AliasChoices("max-total-score", "max_total_score")
|
||||
)
|
||||
scoreboard: str = "scoreboard.csv"
|
||||
|
||||
suffix: str = Field("", exclude=True)
|
||||
time: SubmissionTime = SubmissionTime() # Valid time configuration
|
||||
release: Release = Release() # Release configuration
|
||||
groups: Groups = Groups()
|
||||
penalties: Penalties = Penalties()
|
||||
stages: List[Stage] = [] # list of stage configurations
|
||||
|
||||
@model_validator(mode="after")
|
||||
def set_suffix(self) -> "Config":
|
||||
|
|
Loading…
Reference in New Issue
Block a user