feat(models/result): init specific parse model
This commit is contained in:
		
							parent
							
								
									6fc162769f
								
							
						
					
					
						commit
						9bd662df8c
					
				|  | @ -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") | ||||
| 
 | ||||
| 
 | ||||
| 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") | ||||
|  |  | |||
|  | @ -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) | ||||
|             if (match := re.search(r"\[([^\[\]]+)\]", task_stage.name or "")) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user