xcpcio 0.65.1__py3-none-any.whl → 0.66.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of xcpcio might be problematic. Click here for more details.
- xcpcio/__version__.py +1 -1
- xcpcio/clics/reader/contest_package_reader.py +7 -7
- xcpcio/types.py +14 -6
- {xcpcio-0.65.1.dist-info → xcpcio-0.66.0.dist-info}/METADATA +1 -1
- {xcpcio-0.65.1.dist-info → xcpcio-0.66.0.dist-info}/RECORD +7 -7
- {xcpcio-0.65.1.dist-info → xcpcio-0.66.0.dist-info}/WHEEL +0 -0
- {xcpcio-0.65.1.dist-info → xcpcio-0.66.0.dist-info}/entry_points.txt +0 -0
xcpcio/__version__.py
CHANGED
|
@@ -54,15 +54,15 @@ class ContestPackageReader(BaseContestReader):
|
|
|
54
54
|
self.access = self._load_json_file("access.json")
|
|
55
55
|
|
|
56
56
|
self.accounts = self._load_json_file("accounts.json")
|
|
57
|
-
self.accounts_by_id = {account["id"] for account in self.accounts}
|
|
57
|
+
self.accounts_by_id = {account["id"]: account for account in self.accounts}
|
|
58
58
|
|
|
59
59
|
self.api_info = self._load_json_file("api.json")
|
|
60
60
|
|
|
61
61
|
self.awards = self._load_json_file("awards.json")
|
|
62
|
-
self.awards_by_id = {award["id"] for award in self.awards}
|
|
62
|
+
self.awards_by_id = {award["id"]: award for award in self.awards}
|
|
63
63
|
|
|
64
64
|
self.clarifications = self._load_json_file("clarifications.json")
|
|
65
|
-
self.clarifications_by_id = {clarification["id"] for clarification in self.clarifications}
|
|
65
|
+
self.clarifications_by_id = {clarification["id"]: clarification for clarification in self.clarifications}
|
|
66
66
|
|
|
67
67
|
self.contest = self._load_json_file("contest.json")
|
|
68
68
|
self.contest_state = self._load_json_file("state.json")
|
|
@@ -71,14 +71,14 @@ class ContestPackageReader(BaseContestReader):
|
|
|
71
71
|
self.groups_by_id = {group["id"]: group for group in self.groups}
|
|
72
72
|
|
|
73
73
|
self.judgement_types = self._load_json_file("judgement-types.json")
|
|
74
|
-
self.judgement_types_by_id = {judgement_type["id"] for judgement_type in self.judgement_types}
|
|
74
|
+
self.judgement_types_by_id = {judgement_type["id"]: judgement_type for judgement_type in self.judgement_types}
|
|
75
75
|
|
|
76
76
|
self.judgements = self._load_json_file("judgements.json")
|
|
77
|
-
self.judgements_by_id = {judgement["id"] for judgement in self.judgements}
|
|
77
|
+
self.judgements_by_id = {judgement["id"]: judgement for judgement in self.judgements}
|
|
78
78
|
self.judgements_by_submission_id = self._create_index_by_id(self.judgements, "submission_id")
|
|
79
79
|
|
|
80
80
|
self.languages = self._load_json_file("languages.json")
|
|
81
|
-
self.languages_by_id = {language["id"] for language in self.languages}
|
|
81
|
+
self.languages_by_id = {language["id"]: language for language in self.languages}
|
|
82
82
|
|
|
83
83
|
self.organizations = self._load_json_file("organizations.json")
|
|
84
84
|
self.organizations_by_id = {org["id"]: org for org in self.organizations}
|
|
@@ -87,7 +87,7 @@ class ContestPackageReader(BaseContestReader):
|
|
|
87
87
|
self.problems_by_id = {problem["id"]: problem for problem in self.problems}
|
|
88
88
|
|
|
89
89
|
self.runs = self._load_json_file("runs.json")
|
|
90
|
-
self.runs_by_id = {run["id"] for run in self.runs}
|
|
90
|
+
self.runs_by_id = {run["id"]: run for run in self.runs}
|
|
91
91
|
self.runs_by_judgement_id = self._create_index_by_id(self.runs, "judgement_id")
|
|
92
92
|
|
|
93
93
|
self.submissions = self._load_json_file("submissions.json")
|
xcpcio/types.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Dict, List, Literal, Optional, Union
|
|
1
|
+
from typing import Any, Dict, List, Literal, Optional, Union
|
|
2
2
|
|
|
3
3
|
from pydantic import BaseModel, Field, RootModel
|
|
4
4
|
|
|
@@ -88,6 +88,7 @@ class BalloonColor(BaseModel):
|
|
|
88
88
|
|
|
89
89
|
class Person(BaseModel):
|
|
90
90
|
name: Text
|
|
91
|
+
|
|
91
92
|
cf_id: Optional[str] = None
|
|
92
93
|
icpc_id: Optional[str] = None
|
|
93
94
|
|
|
@@ -98,9 +99,12 @@ Persons = List[Person]
|
|
|
98
99
|
class Problem(BaseModel):
|
|
99
100
|
id: str
|
|
100
101
|
label: str
|
|
102
|
+
|
|
101
103
|
name: Optional[Text] = None
|
|
104
|
+
|
|
102
105
|
time_limit: Optional[str] = None
|
|
103
106
|
memory_limit: Optional[str] = None
|
|
107
|
+
|
|
104
108
|
balloon_color: Optional[BalloonColor] = None
|
|
105
109
|
|
|
106
110
|
|
|
@@ -112,8 +116,7 @@ class SubmissionReaction(BaseModel):
|
|
|
112
116
|
|
|
113
117
|
|
|
114
118
|
class Submission(BaseModel):
|
|
115
|
-
id:
|
|
116
|
-
submission_id: Optional[str] = None
|
|
119
|
+
id: str = None
|
|
117
120
|
|
|
118
121
|
team_id: str = ""
|
|
119
122
|
problem_id: Union[int, str] = 0
|
|
@@ -144,11 +147,12 @@ class Team(BaseModel):
|
|
|
144
147
|
members: Optional[Union[Text, List[Text], Persons]] = None
|
|
145
148
|
|
|
146
149
|
badge: Optional[Image] = None
|
|
150
|
+
photo: Optional[Image] = None
|
|
147
151
|
|
|
148
152
|
location: Optional[str] = None
|
|
149
153
|
icpc_id: Optional[str] = None
|
|
150
154
|
|
|
151
|
-
extra: Dict[str,
|
|
155
|
+
extra: Dict[str, Any] = Field(default_factory=dict, exclude=True)
|
|
152
156
|
|
|
153
157
|
def add_group(self, group: str):
|
|
154
158
|
if group not in self.group:
|
|
@@ -166,9 +170,13 @@ class Teams(RootModel[List[Team]]):
|
|
|
166
170
|
class ContestOptions(BaseModel):
|
|
167
171
|
calculation_of_penalty: Optional[CalculationOfPenalty] = None
|
|
168
172
|
submission_timestamp_unit: Optional[TimeUnit] = None
|
|
173
|
+
|
|
169
174
|
has_reaction_videos: Optional[bool] = None
|
|
170
175
|
reaction_video_url_template: Optional[str] = None
|
|
171
176
|
|
|
177
|
+
has_team_photos: Optional[bool] = None
|
|
178
|
+
team_photo_url_template: Optional[Image] = None
|
|
179
|
+
|
|
172
180
|
|
|
173
181
|
class Contest(BaseModel):
|
|
174
182
|
contest_name: Text = ""
|
|
@@ -202,9 +210,9 @@ class Contest(BaseModel):
|
|
|
202
210
|
|
|
203
211
|
version: Optional[str] = None
|
|
204
212
|
|
|
205
|
-
options: ContestOptions =
|
|
213
|
+
options: Optional[ContestOptions] = None
|
|
206
214
|
|
|
207
|
-
unfrozen_time: int = 0x3F3F3F3F3F3F3F3F
|
|
215
|
+
unfrozen_time: int = Field(default=0x3F3F3F3F3F3F3F3F, exclude=True)
|
|
208
216
|
|
|
209
217
|
def append_balloon_color(self, color: BalloonColor):
|
|
210
218
|
if self.balloon_color is None:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
xcpcio/__init__.py,sha256=NB6wpVr5JUrOx2vLIQSVtYuCz0d7kNFE39TSQlvoENk,125
|
|
2
|
-
xcpcio/__version__.py,sha256=
|
|
2
|
+
xcpcio/__version__.py,sha256=hyo-3iohaQ41S-kIqqkNNfhikrZkNXkq9-_yO6Bepns,172
|
|
3
3
|
xcpcio/constants.py,sha256=MjpAgNXiBlUsx1S09m7JNT-nekNDR-aE6ggvGL3fg0I,2297
|
|
4
|
-
xcpcio/types.py,sha256=
|
|
4
|
+
xcpcio/types.py,sha256=pywzrvhjLEC-rzLKXB5LZu7pL75vcvAPWMsTq9JS5sE,7493
|
|
5
5
|
xcpcio/api/__init__.py,sha256=B9gLdAlR3FD7070cvAC5wAwMy3iV63I8hh4mUrnrKpk,274
|
|
6
6
|
xcpcio/api/client.py,sha256=BuzH8DbJYudJ-Kne-2XziLW__B_7iEqElJ4n2SGZCoY,2374
|
|
7
7
|
xcpcio/api/models.py,sha256=_dChApnIHVNN3hEL7mR5zonq8IUcxW_h7z1kUz6reSs,772
|
|
@@ -38,9 +38,9 @@ xcpcio/clics/model/__init__.py,sha256=cZE1q5JY-iHDEKZpsx0UZaMhH-23H4oAHaYOkW7dZ5
|
|
|
38
38
|
xcpcio/clics/model/model_2023_06/__init__.py,sha256=VzBaFcAwYw9G18p0Lh7rNPrvchyaYx_jgw6YE4W1yNg,168
|
|
39
39
|
xcpcio/clics/model/model_2023_06/model.py,sha256=bVMDWpJTwPSpz1fHPxWrWerxCBIboH3LKVZpIZGQ2pY,15287
|
|
40
40
|
xcpcio/clics/reader/__init__.py,sha256=Nfi78X8J1tJPh7WeSRPLMRUprlS2JYelYJHW4DfyJ7U,162
|
|
41
|
-
xcpcio/clics/reader/contest_package_reader.py,sha256=
|
|
41
|
+
xcpcio/clics/reader/contest_package_reader.py,sha256=xalN6sR8qTjwiBtass9De9FlQqprctvZsiTpVphRtCc,14252
|
|
42
42
|
xcpcio/clics/reader/interface.py,sha256=lK2JXU1n8GJ4PecXnfFBijMaCVLYk404e4QwV_Ti2Hk,3918
|
|
43
|
-
xcpcio-0.
|
|
44
|
-
xcpcio-0.
|
|
45
|
-
xcpcio-0.
|
|
46
|
-
xcpcio-0.
|
|
43
|
+
xcpcio-0.66.0.dist-info/METADATA,sha256=fz3fDFECLokIJAnV8IZLDYiUb2KI_PK-2-FayOU9pKs,2233
|
|
44
|
+
xcpcio-0.66.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
45
|
+
xcpcio-0.66.0.dist-info/entry_points.txt,sha256=JYkvmmxKFWv0EBU6Ys65XsjkOO02KGlzASau0GX9TQ8,110
|
|
46
|
+
xcpcio-0.66.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|