JOJ3-config-generator/joj3_config_generator/models/repo.py
李衍志523370910113 3b5f2071f0
Some checks failed
build / build (pull_request) Failing after 2m21s
build / build (push) Failing after 2m24s
fix: grading repo name logic
2025-03-02 10:49:57 +08:00

29 lines
697 B
Python

from pathlib import Path
from typing import List, Optional
from pydantic import BaseModel, Field
class Files(BaseModel):
required: List[str] = []
immutable: List[str] = []
class Groups(BaseModel):
name: List[str] = []
max_count: List[int] = []
time_period_hour: List[int] = []
class Config(BaseModel):
max_size: float = Field(10, ge=0)
files: Files = Files()
sandbox_token: str = Field("")
max_total_score: int = Field(100)
force_skip_health_check_on_test: bool = False
force_skip_teapot_on_test: bool = False
groups: Groups = Groups()
root: Path = Path(".")
path: Path = Path("repo.toml")
grading_repo_name: Optional[str] = None