feat: support health check score in repo.toml
All checks were successful
build / build (push) Successful in 1m53s

This commit is contained in:
张泊明518370910136 2025-05-29 00:59:27 -04:00
parent 11ca053704
commit a7a2300f03
2 changed files with 5 additions and 1 deletions

View File

@ -27,3 +27,4 @@ class Config(BaseModel):
root: Path = Path(".")
path: Path = Path("repo.toml")
grading_repo_name: str = f"{socket.gethostname().split('-')[0]}-joj"
health_check_score: int = Field(1)

View File

@ -88,7 +88,10 @@ def get_health_check_stage(repo_conf: repo.Config) -> result.StageDetail:
),
),
parsers=[
result.Parser(name="healthcheck", with_=result.ScoreConfig(score=1)),
result.Parser(
name="healthcheck",
with_=result.ScoreConfig(score=repo_conf.health_check_score),
),
result.Parser(name="debug", with_=result.ScoreConfig(score=0)),
],
)