feat: more diff settings
This commit is contained in:
		
							parent
							
								
									e6846793ef
								
							
						
					
					
						commit
						3bb7cc195c
					
				|  | @ -185,9 +185,12 @@ class DiffOutputConfig(BaseModel): | |||
|     score: int = 100 | ||||
|     file_name: str = Field("", serialization_alias="fileName") | ||||
|     answer_path: str = Field("", serialization_alias="answerPath") | ||||
|     force_quit_on_diff: bool = Field(False, serialization_alias="forceQuitOnDiff") | ||||
|     always_hide: bool = Field(False, serialization_alias="alwaysHide") | ||||
|     compare_space: bool = Field(False, serialization_alias="compareSpace") | ||||
|     always_hide: bool = Field(False, serialization_alias="alwaysHide") | ||||
|     force_quit_on_diff: bool = Field(False, serialization_alias="forceQuitOnDiff") | ||||
|     max_diff_length: int = Field(2048, serialization_alias="maxDiffLength") | ||||
|     max_diff_lines: int = Field(50, serialization_alias="maxDiffLines") | ||||
|     hide_common_prefix: bool = Field(False, serialization_alias="hideCommonPrefix") | ||||
| 
 | ||||
| 
 | ||||
| class ResultDetailConfig(BaseModel): | ||||
|  |  | |||
|  | @ -52,6 +52,9 @@ class ParserDiffOutputs(BaseModel): | |||
|     ignore_spaces: bool = Field(True, alias="ignore-spaces") | ||||
|     hide: bool = False | ||||
|     force_quit: bool = Field(False, alias="force-quit") | ||||
|     max_length: int = Field(2048, alias="max-length") | ||||
|     max_lines: int = Field(50, alias="max-lines") | ||||
|     hide_common_prefix: bool = Field(False, alias="hide-common-prefix") | ||||
| 
 | ||||
| 
 | ||||
| class ParserDiff(BaseModel): | ||||
|  |  | |||
|  | @ -230,6 +230,9 @@ def fix_diff( | |||
|                     force_quit_on_diff=case_stage.diff.output.force_quit, | ||||
|                     always_hide=case_stage.diff.output.hide, | ||||
|                     compare_space=not case_stage.diff.output.ignore_spaces, | ||||
|                     max_diff_length=case_stage.diff.output.max_length, | ||||
|                     max_diff_lines=case_stage.diff.output.max_lines, | ||||
|                     hide_common_prefix=case_stage.diff.output.hide_common_prefix, | ||||
|                 ) | ||||
|             ] | ||||
|         ) | ||||
|  |  | |||
|  | @ -146,9 +146,12 @@ | |||
|                                             "score": 5, | ||||
|                                             "fileName": "stdout", | ||||
|                                             "answerPath": "/home/tt/.config/joj/diff/case0.out", | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "compareSpace": false, | ||||
|                                             "alwaysHide": false, | ||||
|                                             "compareSpace": false | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "maxDiffLength": 2048, | ||||
|                                             "maxDiffLines": 50, | ||||
|                                             "hideCommonPrefix": false | ||||
|                                         } | ||||
|                                     ] | ||||
|                                 }, | ||||
|  | @ -158,9 +161,12 @@ | |||
|                                             "score": 123214122421, | ||||
|                                             "fileName": "stdout", | ||||
|                                             "answerPath": "/home/tt/.config/joj/diff/case1.out", | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "compareSpace": false, | ||||
|                                             "alwaysHide": false, | ||||
|                                             "compareSpace": false | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "maxDiffLength": 2048, | ||||
|                                             "maxDiffLines": 50, | ||||
|                                             "hideCommonPrefix": false | ||||
|                                         } | ||||
|                                     ] | ||||
|                                 }, | ||||
|  | @ -170,9 +176,12 @@ | |||
|                                             "score": 1232131, | ||||
|                                             "fileName": "stdout", | ||||
|                                             "answerPath": "/home/tt/.config/joj/diff/case9.out", | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "compareSpace": false, | ||||
|                                             "alwaysHide": false, | ||||
|                                             "compareSpace": false | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "maxDiffLength": 2048, | ||||
|                                             "maxDiffLines": 50, | ||||
|                                             "hideCommonPrefix": false | ||||
|                                         } | ||||
|                                     ] | ||||
|                                 }, | ||||
|  | @ -182,9 +191,12 @@ | |||
|                                             "score": 92321, | ||||
|                                             "fileName": "stdout", | ||||
|                                             "answerPath": "/home/tt/.config/joj/diff/task1/subtask1/case11.out", | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "compareSpace": false, | ||||
|                                             "alwaysHide": false, | ||||
|                                             "compareSpace": false | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "maxDiffLength": 2048, | ||||
|                                             "maxDiffLines": 50, | ||||
|                                             "hideCommonPrefix": false | ||||
|                                         } | ||||
|                                     ] | ||||
|                                 }, | ||||
|  | @ -194,9 +206,12 @@ | |||
|                                             "score": 823131, | ||||
|                                             "fileName": "stdout", | ||||
|                                             "answerPath": "/home/tt/.config/joj/diff/task1/subtask1/case10.out", | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "compareSpace": false, | ||||
|                                             "alwaysHide": false, | ||||
|                                             "compareSpace": false | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "maxDiffLength": 2048, | ||||
|                                             "maxDiffLines": 50, | ||||
|                                             "hideCommonPrefix": false | ||||
|                                         } | ||||
|                                     ] | ||||
|                                 }, | ||||
|  | @ -206,9 +221,12 @@ | |||
|                                             "score": 2590, | ||||
|                                             "fileName": "stdout", | ||||
|                                             "answerPath": "/home/tt/.config/joj/diff/task1/case5.out", | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "compareSpace": false, | ||||
|                                             "alwaysHide": false, | ||||
|                                             "compareSpace": false | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "maxDiffLength": 2048, | ||||
|                                             "maxDiffLines": 50, | ||||
|                                             "hideCommonPrefix": false | ||||
|                                         } | ||||
|                                     ] | ||||
|                                 }, | ||||
|  | @ -218,9 +236,12 @@ | |||
|                                             "score": 100, | ||||
|                                             "fileName": "stdout", | ||||
|                                             "answerPath": "/home/tt/.config/joj/diff/case2.out", | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "compareSpace": false, | ||||
|                                             "alwaysHide": false, | ||||
|                                             "compareSpace": false | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "maxDiffLength": 2048, | ||||
|                                             "maxDiffLines": 50, | ||||
|                                             "hideCommonPrefix": false | ||||
|                                         } | ||||
|                                     ] | ||||
|                                 }, | ||||
|  | @ -230,9 +251,12 @@ | |||
|                                             "score": 100, | ||||
|                                             "fileName": "stdout", | ||||
|                                             "answerPath": "/home/tt/.config/joj/diff/task1/case4.out", | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "compareSpace": false, | ||||
|                                             "alwaysHide": false, | ||||
|                                             "compareSpace": false | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "maxDiffLength": 2048, | ||||
|                                             "maxDiffLines": 50, | ||||
|                                             "hideCommonPrefix": false | ||||
|                                         } | ||||
|                                     ] | ||||
|                                 }, | ||||
|  | @ -242,9 +266,12 @@ | |||
|                                             "score": 100, | ||||
|                                             "fileName": "stdout", | ||||
|                                             "answerPath": "/home/tt/.config/joj/diff/task2/case6.out", | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "compareSpace": false, | ||||
|                                             "alwaysHide": false, | ||||
|                                             "compareSpace": false | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "maxDiffLength": 2048, | ||||
|                                             "maxDiffLines": 50, | ||||
|                                             "hideCommonPrefix": false | ||||
|                                         } | ||||
|                                     ] | ||||
|                                 }, | ||||
|  | @ -254,9 +281,12 @@ | |||
|                                             "score": 100, | ||||
|                                             "fileName": "stdout", | ||||
|                                             "answerPath": "/home/tt/.config/joj/diff/task2/case7.out", | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "compareSpace": false, | ||||
|                                             "alwaysHide": false, | ||||
|                                             "compareSpace": false | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "maxDiffLength": 2048, | ||||
|                                             "maxDiffLines": 50, | ||||
|                                             "hideCommonPrefix": false | ||||
|                                         } | ||||
|                                     ] | ||||
|                                 }, | ||||
|  | @ -266,9 +296,12 @@ | |||
|                                             "score": 100, | ||||
|                                             "fileName": "stdout", | ||||
|                                             "answerPath": "/home/tt/.config/joj/diff/task2/case8.out", | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "compareSpace": false, | ||||
|                                             "alwaysHide": false, | ||||
|                                             "compareSpace": false | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "maxDiffLength": 2048, | ||||
|                                             "maxDiffLines": 50, | ||||
|                                             "hideCommonPrefix": false | ||||
|                                         } | ||||
|                                     ] | ||||
|                                 } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user