rbx.cp 0.5.4__py3-none-any.whl → 0.5.5__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.
- rbx/box/contest/main.py +5 -3
- rbx/box/generators.py +1 -1
- rbx/box/main.py +9 -2
- rbx/box/package.py +8 -0
- {rbx_cp-0.5.4.dist-info → rbx_cp-0.5.5.dist-info}/METADATA +1 -1
- {rbx_cp-0.5.4.dist-info → rbx_cp-0.5.5.dist-info}/RECORD +9 -9
- {rbx_cp-0.5.4.dist-info → rbx_cp-0.5.5.dist-info}/LICENSE +0 -0
- {rbx_cp-0.5.4.dist-info → rbx_cp-0.5.5.dist-info}/WHEEL +0 -0
- {rbx_cp-0.5.4.dist-info → rbx_cp-0.5.5.dist-info}/entry_points.txt +0 -0
rbx/box/contest/main.py
CHANGED
@@ -133,20 +133,22 @@ def add(name: str, short_name: str, preset: Optional[str] = None):
|
|
133
133
|
preset_lock = presets.get_preset_lock()
|
134
134
|
if preset is None and preset_lock is not None:
|
135
135
|
preset = preset_lock.preset_name
|
136
|
-
creation.create(name, preset=preset, path=pathlib.Path(
|
136
|
+
creation.create(name, preset=preset, path=pathlib.Path(name))
|
137
137
|
|
138
138
|
contest = find_contest_package_or_die()
|
139
139
|
# Reassign mutable object before saving.
|
140
140
|
contest.problems = sorted(
|
141
141
|
[
|
142
142
|
*contest.problems,
|
143
|
-
ContestProblem(short_name=short_name, path=pathlib.Path(
|
143
|
+
ContestProblem(short_name=short_name, path=pathlib.Path(name)),
|
144
144
|
],
|
145
145
|
key=lambda p: p.short_name,
|
146
146
|
)
|
147
147
|
|
148
148
|
save_contest(contest)
|
149
|
-
console.console.print(
|
149
|
+
console.console.print(
|
150
|
+
f'Problem [item]{name} ({short_name})[/item] added to contest.'
|
151
|
+
)
|
150
152
|
|
151
153
|
|
152
154
|
@app.command(
|
rbx/box/generators.py
CHANGED
@@ -349,7 +349,7 @@ def generate_standalone(
|
|
349
349
|
|
350
350
|
raise typer.Exit(1)
|
351
351
|
|
352
|
-
validator = package.
|
352
|
+
validator = package.get_validator_or_nil()
|
353
353
|
# Run validator, if it is available.
|
354
354
|
if validator is not None and validate:
|
355
355
|
if validator_digest is None:
|
rbx/box/main.py
CHANGED
@@ -266,10 +266,17 @@ def stress(
|
|
266
266
|
),
|
267
267
|
] = None,
|
268
268
|
timeout: Annotated[
|
269
|
-
int,
|
269
|
+
int,
|
270
|
+
typer.Option(
|
271
|
+
'--timeout',
|
272
|
+
'--time',
|
273
|
+
'-t',
|
274
|
+
help='For how many seconds to run the stress test.',
|
275
|
+
),
|
270
276
|
] = 10,
|
271
277
|
findings: Annotated[
|
272
|
-
int,
|
278
|
+
int,
|
279
|
+
typer.Option('--findings', '-n', help='How many breaking tests to look for.'),
|
273
280
|
] = 1,
|
274
281
|
verbose: bool = typer.Option(
|
275
282
|
False,
|
rbx/box/package.py
CHANGED
@@ -209,6 +209,14 @@ def get_validator(root: pathlib.Path = pathlib.Path()) -> CodeItem:
|
|
209
209
|
return package.validator
|
210
210
|
|
211
211
|
|
212
|
+
@functools.cache
|
213
|
+
def get_validator_or_nil(root: pathlib.Path = pathlib.Path()) -> Optional[CodeItem]:
|
214
|
+
package = find_problem_package_or_die(root)
|
215
|
+
if package.validator is None:
|
216
|
+
return None
|
217
|
+
return package.validator
|
218
|
+
|
219
|
+
|
212
220
|
@functools.cache
|
213
221
|
def get_checker(root: pathlib.Path = pathlib.Path()) -> CodeItem:
|
214
222
|
package = find_problem_package_or_die(root)
|
@@ -12,17 +12,17 @@ rbx/box/contest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
rbx/box/contest/build_contest_statements.py,sha256=qar6h5u1xAlOKHl3P7-A1d0aYtaqu4PspGw_DYUGOLY,11260
|
13
13
|
rbx/box/contest/contest_package.py,sha256=-eHk6CfJ083jZptWCjR0F4x_r9qsmKeSOUvK0QnDyA4,2393
|
14
14
|
rbx/box/contest/contest_utils.py,sha256=vWv4iNWdJT5motAznfdNzl8o-tEoCU4xmdyaPTPJZuY,490
|
15
|
-
rbx/box/contest/main.py,sha256=
|
15
|
+
rbx/box/contest/main.py,sha256=ERMon3vpayMfpJfAPGp51dsNox38R8orqi1v1rKhAMg,5701
|
16
16
|
rbx/box/contest/schema.py,sha256=rxzjJasMWPKKhvSJs4eW4A2oCiA4gXgfF-MzqsbPslQ,4914
|
17
17
|
rbx/box/contest/statements.py,sha256=iG_E4bqhc7hof4LlAliw4m9VO8HcDzvnhsWmxzVRQM4,2690
|
18
18
|
rbx/box/creation.py,sha256=mZ7kEt1F-0scwDBc6oWsJxFRW69AccZlKuJfN1QyDd4,2203
|
19
19
|
rbx/box/download.py,sha256=MFP-R26JiYGAP89I0TK-0fYc69Fsd20tsBqgtRCy5AE,2234
|
20
20
|
rbx/box/environment.py,sha256=i-IGHDyFDaYF1fyr0QHdGZ3z4NWp5sj6nxsbnxhAYq4,10924
|
21
21
|
rbx/box/extensions.py,sha256=p0iLaU28KswOBDX2HGVO_dR2gk-JSAWb6sXC6GZ1d0w,738
|
22
|
-
rbx/box/generators.py,sha256=
|
22
|
+
rbx/box/generators.py,sha256=27Q8sVWTG4d8UT6Si-YJ83zZ3jEnu1Urmk-audRYoFk,16111
|
23
23
|
rbx/box/generators_test.py,sha256=mQqHepAMYa6zV_PseQALI0nIX6AdQktt6lh94muFhNw,1758
|
24
|
-
rbx/box/main.py,sha256=
|
25
|
-
rbx/box/package.py,sha256=
|
24
|
+
rbx/box/main.py,sha256=DA0B_OmWmeWj_xpNEKs5syQEmg2_zbOrTGZVVK3eW0o,13639
|
25
|
+
rbx/box/package.py,sha256=UR3BxVbTZ6eYJfdsTTx4l8FfdZ1wsnaHAmAdMr07lww,10302
|
26
26
|
rbx/box/packaging/boca/extension.py,sha256=hQhcbocNfW2ESv5RalS1wf6uvOoOfOnR_gHvbXUbSzY,852
|
27
27
|
rbx/box/packaging/boca/packager.py,sha256=FOhSRg5K5Y4qNB0WyTR3DKgrpObf9I0JbyGpJHOtxpo,10673
|
28
28
|
rbx/box/packaging/contest_main.py,sha256=ypiBS8dd0yCqoFJIqiK1Fo02dQmUB_G-Z7G926jomrk,2746
|
@@ -157,8 +157,8 @@ rbx/testdata/caching/executable.py,sha256=WKRHNf_fprFJd1Fq1ubmQtR3mZzTYVNwKPLWuZ
|
|
157
157
|
rbx/testdata/compatible,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
158
158
|
rbx/testing_utils.py,sha256=ZZLKMUHlZ4HwsuNY50jqSBJ9HhpnFdba7opjDsvXE1U,2084
|
159
159
|
rbx/utils.py,sha256=OkOLjNG8Pq7y2ylqhXQyAOVDfUsva_4Mfjd8OmII55E,4145
|
160
|
-
rbx_cp-0.5.
|
161
|
-
rbx_cp-0.5.
|
162
|
-
rbx_cp-0.5.
|
163
|
-
rbx_cp-0.5.
|
164
|
-
rbx_cp-0.5.
|
160
|
+
rbx_cp-0.5.5.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
161
|
+
rbx_cp-0.5.5.dist-info/METADATA,sha256=P2zt0uKaZefpPvDBIsVg0Hbk2aGSFKV9ohgNZIFrcDg,3253
|
162
|
+
rbx_cp-0.5.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
163
|
+
rbx_cp-0.5.5.dist-info/entry_points.txt,sha256=qBTLBOeifT1F00LWaEewRRE_jQPgvH7BUdJfZ-dYsFU,57
|
164
|
+
rbx_cp-0.5.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|