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