JOJ3-config-generator/joj3_config_generator/models/repo.py
李衍志523370910113 347c4b91d5
All checks were successful
build / build (push) Successful in 2m29s
build / build (pull_request) Successful in 2m27s
refactor/main (#11)
# what I have done

- sync main function in master branch and tested current code usage
- remove redundant code
- update README documents
- fix the immutable files logic

## TODO

- give fallback options for immutable files

Co-authored-by: Boming Zhang <bomingzh@sjtu.edu.cn>
Reviewed-on: #11
Co-authored-by: jon-lee <jon-lee@sjtu.edu.cn>
Co-committed-by: jon-lee <jon-lee@sjtu.edu.cn>
2025-02-27 15:51:31 +08:00

27 lines
609 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_heatlh_check_on_test: bool = False
groups: Groups = Groups()
root: Path = Path(".")
path: Path = Path("repo.toml")