-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
feat: add more fields in submission
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
"execjs", | ||
"gevent", | ||
"grequests", | ||
"guilin", | ||
"gxcpc", | ||
"hbcpc", | ||
"hncpc", | ||
|
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import os | ||
|
||
from xcpcio_board_spider import Contest, utils | ||
from xcpcio_board_spider.spider.domjudge.v3 import DOMjudge | ||
|
||
current_file_path = os.path.abspath(__file__) | ||
current_dir_path = os.path.dirname(current_file_path) | ||
|
||
|
||
def test_spider_domjudge_v3_9th_ccpc_guilin(snapshot): | ||
test_prefix = "9th_ccpc_guilin" | ||
|
||
c = Contest() | ||
c.start_time = utils.get_timestamp_second("2023-10-29 09:00:00") | ||
c.end_time = utils.get_timestamp_second("2023-10-29 14:00:00") | ||
|
||
fetch_uri = os.path.join(current_dir_path, "test_data", test_prefix) | ||
|
||
d = DOMjudge(c, fetch_uri) | ||
d.fetch().parse_teams().parse_runs() | ||
|
||
assert len(d.teams) == 270 | ||
assert len(d.runs) == 3360 | ||
|
||
snapshot.assert_match(d.teams.get_json, "teams") | ||
snapshot.assert_match(d.runs.get_json, "runs") |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"id":"group-winner-2","citation":"Winner(s) of group Self-Registered","team_ids":["37"]},{"id":"group-winner-3","citation":"Winner(s) of group Participants","team_ids":["175"]},{"id":"first-to-solve-5","citation":"First to solve problem 5","team_ids":["29"]},{"id":"first-to-solve-6","citation":"First to solve problem 6","team_ids":["8"]},{"id":"first-to-solve-14","citation":"First to solve problem 14","team_ids":["8"]},{"id":"first-to-solve-15","citation":"First to solve problem 15","team_ids":["8"]},{"id":"first-to-solve-10","citation":"First to solve problem 10","team_ids":["46"]},{"id":"first-to-solve-11","citation":"First to solve problem 11","team_ids":["86"]},{"id":"first-to-solve-16","citation":"First to solve problem 16","team_ids":["86"]},{"id":"first-to-solve-4","citation":"First to solve problem 4","team_ids":["175"]},{"id":"first-to-solve-7","citation":"First to solve problem 7","team_ids":["175"]},{"id":"first-to-solve-8","citation":"First to solve problem 8","team_ids":["175"]},{"id":"first-to-solve-12","citation":"First to solve problem 12","team_ids":["175"]},{"id":"first-to-solve-13","citation":"First to solve problem 13","team_ids":["175"]},{"id":"winner","citation":"Contest winner","team_ids":["175"]}] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"formal_name":"The 9th CCPC Guilin Onsite","penalty_time":20,"start_time":"2023-10-29T09:00:00+08:00","end_time":"2023-10-29T14:00:00+08:00","duration":"5:00:00.000","scoreboard_freeze_duration":"1:00:00.000","id":"5","external_id":null,"name":"The 9th CCPC Guilin Onsite","shortname":"GuilinOnsite"} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"hidden":false,"id":"2","icpc_id":null,"name":"Self-Registered","sortorder":0,"color":"#d6a321"},{"hidden":false,"id":"3","icpc_id":null,"name":"Participants","sortorder":0,"color":null},{"hidden":false,"id":"4","icpc_id":null,"name":"Observers","sortorder":1,"color":"#ffcc33"},{"hidden":true,"id":"5","icpc_id":null,"name":"Organisation","sortorder":1,"color":"#ff99cc"},{"hidden":true,"id":"1","icpc_id":null,"name":"System","sortorder":9,"color":"#ff2bea"},{"hidden":true,"id":"6","icpc_id":null,"name":"Jury","sortorder":100,"color":null}] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"id":"CE","name":"compiler error","penalty":false,"solved":false},{"id":"MLE","name":"memory limit","penalty":true,"solved":false},{"id":"OLE","name":"output limit","penalty":true,"solved":false},{"id":"RTE","name":"run error","penalty":true,"solved":false},{"id":"TLE","name":"timelimit","penalty":true,"solved":false},{"id":"WA","name":"wrong answer","penalty":true,"solved":false},{"id":"NO","name":"no output","penalty":true,"solved":false},{"id":"AC","name":"correct","penalty":false,"solved":true}] |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"id":"c","name":"C","extensions":["c"],"filter_compiler_files":true,"allow_judge":true,"time_factor":1.0,"entry_point_required":false,"entry_point_name":null},{"id":"cpp","name":"C++","extensions":["cpp","cc","cxx","c++"],"filter_compiler_files":true,"allow_judge":true,"time_factor":1.0,"entry_point_required":false,"entry_point_name":null},{"id":"java","name":"Java","extensions":["java"],"filter_compiler_files":true,"allow_judge":true,"time_factor":1.0,"entry_point_required":false,"entry_point_name":"Main class"},{"id":"python3","name":"Python 3","extensions":["py","py3"],"filter_compiler_files":true,"allow_judge":true,"time_factor":1.0,"entry_point_required":false,"entry_point_name":"Main file"}] |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"ordinal":0,"id":"4","short_name":"A","label":"A","time_limit":2.5,"externalid":"diameter-task-11linux","name":"Easy Diameter Problem","rgb":"#9d00ff","color":"darkviolet","test_data_count":52},{"ordinal":1,"id":"5","short_name":"B","label":"B","time_limit":2.0,"externalid":"set-task-14linux","name":"The Game","rgb":"#42ff58","color":"limegreen","test_data_count":74},{"ordinal":2,"id":"6","short_name":"C","label":"C","time_limit":1.0,"externalid":"divide-xor-13linux","name":"Master of Both IV","rgb":"#ffb4f9","color":"lightpink","test_data_count":31},{"ordinal":3,"id":"7","short_name":"D","label":"D","time_limit":2.0,"externalid":"metro-11linux","name":"Subway","rgb":"#29ffd1","color":"turquoise","test_data_count":20},{"ordinal":4,"id":"8","short_name":"E","label":"E","time_limit":2.0,"externalid":"prefix-mahjong-26linux","name":"Prefix Mahjong","rgb":"#ffffff","color":"white","test_data_count":40},{"ordinal":5,"id":"9","short_name":"F","label":"F","time_limit":4.0,"externalid":"cut-vertices-6linux","name":"Redundant Towers","rgb":"#b5b5b5","color":"silver","test_data_count":51},{"ordinal":6,"id":"10","short_name":"G","label":"G","time_limit":1.0,"externalid":"parenthesis-autocomplete-10linux","name":"Hard Brackets Problem","rgb":"#ff0000","color":"red","test_data_count":59},{"ordinal":7,"id":"11","short_name":"H","label":"H","time_limit":2.0,"externalid":"cut-the-tree-1-2-10linux","name":"Sweet Sugar","rgb":"#007542","color":"teal","test_data_count":85},{"ordinal":8,"id":"12","short_name":"I","label":"I","time_limit":2.0,"externalid":"col-mex-interval-16linux","name":"Barkley II","rgb":"#ffff00","color":"yellow","test_data_count":36},{"ordinal":9,"id":"13","short_name":"J","label":"J","time_limit":4.0,"externalid":"two-string-sets-11linux","name":"The Phantom Menace","rgb":"#ff9d00","color":"orange","test_data_count":63},{"ordinal":10,"id":"14","short_name":"K","label":"K","time_limit":2.0,"externalid":"permutation-task-14linux","name":"Randias Permutation Task","rgb":"#adfbff","color":"paleturquoise","test_data_count":48},{"ordinal":11,"id":"15","short_name":"L","label":"L","time_limit":1.0,"externalid":"dice-52linux","name":"Alea Iacta Est","rgb":"#8f6900","color":"olive","test_data_count":148},{"ordinal":12,"id":"16","short_name":"M","label":"M","time_limit":2.5,"externalid":"flip-cards-8linux","name":"Flipping Cards","rgb":"#172eff","color":"blue","test_data_count":16}] |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.