rbx.cp 0.10.2__py3-none-any.whl → 0.11.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.
@@ -1,3 +1,4 @@
1
+ import subprocess
1
2
  from typing import Annotated, List, Optional
2
3
 
3
4
  import syncer
@@ -54,6 +55,10 @@ async def build(
54
55
  help='Variables to be used in the statements.',
55
56
  ),
56
57
  ] = None,
58
+ install_tex: Annotated[
59
+ bool,
60
+ typer.Option(help='Whether to install missing LaTeX packages.'),
61
+ ] = False,
57
62
  ):
58
63
  contest = find_contest_package_or_die()
59
64
  # At most run the validators, only in samples.
@@ -97,6 +102,9 @@ async def build(
97
102
 
98
103
  built_statements = []
99
104
 
105
+ if install_tex:
106
+ output = StatementType.TeX
107
+
100
108
  for statement in valid_statements:
101
109
  built_statements.append(
102
110
  build_statement(
@@ -110,6 +118,13 @@ async def build(
110
118
 
111
119
  console.console.rule(title='Built statements')
112
120
  for statement, built_path in zip(valid_statements, built_statements):
121
+ if install_tex:
122
+ subprocess.run(
123
+ [
124
+ 'texliveonfly',
125
+ built_path,
126
+ ]
127
+ )
113
128
  console.console.print(
114
129
  f'[item]{statement.name} {statement.language}[/item] -> {href(built_path)}'
115
130
  )
@@ -832,7 +832,8 @@ def copy_tree_normalizing_gitdir(
832
832
  ):
833
833
  from rbx.box import git_utils
834
834
 
835
- shutil.copytree(str(src_path), str(dst_path), dirs_exist_ok=update)
835
+ shutil.copytree(str(src_path), str(dst_path), dirs_exist_ok=update, symlinks=True)
836
+
836
837
  if not (src_path / '.git').is_file():
837
838
  return
838
839
 
@@ -19,11 +19,14 @@ statements:
19
19
  template: "statement/template.rbx.tex"
20
20
  - name: "editorial-en"
21
21
  extends: "statement-en"
22
+ override:
23
+ vars:
24
+ # Whether to show the problem statement in the editorial.
25
+ show_problem: false
26
+ editorial: true
22
27
  vars:
23
28
  editorial: true
24
- watermark: true
25
- # Whether to show the problem statement in the editorial.
26
- show_problem: false
29
+ watermark: false
27
30
  vars:
28
31
  year: 2025
29
32
  date: "2025-06-21"
@@ -1,3 +1,4 @@
1
+ %- if vars.show_problem is truthy or vars.editorial is falsy
1
2
  \includeProblem
2
3
  %- if problem.short_name is defined
3
4
  [\VAR{problem.short_name}]
@@ -42,4 +43,8 @@
42
43
  \VAR{problem.blocks.notes}
43
44
  %- endif
44
45
  }
45
-
46
+ %- endif
47
+ %- if problem.blocks.editorial is nonnull and vars.editorial is truthy
48
+ \subsection*{\strSolution}
49
+ \VAR{problem.blocks.editorial}
50
+ %- endif
@@ -26,7 +26,7 @@
26
26
  \usepackage{amsmath}
27
27
 
28
28
  % Additional pandoc packages
29
- %\usepackage{lmodern} % or 'libertine' / 'times' for different fonts
29
+ \usepackage{lmodern} % or 'libertine' / 'times' for different fonts
30
30
  \usepackage{amssymb}
31
31
  \usepackage{microtype}
32
32
  \usepackage{graphicx}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: rbx.cp
3
- Version: 0.10.2
3
+ Version: 0.11.0
4
4
  Summary:
5
5
  Author: Roberto Sales
6
6
  Requires-Python: >=3.9.1,<4.0.0
@@ -15,7 +15,7 @@ rbx/box/contest/contest_package.py,sha256=r6BGq3S4Ezj3Ep7pCmtvz3SN44npb2_rKJEoT5
15
15
  rbx/box/contest/contest_utils.py,sha256=fsWHG1e65wq9zvRY3tdf32VF0nU1yzGTOBX5yjXiNk4,1102
16
16
  rbx/box/contest/main.py,sha256=e_DjbrwpXTFZQaVWJO7prJyehJ702GkVEAGEraRK6h4,8352
17
17
  rbx/box/contest/schema.py,sha256=eb7xtyq078YYWYHueximNhyHFINzwgLMFm1j9U3LxBQ,7461
18
- rbx/box/contest/statements.py,sha256=wTLmCO3VlGUcN-CzBf-uKUSOAbLUnDeZhdMcsIuF63A,3803
18
+ rbx/box/contest/statements.py,sha256=suVCqgzPc-MYm3dUpX11NJnM1-l5SbHr8SWdTMsQK10,4177
19
19
  rbx/box/creation.py,sha256=oTAC11XV2Pw2YAlF_d11Eo7A1fD6ItlpFMpLEzMLyFI,1331
20
20
  rbx/box/deferred.py,sha256=II3X9e87JCOZtmspnHh-n4PFqh-FsH_oc0XJHZ9ZYVQ,691
21
21
  rbx/box/download.py,sha256=tLW5gLVeLk0gHMEMwScSoHIXQPkXuPsqXzItsrsnUZY,3070
@@ -50,7 +50,7 @@ rbx/box/packaging/polygon/polygon_api.py,sha256=mPKEqiwANJ1nr-JhOgzGMaDhnbljsAgz
50
50
  rbx/box/packaging/polygon/test.py,sha256=bgEju5PwudgyfwxXJagm8fM6CJVlWM6l_-2q1V-oKaQ,3069
51
51
  rbx/box/packaging/polygon/upload.py,sha256=6dIbjwygKtirLBkbh40UgtHU1NHGxSMoFAtg2BcC2II,12902
52
52
  rbx/box/packaging/polygon/xml_schema.py,sha256=ZgcLyvxggMUccbTNdzflue5G-FTN2_ZmOGGF7FD0Y5A,2851
53
- rbx/box/presets/__init__.py,sha256=ccQVAkS5FFlQGMKUH05GhThSHmYChTVU8LABIjsat0c,33416
53
+ rbx/box/presets/__init__.py,sha256=L6fy_hetXnB8Eo_MO3oadv_ce2hwVW2J-BJm9CooEdA,33432
54
54
  rbx/box/presets/fetch.py,sha256=900aq9S8e12TlgSenG0iHgtF4OWgqavZsptgI_a1YKM,2508
55
55
  rbx/box/presets/lock_schema.py,sha256=8PKL7UMX4dkdVpCPLwYtaNIIrZpAfHGvTfnF8bRFedM,1708
56
56
  rbx/box/presets/schema.py,sha256=iOGWHqJ9Z-ljQV8ljOjQMuCwqJQLJKm_pYX9cLjZbmE,2432
@@ -203,7 +203,7 @@ rbx/resources/packagers/moj/scripts/py3/compile.sh,sha256=XPn8qDR_gPAAZD9h5lVEMd
203
203
  rbx/resources/packagers/moj/scripts/py3/prep.sh,sha256=it1e07QRpsnku3-rXOO1ovaw-RJlVVPy9R3I6WWwgMM,126
204
204
  rbx/resources/packagers/moj/scripts/py3/run.sh,sha256=LrMi7Tap9no8gh64QNGUXbWauP6ZpSl-wEwXZ2qhPo0,197
205
205
  rbx/resources/presets/default/contest/.gitignore,sha256=PQMEIEPz0BCdUko1UKhRhcMNhFKA9129LzbbflAGQ6w,30
206
- rbx/resources/presets/default/contest/contest.rbx.yml,sha256=RLjgB1YL28iV0-pNgDFhkug-PNjibh_YHGZ7dsUMR6U,821
206
+ rbx/resources/presets/default/contest/contest.rbx.yml,sha256=Q91BwE6F0gS7fi7qWelXis9dZ0rzAQbwA1l9gbFauY8,876
207
207
  rbx/resources/presets/default/contest/statement/contest.rbx.tex,sha256=Jx6op_WdVpQOMekvOAZnBzDxxvBzg1_9ZFWtbzGasLo,793
208
208
  rbx/resources/presets/default/contest/statement/instructions.tex,sha256=JG_eR13ukZgEahrrmrbg40H8cUzpoUE8QLocihN-fZ8,2414
209
209
  rbx/resources/presets/default/contest/statement/logo.png,sha256=RLNYmZoc-BR6AZKkmr4UEg3h01YeFzvy604jMAQC7aA,414485
@@ -223,8 +223,8 @@ rbx/resources/presets/default/problem/testplan/random.py,sha256=-iPorU24QHfp39EY
223
223
  rbx/resources/presets/default/problem/testplan/random.txt,sha256=2BA_AM8IAKEcrUTJhnzWnNJN8whDN82E2137NhFkt2U,137
224
224
  rbx/resources/presets/default/problem/validator.cpp,sha256=w4gl1u30Dx1N9oRTVtIg_rPlIyL6QdN_Bi5FDpp4gyw,317
225
225
  rbx/resources/presets/default/problem/wcmp.cpp,sha256=gbjJe3Vf9-YzHCEqBUq30aI3jMZXhqBDn3jjecYOn-w,902
226
- rbx/resources/presets/default/shared/contest_template.rbx.tex,sha256=-oEgAhjnOLURinkgU7iGdRp8ixyEGksUmAkBXedZJcE,1086
227
- rbx/resources/presets/default/shared/icpc.sty,sha256=A_bSsldpeyzxRCYWpc6k55P5zrDZFpHaIcvZ_WOVW30,8043
226
+ rbx/resources/presets/default/shared/contest_template.rbx.tex,sha256=-sExA0H7vo08I6P0dT78_xNN5Q9wiu6KZzB75s12Xm4,1293
227
+ rbx/resources/presets/default/shared/icpc.sty,sha256=1OpcnKnNXtwubvvco2aGwhj-Xe6VGm7w0isWEUrbQT8,8042
228
228
  rbx/resources/presets/default/shared/problem_template.rbx.tex,sha256=AjziXNWluAGsQiPQ2r477RkrMpNQJ1kcgidU8T_C4KA,1281
229
229
  rbx/resources/templates/rbx.h,sha256=Iwtmr2gdDYmZ2VlIurmleBb_uEpriWd4EX0dJta8xUA,2179
230
230
  rbx/resources/templates/template.cpp,sha256=xXWpWo7fa7HfmPNqkmHcmv3i46Wm0ZL-gPmkRfGvLn4,317
@@ -239,8 +239,8 @@ rbx/testcase.py,sha256=yKOq3CAJZ1YTmInvnoIs0u1iJnRj_X85XiWbLI-p9d8,1951
239
239
  rbx/testcase_rendering.py,sha256=nfmv6dSEqd4aR3TsaODwkKGK6AXty_DDKtWf_ejiQpI,2084
240
240
  rbx/testing_utils.py,sha256=x_PqD8Zd2PkN91NxVHUnSTs044-1WK5KKtttKQBXpFs,2083
241
241
  rbx/utils.py,sha256=YvN0q1vaLR9HxUfXKOTx1iN6Bp_fI8YNTQiJ8TNq7eM,4957
242
- rbx_cp-0.10.2.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
243
- rbx_cp-0.10.2.dist-info/METADATA,sha256=N3YFqZSgUBovfboMBrudFCv1pgRhArY9Y6slQE4bQoA,4625
244
- rbx_cp-0.10.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
245
- rbx_cp-0.10.2.dist-info/entry_points.txt,sha256=qBTLBOeifT1F00LWaEewRRE_jQPgvH7BUdJfZ-dYsFU,57
246
- rbx_cp-0.10.2.dist-info/RECORD,,
242
+ rbx_cp-0.11.0.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
243
+ rbx_cp-0.11.0.dist-info/METADATA,sha256=1E3SHlpVJDrl7dBQUs784iieSXkG7oOe3HrZScLtrUY,4625
244
+ rbx_cp-0.11.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
245
+ rbx_cp-0.11.0.dist-info/entry_points.txt,sha256=qBTLBOeifT1F00LWaEewRRE_jQPgvH7BUdJfZ-dYsFU,57
246
+ rbx_cp-0.11.0.dist-info/RECORD,,