dev #10
|
@ -150,3 +150,29 @@ class Config(BaseModel):
|
|||
actor_csv_path: str = Field("", serialization_alias="actorCsvPath")
|
||||
max_total_score: int = Field(100, serialization_alias="maxTotalScore")
|
||||
stage: Stage
|
||||
|
||||
|
||||
class DummyConfig(BaseModel):
|
||||
score: Optional[int] = None
|
||||
comment: Optional[str] = None
|
||||
force_quit_on_not_accepted: Optional[bool] = Field(
|
||||
False, alias="forceQuitOnNotAccepted"
|
||||
)
|
||||
|
||||
|
||||
class DiffOutputConfig(BaseModel):
|
||||
score: Optional[int] = None
|
||||
file_name: str = Field("", alias="fileName")
|
||||
answer_path: str = Field("", alias="answerPath")
|
||||
force_quit_on_diff: Optional[bool] = Field(False, alias="forceQuitOnDiff")
|
||||
always_hide: Optional[bool] = Field(False, alias="alwaysHide")
|
||||
compare_space: Optional[bool] = Field(False, alias="compareSpace")
|
||||
|
||||
|
||||
jon-lee marked this conversation as resolved
Outdated
|
||||
class ResultDetailConfig(BaseModel):
|
||||
score: int = 0
|
||||
comment: str = ""
|
||||
show_files: List[str] = Field([], alias="showFiles")
|
||||
show_exit_status: Optional[bool] = Field(True, alias="showExitStatus")
|
||||
show_runtime: Optional[bool] = Field(True, alias="showRuntime")
|
||||
show_memory: Optional[bool] = Field(False, alias="showMemory")
|
||||
jon-lee marked this conversation as resolved
张泊明518370910136
commented
also these also these `Optional`?
李衍志523370910113
commented
I guess some of the field have default within JOJ3, so I choose optional just to reduce the length of json previously I guess some of the field have default within JOJ3, so I choose optional just to reduce the length of json previously
张泊明518370910136
commented
better put all defaults here then we only need to check the code here better put all defaults here then we only need to check the code here
李衍志523370910113
commented
indeed. indeed.
|
||||
|
|
|
@ -11,6 +11,7 @@ def get_conf_stage(
|
|||
conf_stage = result.StageDetail(
|
||||
name=task_stage.name if task_stage.name is not None else "",
|
||||
# group is determined by adding between "[]" in the name of the task
|
||||
# FIXME: this is probably outdated
|
||||
group=(
|
||||
match.group(1)
|
||||
jon-lee marked this conversation as resolved
Outdated
李衍志523370910113
commented
BTW, is this outdated? BTW, is this outdated?
张泊明518370910136
commented
Never heard about this rule. Never heard about this rule.
李衍志523370910113
commented
@manuel what would be the current intended rule for @manuel what would be the current intended rule for `group`?
李衍志523370910113
commented
seems current strategy is fine, resolved. seems current strategy is fine, resolved.
|
||||
if (match := re.search(r"\[([^\[\]]+)\]", task_stage.name or ""))
|
||||
|
|
Loading…
Reference in New Issue
Block a user
Are these
Optional
necessary?