rbx.cp 0.18.4__py3-none-any.whl → 0.18.6__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/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.18.4'
1
+ __version__ = '0.18.6'
rbx/box/generators.py CHANGED
@@ -43,6 +43,10 @@ class ValidationError(RbxException):
43
43
  pass
44
44
 
45
45
 
46
+ class GenerationError(RbxException):
47
+ pass
48
+
49
+
46
50
  def _compile_generator(generator: CodeItem) -> str:
47
51
  return compile_item(generator, sanitized=SanitizationLevel.PREFER)
48
52
 
@@ -307,18 +311,15 @@ async def generate_standalone(
307
311
  extra_args=call.args or None,
308
312
  )
309
313
  if not generation_log or generation_log.exitcode != 0:
310
- _print_error_header()
311
- if generation_log is not None:
312
- console.console.print(
313
- f'[error]Summary:[/error] {generation_log.get_summary()}'
314
- )
315
- if generation_stderr.value is not None:
316
- console.console.print('[error]Stderr:[/error]')
317
- console.console.print(
318
- package.get_digest_as_string(generation_stderr.value) or ''
319
- )
320
-
321
- raise typer.Exit(1)
314
+ with GenerationError() as err:
315
+ _print_error_header(err.console)
316
+ if generation_log is not None:
317
+ err.print(f'[error]Summary:[/error] {generation_log.get_summary()}')
318
+ if generation_stderr.value is not None:
319
+ err.print('[error]Stderr:[/error]')
320
+ err.print(
321
+ package.get_digest_as_string(generation_stderr.value) or '',
322
+ )
322
323
  elif spec.copied_from is not None:
323
324
  _copy_testcase_over(spec.copied_from, spec.copied_to)
324
325
 
rbx/box/stresses.py CHANGED
@@ -13,6 +13,7 @@ from rbx import console, utils
13
13
  from rbx.box import checkers, generators, package, tasks, validators
14
14
  from rbx.box.code import SanitizationLevel, compile_item
15
15
  from rbx.box.generators import (
16
+ GenerationError,
16
17
  GenerationMetadata,
17
18
  ValidationError,
18
19
  expand_generator_call,
@@ -169,7 +170,7 @@ async def run_stress(
169
170
  if compiled_validator is not None
170
171
  else None,
171
172
  )
172
- except ValidationError as err:
173
+ except (ValidationError, GenerationError) as err:
173
174
  if skip_invalid_testcases:
174
175
  skipped += 1
175
176
  continue
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  # yaml-language-server: $schema=https://rsalesc.github.io/rbx/schemas/Preset.json
3
3
  name: "default"
4
- min_version: "0.18.4"
4
+ min_version: "0.18.6"
5
5
  uri: "rsalesc/rbx/rbx/resources/presets/default"
6
6
  problem: "problem"
7
7
  contest: "contest"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: rbx.cp
3
- Version: 0.18.4
3
+ Version: 0.18.6
4
4
  Summary:
5
5
  Author: Roberto Sales
6
6
  Requires-Python: >=3.9.1,<4.0.0
@@ -1,5 +1,5 @@
1
1
  rbx/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- rbx/__version__.py,sha256=9JAsMNke2ijGxNJ6ek-0L9k7GoLH2-C3Oy7ANrPQjCc,23
2
+ rbx/__version__.py,sha256=P-caO5cD30pqZNyLpkN2n7yzwCR7fGNjSt6QTn-McBw,23
3
3
  rbx/annotations.py,sha256=_TkLhgZWiUyon3bonHwUo03ls1jY8LwgcR4bVgtgnc0,3519
4
4
  rbx/autoenum.py,sha256=cusv8ClXRlDVvhZ8eDrtYcL_2peXlHugAey_ht8roXk,12025
5
5
  rbx/box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -25,7 +25,7 @@ rbx/box/exception.py,sha256=pAZH4-yw5SaBj537rck-B0mNTlEF08hrmYnfZOE0XC8,2038
25
25
  rbx/box/extensions.py,sha256=Von8kIeXvNFTkGlMRMTvL2HIHPwlkuiMswr-ydbGV1w,519
26
26
  rbx/box/fields.py,sha256=Gsox7Q1M7I8I2FtKvwiAfYUC6USpwghk8fel2Q9Eyhg,2291
27
27
  rbx/box/formatting.py,sha256=i3vXHpo_L_VpVPxOe4wHlai1WhlDJlfxUexS9DC0Szg,1249
28
- rbx/box/generators.py,sha256=k7pFcbym3rfH8xVTB6-kqyh6bt_goRD-LfV61pKx1K8,17885
28
+ rbx/box/generators.py,sha256=sn7a4NCAQ0KPO_5Ujcjtv6Z9D816WP0JpBuDFztTXBk,17913
29
29
  rbx/box/git_utils.py,sha256=wuM_k5RgCz5lvoiBciSHo5XT1BdNLhXB0hBlGsc08Vs,2140
30
30
  rbx/box/global_package.py,sha256=YfFGw2vxFspF2v3phBEeBCrLe1sfbANrctGqii3I2X4,2106
31
31
  rbx/box/header.py,sha256=OZJD2J0fdIiYyiEAwQ3x3M8TwM1v1J9nhIjnPVz4Zy8,3029
@@ -75,7 +75,7 @@ rbx/box/statements/latex.py,sha256=JpPBihuwwgTRHSdULX7gBLA-V245wIy4g57p4ZM9gbQ,1
75
75
  rbx/box/statements/latex_jinja.py,sha256=UQyD3hOFsiEQdFjqMswRrPXyGCiRPgnzZPmAcvJuPyM,11671
76
76
  rbx/box/statements/schema.py,sha256=zCjpSsq24V179pS7Pti82x4gIpIMogNP6u1EQxdWolE,5529
77
77
  rbx/box/stats.py,sha256=rUAnmp7kTgUvIQ56NLpQaIQkazB37MVcUos5en3xUQw,3258
78
- rbx/box/stresses.py,sha256=H8cNn9MJejZ9PZK-o5WxzaDQlc53_BKO-Fn_TPg2s5E,12994
78
+ rbx/box/stresses.py,sha256=F7pkFHp-pk7zpO6KikanFx91cNKyTJ54Xezp_skfWUg,13034
79
79
  rbx/box/stressing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
80
80
  rbx/box/stressing/finder_parser.py,sha256=PnONJD2yun5X5EmHqkaz-rh3DHhn_BkTPHZrIXRKZbw,11898
81
81
  rbx/box/stressing/generator_parser.py,sha256=iIWFVPhbdnBZD3zGGDooZ6BWuQ0lRbehqpzc7i_nBeo,7429
@@ -201,7 +201,7 @@ rbx/resources/presets/default/contest/statement/info.rbx.tex,sha256=Wz8Tbmi2lPWM
201
201
  rbx/resources/presets/default/contest/statement/instructions.tex,sha256=JG_eR13ukZgEahrrmrbg40H8cUzpoUE8QLocihN-fZ8,2414
202
202
  rbx/resources/presets/default/contest/statement/logo.png,sha256=RLNYmZoc-BR6AZKkmr4UEg3h01YeFzvy604jMAQC7aA,414485
203
203
  rbx/resources/presets/default/env.rbx.yml,sha256=9MaKkSc289LrwATbMgIEFpuUayrJwdFBSw4rWY1TS0c,2098
204
- rbx/resources/presets/default/preset.rbx.yml,sha256=ew0zCqanJkzhxULKncK9ktvmzqgc9miRj-RHJdCPCnM,520
204
+ rbx/resources/presets/default/preset.rbx.yml,sha256=F9aJMGN017A4McIyFXRG9Dd2MbEu8X4lDBduKjsATw4,520
205
205
  rbx/resources/presets/default/problem/.gitignore,sha256=1rt95y9Q7ZHIQn28JyZQUdD5zkpRosjAl9ZqoQmX2cE,149
206
206
  rbx/resources/presets/default/problem/gens/gen.cpp,sha256=rn6sGRjZ1sFE1Rq02r6488iquY9xTrutcvLv4d1sohA,178
207
207
  rbx/resources/presets/default/problem/manual_tests/samples/000.in,sha256=w66OEtCJGqjUNj8cJrqgImgGVm8W_OlIUtF255ds-ow,4
@@ -223,8 +223,8 @@ rbx/resources/templates/rbx.h,sha256=0AZds9R0PmuPgnlTENb33Y81LW0LlnmOJFaoN8oG3Yo
223
223
  rbx/resources/templates/template.cpp,sha256=xXWpWo7fa7HfmPNqkmHcmv3i46Wm0ZL-gPmkRfGvLn4,317
224
224
  rbx/testing_utils.py,sha256=vNNdaytowJfuopszVHeFzVtHWlPfipPW4zpqCOvdZKU,2908
225
225
  rbx/utils.py,sha256=zOXjEkEN9tlzLliWpssNTSmcvdgveUWDdo427qI3dhM,12225
226
- rbx_cp-0.18.4.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
227
- rbx_cp-0.18.4.dist-info/METADATA,sha256=YpJPh094Q6VOfS32IJFcGX8oLSGbKccxoJHK33Gqk00,4845
228
- rbx_cp-0.18.4.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
229
- rbx_cp-0.18.4.dist-info/entry_points.txt,sha256=Gw2_BZ5Jon61biaH_ETbAQGXy8fR5On9gw2U4A1erpo,40
230
- rbx_cp-0.18.4.dist-info/RECORD,,
226
+ rbx_cp-0.18.6.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
227
+ rbx_cp-0.18.6.dist-info/METADATA,sha256=Gw7GmIC2L4JUCDA3GMUKw2WisXeQuXItU1JCZX05y-s,4845
228
+ rbx_cp-0.18.6.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
229
+ rbx_cp-0.18.6.dist-info/entry_points.txt,sha256=Gw2_BZ5Jon61biaH_ETbAQGXy8fR5On9gw2U4A1erpo,40
230
+ rbx_cp-0.18.6.dist-info/RECORD,,