dev #10

Merged
李衍志523370910113 merged 238 commits from dev into master 2025-03-05 16:20:39 +08:00
2 changed files with 27 additions and 0 deletions
Showing only changes of commit 9bd662df8c - Show all commits

View File

@ -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

Are these Optional necessary?

Are these `Optional` necessary?
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

also these Optional?

also these `Optional`?

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

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

indeed.

indeed.

View File

@ -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

BTW, is this outdated?

BTW, is this outdated?

Never heard about this rule.

Never heard about this rule.

@manuel what would be the current intended rule for group?

@manuel what would be the current intended rule for `group`?

seems current strategy is fine, resolved.

seems current strategy is fine, resolved.
if (match := re.search(r"\[([^\[\]]+)\]", task_stage.name or ""))