-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(online_judge)!: 将OJ相关配置从ccf_parser移动到online_judge内
- Loading branch information
1 parent
8e6d02b
commit 2623008
Showing
8 changed files
with
27 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
from ccf_parser.base import CCF, CCFHeader, Contest | ||
from ccf_parser.configs import ContestIndex, ContestIndexList | ||
from ccf_parser.oj import OJConfig | ||
from ccf_parser.problems import CheckPoint, JudgeConfig, Problem | ||
from ccf_parser.results import CheckPointResult, JudgingResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from .contest import OJContest | ||
from .user import User |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from datetime import datetime | ||
from pathlib import Path | ||
from uuid import UUID | ||
|
||
from pydantic import BaseModel | ||
|
||
from ccf_parser import CCF | ||
|
||
|
||
class OJContest(BaseModel): | ||
"""有别于 ccf_parser 中的 Contest,更加详细的比赛信息需要从 ccf_parser 中获取""" | ||
contest_id: UUID | ||
ccf_file: Path | ||
|
||
start_time: datetime | ||
end_time: datetime | ||
|
||
@property | ||
def read_ccf(self) -> CCF: | ||
data = self.ccf_file.read_text('utf-8') | ||
return CCF.model_validate_json(data) |
File renamed without changes.