rbx.cp 0.17.3__py3-none-any.whl → 0.17.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/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.17.3'
1
+ __version__ = '0.17.5'
rbx/box/cli.py CHANGED
@@ -673,6 +673,13 @@ async def stress(
673
673
  '-d',
674
674
  help='Optional description of the stress test.',
675
675
  ),
676
+ print_descriptors: bool = typer.Option(
677
+ False,
678
+ '--descriptors',
679
+ '-D',
680
+ help='Whether to print descriptors of the stress test.',
681
+ hidden=True,
682
+ ),
676
683
  ):
677
684
  if finder and not generator_args or generator_args and not finder:
678
685
  console.console.print(
@@ -693,6 +700,7 @@ async def stress(
693
700
  progress=s,
694
701
  verbose=verbose,
695
702
  sanitized=sanitized,
703
+ print_descriptors=print_descriptors,
696
704
  )
697
705
 
698
706
  stresses.print_stress_report(report)
rbx/box/package.py CHANGED
@@ -352,7 +352,7 @@ def get_solutions(root: pathlib.Path = pathlib.Path()) -> List[Solution]:
352
352
 
353
353
  for entry in package.solutions:
354
354
  if '*' in str(entry.path):
355
- for file in root.glob(str(entry.path)):
355
+ for file in sorted(root.glob(str(entry.path))):
356
356
  relative_file = file.relative_to(root)
357
357
  add_solution(
358
358
  Solution.model_copy(
rbx/box/stresses.py CHANGED
@@ -56,6 +56,7 @@ async def run_stress(
56
56
  verbose: bool = False,
57
57
  progress: Optional[StatusProgress] = None,
58
58
  sanitized: bool = False,
59
+ print_descriptors: bool = False,
59
60
  ) -> StressReport:
60
61
  pkg = package.find_problem_package_or_die()
61
62
 
@@ -134,6 +135,9 @@ async def run_stress(
134
135
  if time.monotonic() - startTime > timeoutInSeconds:
135
136
  break
136
137
 
138
+ if print_descriptors:
139
+ utils.print_open_fd_count()
140
+
137
141
  executed += 1
138
142
 
139
143
  if progress:
@@ -46,7 +46,7 @@ TEXT: (/[^ \t\f\r\n\[\]\(\)\<\>\|\`]/ | ESCAPED_STRING)+
46
46
  // Whitespace
47
47
  _WS: WS
48
48
 
49
- RECNAME: /[a-zA-Z0-9_]/+ /(\.[a-zA-Z0-9_])/*
49
+ RECNAME: /[a-zA-Z0-9_]/+ /(\.[a-zA-Z0-9_]+)/*
50
50
 
51
51
  %import common.WS
52
52
  %import common.CNAME
@@ -359,7 +359,8 @@ class BocaScraper:
359
359
  form['problemnumber'] = f'{problem_index + 1}'
360
360
  form['problemname'] = problem_shortname
361
361
  form['confirmation'] = 'confirm'
362
- form['autojudge_new_sel'] = ['all']
362
+ if form.find_control('autojudge_new_sel'):
363
+ form['autojudge_new_sel'] = ['all']
363
364
  form['Submit3'] = 'Send'
364
365
 
365
366
  with file.open('rb') as f:
rbx/box/unit.py CHANGED
@@ -45,7 +45,7 @@ def extract_validator_test_entries(
45
45
  ) -> List[ValidatorTestEntry]:
46
46
  res: List[ValidatorTestEntry] = []
47
47
  for test in tests:
48
- for input in pathlib.Path().glob(str(test.glob)):
48
+ for input in sorted(pathlib.Path().glob(str(test.glob))):
49
49
  if not input.is_file():
50
50
  continue
51
51
  res.append(
@@ -60,7 +60,7 @@ def extract_checker_test_entries(tests: List[CheckerTest]) -> List[CheckerTestEn
60
60
  res: List[CheckerTestEntry] = []
61
61
  seen: Set[pathlib.Path] = set()
62
62
  for test in tests:
63
- for file in pathlib.Path().glob(str(test.glob)):
63
+ for file in sorted(pathlib.Path().glob(str(test.glob))):
64
64
  if not file.is_file():
65
65
  continue
66
66
  if file.suffix not in ['.in', '.out', '.ans']:
@@ -559,7 +559,7 @@ class SandboxBase(abc.ABC):
559
559
  def glob(self, glob_expr: str) -> List[pathlib.Path]:
560
560
  return [
561
561
  path.relative_to(self.get_root_path())
562
- for path in self.get_root_path().glob(glob_expr)
562
+ for path in sorted(self.get_root_path().glob(glob_expr))
563
563
  ]
564
564
 
565
565
  @abc.abstractmethod
@@ -360,7 +360,7 @@ class FilesystemStorage(Storage):
360
360
  def list_metadata(self, filename: str) -> List[str]:
361
361
  return [
362
362
  path.stem.split('__')[1]
363
- for path in (self.path / '.metadata').glob(f'{filename}__*.json')
363
+ for path in sorted((self.path / '.metadata').glob(f'{filename}__*.json'))
364
364
  ]
365
365
 
366
366
  def exists(self, filename: str) -> bool:
@@ -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.17.3"
4
+ min_version: "0.17.5"
5
5
  uri: "rsalesc/rbx/rbx/resources/presets/default"
6
6
  problem: "problem"
7
7
  contest: "contest"
rbx/utils.py CHANGED
@@ -75,6 +75,19 @@ def check_version_compatibility(required: str) -> SemVerCompatibility:
75
75
  return check_version_compatibility_between(installed, required)
76
76
 
77
77
 
78
+ def print_open_fd_count() -> int:
79
+ import psutil
80
+
81
+ try:
82
+ current_process = psutil.Process()
83
+ open_fds = len(current_process.open_files())
84
+ print(f'Number of opened file descriptors: {open_fds}')
85
+ except psutil.AccessDenied:
86
+ print('Access denied. Run with appropriate permissions (e.g., sudo) if needed.')
87
+ except Exception as e:
88
+ print(f'An error occurred: {e}')
89
+
90
+
78
91
  def create_and_write(path: pathlib.Path, *args, **kwargs):
79
92
  path.parent.mkdir(parents=True, exist_ok=True)
80
93
  path.write_text(*args, **kwargs)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: rbx.cp
3
- Version: 0.17.3
3
+ Version: 0.17.5
4
4
  Summary:
5
5
  Author: Roberto Sales
6
6
  Requires-Python: >=3.9.1,<4.0.0
@@ -1,12 +1,12 @@
1
1
  rbx/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- rbx/__version__.py,sha256=nYwUCnGDgfmsnYIi7CEpIk6_BIHoLHHkPCvVlRO-WC0,23
2
+ rbx/__version__.py,sha256=rZYsXJU98B0OEia0ZbSa3uP1L8XPNy2IvM2kzP3BE4s,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
6
6
  rbx/box/builder.py,sha256=umrTdVAwvsOosBDVvDZ6kq1yWg3Z2Lxp2o1zK-V7BBk,3594
7
7
  rbx/box/cd.py,sha256=_XAzb3kV1NUaaRs8hc9SGDo10O1yh2_gr1EiAKzfUjI,2711
8
8
  rbx/box/checkers.py,sha256=mRovZyTZdySFEaYFVc3Lc-xgEsu6F9FjVPOxDwub7aY,13226
9
- rbx/box/cli.py,sha256=MURZQ6u9gRQc9B4DWq-KDwNJDKoBlWV-wP8vwD-45d4,29885
9
+ rbx/box/cli.py,sha256=iNabTCnSf7qhOJAGxUrgWTrPov6xWwq6soMOSoUb9WI,30129
10
10
  rbx/box/code.py,sha256=TWF-o8fTh5nAtndKuO9Ti7KL-Ye6mkOoUnRzS4POrfw,25524
11
11
  rbx/box/compile.py,sha256=Kzn5mEQu4vb91W9vjyt0DS6cfPJzFLTUoowFj7uHLUo,2539
12
12
  rbx/box/contest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -34,7 +34,7 @@ rbx/box/limits_info.py,sha256=NTtcZTlDzemOtQQXbNbLORpl3RM9nYHc2-cGMnGYfF8,5370
34
34
  rbx/box/linting.py,sha256=wRE0hKCduTBHZYBFmmis_d9AMTsDu0Q-AjByCeTnkrY,3187
35
35
  rbx/box/main.py,sha256=a8CYi77kOywPFly4-ucEIJLXQW-1NFp91kK2fA42YTE,86
36
36
  rbx/box/naming.py,sha256=M6aYLIge8PHhIuCX50rwGe5VRzgUL--2BVtymIqeeXs,2389
37
- rbx/box/package.py,sha256=FjJWSr5yom4_S2k-HZfmDYRB954WaefFaVVME90CdEE,15382
37
+ rbx/box/package.py,sha256=cNOvwE5_hedUFc9c2oHSCW0cj7qkxWXhEpqqhCbwUAc,15390
38
38
  rbx/box/packaging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  rbx/box/packaging/boca/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  rbx/box/packaging/boca/boca_language_utils.py,sha256=bd5-KxN-0h6yg74Jx3NUsgwf_euBU95zC2GLw0MAFS4,1071
@@ -74,10 +74,10 @@ rbx/box/statements/latex.py,sha256=ipTGjL4kjAsnqgiH6Pk1PwKFegBumQP4-y0pFAbNN8I,1
74
74
  rbx/box/statements/latex_jinja.py,sha256=UQyD3hOFsiEQdFjqMswRrPXyGCiRPgnzZPmAcvJuPyM,11671
75
75
  rbx/box/statements/schema.py,sha256=zCjpSsq24V179pS7Pti82x4gIpIMogNP6u1EQxdWolE,5529
76
76
  rbx/box/stats.py,sha256=rUAnmp7kTgUvIQ56NLpQaIQkazB37MVcUos5en3xUQw,3258
77
- rbx/box/stresses.py,sha256=SV0Hx7SPZZEIhwasWDVpTWuMhWWTjfJs2IEW-H0xJZw,12092
77
+ rbx/box/stresses.py,sha256=2Wefpvfo8iduNjJNyepnxmJci0_u9cGz1nwMfIeASN8,12200
78
78
  rbx/box/stressing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
79
  rbx/box/stressing/finder_parser.py,sha256=PnONJD2yun5X5EmHqkaz-rh3DHhn_BkTPHZrIXRKZbw,11898
80
- rbx/box/stressing/generator_parser.py,sha256=0L5ST9YEByGL8k8jjWYtrBVpJpoUqYm3456b5Tpb-RQ,7428
80
+ rbx/box/stressing/generator_parser.py,sha256=iIWFVPhbdnBZD3zGGDooZ6BWuQ0lRbehqpzc7i_nBeo,7429
81
81
  rbx/box/tasks.py,sha256=XLLFVOVMkL-PCuetuDx_XGHVnlDkaUnXl7PCRyv-9dE,11393
82
82
  rbx/box/testcase_extractors.py,sha256=-Pk3N1URV6HPdszfSAjae_Dt4obhTNBeDe1TD3a-nYM,12353
83
83
  rbx/box/testcase_utils.py,sha256=gFBs6OqdYk9NYhVuCP2BMxKvqKCmBUnbW5nKm0AKqoc,6941
@@ -94,7 +94,7 @@ rbx/box/tooling/boca/debug_utils.py,sha256=Rs1ptMWsy32jl_DJZASeOfyqh8HCJdhIXufdb
94
94
  rbx/box/tooling/boca/main.py,sha256=knl1rpaHIwA63KkzMJMZQrejzMpbTPBhYqGx1IpuNm4,289
95
95
  rbx/box/tooling/boca/manual_scrape.py,sha256=iuNtOHrWczdaWNNRMKGYkgr-wSwgtjZedpz5-sX5IRQ,724
96
96
  rbx/box/tooling/boca/scrape.py,sha256=q1BoVstfLbw5CwB9e2hQnseBv6HQMnXq2z_tk18ui6M,1024
97
- rbx/box/tooling/boca/scraper.py,sha256=6B3aI62YdzD7o1zykh9qavl6Qm6cTD--mEvVIjPvEaI,33701
97
+ rbx/box/tooling/boca/scraper.py,sha256=ShckY5M-IyMY0o7aA5IWoFVSA5-N7Tadnx_-9J9s7UQ,33756
98
98
  rbx/box/tooling/converter.py,sha256=cTRUuZ7GToMuAUo6VE7tOtaeNkXHJZE29me0yopvvsY,2544
99
99
  rbx/box/tooling/main.py,sha256=uj6XHjJMF3nyb4enbbTK8XbUAuiRLT_RP1kVwSMqV5E,2003
100
100
  rbx/box/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -121,7 +121,7 @@ rbx/box/ui/widgets/interaction_box.py,sha256=mJoQjHegxkIL00OgiCULmV0_w-2ZcwsQEa-
121
121
  rbx/box/ui/widgets/rich_log_box.py,sha256=mF565c_Y3RYUZ_GJEFj5Eb86SFjsib31wE5qu1K0UBM,91
122
122
  rbx/box/ui/widgets/test_output_box.py,sha256=ws7Oa2E8ZABM6Q4ZtL2UQiq59sJzKYPe-STrqhZJI8M,3871
123
123
  rbx/box/ui/widgets/two_sided_test_output_box.py,sha256=L-ORiDwd6CP5DFpavrKGBaX0ZHkSoQqbJrGZ4BdFUWc,2289
124
- rbx/box/unit.py,sha256=fOltTLM2ONkUbKhetpRrgUyphEXvmvn8_kPH26LPXmo,7860
124
+ rbx/box/unit.py,sha256=3hqhFBoQQSH76EcCVa87XGVII9JRaz3r_feKldlITsk,7876
125
125
  rbx/box/validators.py,sha256=nugrsZ6NMJa1SCH-VybDTDDf_hLP3tJehksessNv75s,10445
126
126
  rbx/config.py,sha256=Tj0NHSf13fXxbNpif5C4qnaL1k3S-G87OnzuykEAcNQ,8463
127
127
  rbx/console.py,sha256=X8EJy68OROgh6ao3ZcUjZm5Y56VFMzen58ywAuQ7pAU,990
@@ -133,11 +133,11 @@ rbx/grading/judge/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
133
133
  rbx/grading/judge/cacher.py,sha256=zPyOqd7hP_zjuAGAauckFs6EvQE8pP7Mrug7fylIZvY,21929
134
134
  rbx/grading/judge/digester.py,sha256=gtOIe_iL4PEWA7OKelW1gjSI-nBvbOpDPJGV8VQyjSg,912
135
135
  rbx/grading/judge/program.py,sha256=8hVme1IbyZlrgg8j-po3KZJsYqUbgqfpax-vSZbobRA,9993
136
- rbx/grading/judge/sandbox.py,sha256=tSJKSkupSqSiIPHx4rjZ_fhZKzJ9tqqqlsLNSfy9tcc,21334
136
+ rbx/grading/judge/sandbox.py,sha256=e9Nstf9EoFGE0OBQgqcz5BD5hYDegIeGP5dWVZSA29Q,21342
137
137
  rbx/grading/judge/sandboxes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
138
138
  rbx/grading/judge/sandboxes/stupid_sandbox.py,sha256=QuIP93lBOm7bnkwB3NlhHWxRTs4DTosa_EYPqHq2QCY,11600
139
139
  rbx/grading/judge/sandboxes/tee.py,sha256=fLulB8fV7k5cO-ikRgURpsETrvr6LoUSjGxFM3GZs5U,672
140
- rbx/grading/judge/storage.py,sha256=yE9eIOW7tnmv_h3nTmWe4YFwErBTh84Ny4C1KLoZ2js,15613
140
+ rbx/grading/judge/storage.py,sha256=8o3pz0Ansanc5t23XGtshJHCD_q4dIR_XorpeVEvg1g,15621
141
141
  rbx/grading/limits.py,sha256=zCyRTEtUQFd1RKL_fFKl3qSiRSIDCalBaSLlt1yhi0Y,896
142
142
  rbx/grading/profiling.py,sha256=OEdtoAzjYjLfi-QI5Ke7tLZzJeqvGpMB2utQBNuH3E4,3369
143
143
  rbx/grading/steps.py,sha256=qJ0tVWSggGhWj6zUuCV8HTJD9NE11JzRFZN41_jBz_0,26674
@@ -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=quSPG5Xs9KroYLATNLPNtORLGRWtrLLt2Fx81T1enAM,1692
204
- rbx/resources/presets/default/preset.rbx.yml,sha256=1E-q76GtNCJzYVBaBQthXGn5RESfvpjd0ntpv4YBmPo,520
204
+ rbx/resources/presets/default/preset.rbx.yml,sha256=e5kETGeZhY5r9QkFB9Wgn3s2NmSOOKt2i_dEc5L9_vw,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
@@ -222,9 +222,9 @@ rbx/resources/presets/default/shared/problem_template.rbx.tex,sha256=KDibf4LtUio
222
222
  rbx/resources/templates/rbx.h,sha256=0AZds9R0PmuPgnlTENb33Y81LW0LlnmOJFaoN8oG3Yo,3638
223
223
  rbx/resources/templates/template.cpp,sha256=xXWpWo7fa7HfmPNqkmHcmv3i46Wm0ZL-gPmkRfGvLn4,317
224
224
  rbx/testing_utils.py,sha256=vNNdaytowJfuopszVHeFzVtHWlPfipPW4zpqCOvdZKU,2908
225
- rbx/utils.py,sha256=AUIknhhED-ZIp6w-VcfPkaG1cYjQkovlX5WCvbVLNHg,9930
226
- rbx_cp-0.17.3.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
227
- rbx_cp-0.17.3.dist-info/METADATA,sha256=qTEWi5jJJ6kDLDmS8fROuRzwQbIVt4_4s405RP8q52E,4799
228
- rbx_cp-0.17.3.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
229
- rbx_cp-0.17.3.dist-info/entry_points.txt,sha256=Gw2_BZ5Jon61biaH_ETbAQGXy8fR5On9gw2U4A1erpo,40
230
- rbx_cp-0.17.3.dist-info/RECORD,,
225
+ rbx/utils.py,sha256=yBIp6vwY2hhY2s7bJtvlP5U5LEnZLfG8Y044VDKy6B4,10343
226
+ rbx_cp-0.17.5.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
227
+ rbx_cp-0.17.5.dist-info/METADATA,sha256=YFq-MJGMCLVJH7JC3l11zpuxlb6Ky2DcSzqY-N8bfnU,4799
228
+ rbx_cp-0.17.5.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
229
+ rbx_cp-0.17.5.dist-info/entry_points.txt,sha256=Gw2_BZ5Jon61biaH_ETbAQGXy8fR5On9gw2U4A1erpo,40
230
+ rbx_cp-0.17.5.dist-info/RECORD,,