xcpcio 0.65.0__py3-none-any.whl → 0.65.2__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/types.py +28 -25
- {xcpcio-0.65.0.dist-info → xcpcio-0.65.2.dist-info}/METADATA +1 -1
- {xcpcio-0.65.0.dist-info → xcpcio-0.65.2.dist-info}/RECORD +6 -6
- {xcpcio-0.65.0.dist-info → xcpcio-0.65.2.dist-info}/WHEEL +0 -0
- {xcpcio-0.65.0.dist-info → xcpcio-0.65.2.dist-info}/entry_points.txt +0 -0
xcpcio/__version__.py
CHANGED
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
|
|
|
@@ -74,15 +74,6 @@ class I18NStringSet(BaseModel):
|
|
|
74
74
|
Text = Union[str, I18NStringSet]
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
class Person(BaseModel):
|
|
78
|
-
name: Text
|
|
79
|
-
cf_id: Optional[str] = None
|
|
80
|
-
icpc_id: Optional[str] = None
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
Persons = List[Person]
|
|
84
|
-
|
|
85
|
-
|
|
86
77
|
class Image(BaseModel):
|
|
87
78
|
url: Optional[str] = None
|
|
88
79
|
base64: Optional[str] = None
|
|
@@ -95,12 +86,25 @@ class BalloonColor(BaseModel):
|
|
|
95
86
|
background_color: str
|
|
96
87
|
|
|
97
88
|
|
|
89
|
+
class Person(BaseModel):
|
|
90
|
+
name: Text
|
|
91
|
+
|
|
92
|
+
cf_id: Optional[str] = None
|
|
93
|
+
icpc_id: Optional[str] = None
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
Persons = List[Person]
|
|
97
|
+
|
|
98
|
+
|
|
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
|
|
|
@@ -108,12 +112,11 @@ Problems = List[Problem]
|
|
|
108
112
|
|
|
109
113
|
|
|
110
114
|
class SubmissionReaction(BaseModel):
|
|
111
|
-
url:
|
|
115
|
+
url: str
|
|
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
|
|
@@ -129,7 +132,7 @@ class Submission(BaseModel):
|
|
|
129
132
|
|
|
130
133
|
|
|
131
134
|
class Submissions(RootModel[List[Submission]]):
|
|
132
|
-
|
|
135
|
+
pass
|
|
133
136
|
|
|
134
137
|
|
|
135
138
|
class Team(BaseModel):
|
|
@@ -138,7 +141,7 @@ class Team(BaseModel):
|
|
|
138
141
|
|
|
139
142
|
organization: str = ""
|
|
140
143
|
group: List[str] = Field(default_factory=list)
|
|
141
|
-
tag: List[str] =
|
|
144
|
+
tag: Optional[List[str]] = None
|
|
142
145
|
|
|
143
146
|
coaches: Optional[Union[Text, List[Text], Persons]] = None
|
|
144
147
|
members: Optional[Union[Text, List[Text], Persons]] = None
|
|
@@ -148,7 +151,7 @@ class Team(BaseModel):
|
|
|
148
151
|
location: Optional[str] = None
|
|
149
152
|
icpc_id: Optional[str] = None
|
|
150
153
|
|
|
151
|
-
extra: Dict[str,
|
|
154
|
+
extra: Dict[str, Any] = Field(default_factory=dict, exclude=True)
|
|
152
155
|
|
|
153
156
|
def add_group(self, group: str):
|
|
154
157
|
if group not in self.group:
|
|
@@ -179,14 +182,13 @@ class Contest(BaseModel):
|
|
|
179
182
|
|
|
180
183
|
freeze_time: Optional[Union[int, DateTimeISO8601String]] = None
|
|
181
184
|
frozen_time: int = 60 * 60 # unit: seconds
|
|
182
|
-
unfrozen_time: int = 0x3F3F3F3F3F3F3F3F
|
|
183
185
|
|
|
184
186
|
problems: Optional[Problems] = None
|
|
185
|
-
|
|
186
|
-
problem_id: List[str] =
|
|
187
|
+
|
|
188
|
+
problem_id: Optional[List[str]] = None
|
|
187
189
|
balloon_color: Optional[List[BalloonColor]] = None
|
|
188
190
|
|
|
189
|
-
status_time_display:
|
|
191
|
+
status_time_display: Dict[str, bool] = constants.FULL_STATUS_TIME_DISPLAY
|
|
190
192
|
|
|
191
193
|
badge: Optional[str] = None
|
|
192
194
|
organization: str = "School"
|
|
@@ -203,7 +205,9 @@ class Contest(BaseModel):
|
|
|
203
205
|
|
|
204
206
|
version: Optional[str] = None
|
|
205
207
|
|
|
206
|
-
options: ContestOptions =
|
|
208
|
+
options: Optional[ContestOptions] = None
|
|
209
|
+
|
|
210
|
+
unfrozen_time: int = Field(default=0x3F3F3F3F3F3F3F3F, exclude=True)
|
|
207
211
|
|
|
208
212
|
def append_balloon_color(self, color: BalloonColor):
|
|
209
213
|
if self.balloon_color is None:
|
|
@@ -211,8 +215,8 @@ class Contest(BaseModel):
|
|
|
211
215
|
self.balloon_color.append(color)
|
|
212
216
|
return self
|
|
213
217
|
|
|
214
|
-
def fill_problem_id(self):
|
|
215
|
-
self.problem_id = [chr(ord("A") + i) for i in range(
|
|
218
|
+
def fill_problem_id(self, problem_quantity: int):
|
|
219
|
+
self.problem_id = [chr(ord("A") + i) for i in range(problem_quantity)]
|
|
216
220
|
return self
|
|
217
221
|
|
|
218
222
|
def fill_balloon_color(self):
|
|
@@ -232,7 +236,6 @@ class Contest(BaseModel):
|
|
|
232
236
|
BalloonColor(background_color="rgba(144, 238, 144, 0.7)", color="#000"),
|
|
233
237
|
BalloonColor(background_color="rgba(77, 57, 0, 0.7)", color="#fff"),
|
|
234
238
|
]
|
|
235
|
-
|
|
236
|
-
self.balloon_color = default_balloon_color_list[: self.problem_quantity]
|
|
239
|
+
self.balloon_color = default_balloon_color_list[: len(self.problem_id)]
|
|
237
240
|
|
|
238
241
|
return self
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
xcpcio/__init__.py,sha256=NB6wpVr5JUrOx2vLIQSVtYuCz0d7kNFE39TSQlvoENk,125
|
|
2
|
-
xcpcio/__version__.py,sha256=
|
|
2
|
+
xcpcio/__version__.py,sha256=ey9T-9pBnp9aZNE4xhvZ-hAcytzr8f8UXwMU7DrQ7uM,172
|
|
3
3
|
xcpcio/constants.py,sha256=MjpAgNXiBlUsx1S09m7JNT-nekNDR-aE6ggvGL3fg0I,2297
|
|
4
|
-
xcpcio/types.py,sha256=
|
|
4
|
+
xcpcio/types.py,sha256=mvkI8ulxYAqPOED-fy8JaHEd2jFwkgpiAMA9oAD5i7Y,7362
|
|
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
|
|
@@ -40,7 +40,7 @@ xcpcio/clics/model/model_2023_06/model.py,sha256=bVMDWpJTwPSpz1fHPxWrWerxCBIboH3
|
|
|
40
40
|
xcpcio/clics/reader/__init__.py,sha256=Nfi78X8J1tJPh7WeSRPLMRUprlS2JYelYJHW4DfyJ7U,162
|
|
41
41
|
xcpcio/clics/reader/contest_package_reader.py,sha256=0wIzQp4zzdaB10zMY4WALLIeoXcMuhMJ6nRrfKxWhgw,14179
|
|
42
42
|
xcpcio/clics/reader/interface.py,sha256=lK2JXU1n8GJ4PecXnfFBijMaCVLYk404e4QwV_Ti2Hk,3918
|
|
43
|
-
xcpcio-0.65.
|
|
44
|
-
xcpcio-0.65.
|
|
45
|
-
xcpcio-0.65.
|
|
46
|
-
xcpcio-0.65.
|
|
43
|
+
xcpcio-0.65.2.dist-info/METADATA,sha256=FuiYX95vr76YMn8V9iImd0pk-lTB1t3RnyOXr_f9EG8,2233
|
|
44
|
+
xcpcio-0.65.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
45
|
+
xcpcio-0.65.2.dist-info/entry_points.txt,sha256=JYkvmmxKFWv0EBU6Ys65XsjkOO02KGlzASau0GX9TQ8,110
|
|
46
|
+
xcpcio-0.65.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|