rbx.cp 0.5.13__tar.gz → 0.5.15__tar.gz

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.
Files changed (163) hide show
  1. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/PKG-INFO +4 -4
  2. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/pyproject.toml +4 -4
  3. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/environment.py +1 -1
  4. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/generators.py +4 -7
  5. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/main.py +4 -5
  6. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/packaging/polygon/packager.py +2 -2
  7. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/presets/__init__.py +18 -5
  8. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/schema.py +9 -9
  9. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/solutions.py +17 -4
  10. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/stresses.py +2 -2
  11. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/stressing/finder_parser.py +2 -2
  12. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/validators.py +1 -1
  13. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/clone.py +1 -1
  14. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/judge/digester.py +6 -0
  15. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/judge/sandboxes/timeit.py +3 -3
  16. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/steps.py +10 -8
  17. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/LICENSE +0 -0
  18. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/README.md +0 -0
  19. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/__init__.py +0 -0
  20. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/annotations.py +0 -0
  21. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/autoenum.py +0 -0
  22. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/__init__.py +0 -0
  23. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/builder.py +0 -0
  24. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/cd.py +0 -0
  25. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/checkers.py +0 -0
  26. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/code.py +0 -0
  27. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/compile.py +0 -0
  28. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/conftest.py +0 -0
  29. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/contest/__init__.py +0 -0
  30. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/contest/build_contest_statements.py +0 -0
  31. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/contest/contest_package.py +0 -0
  32. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/contest/contest_utils.py +0 -0
  33. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/contest/main.py +0 -0
  34. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/contest/schema.py +0 -0
  35. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/contest/statements.py +0 -0
  36. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/creation.py +0 -0
  37. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/download.py +0 -0
  38. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/extensions.py +0 -0
  39. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/generators_test.py +0 -0
  40. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/package.py +0 -0
  41. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/packaging/boca/extension.py +0 -0
  42. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/packaging/boca/packager.py +0 -0
  43. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/packaging/contest_main.py +0 -0
  44. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/packaging/main.py +0 -0
  45. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/packaging/packager.py +0 -0
  46. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/packaging/polygon/test.py +0 -0
  47. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/packaging/polygon/xml_schema.py +0 -0
  48. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/presets/fetch.py +0 -0
  49. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/presets/lock_schema.py +0 -0
  50. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/presets/schema.py +0 -0
  51. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/solutions_test.py +0 -0
  52. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/statements/__init__.py +0 -0
  53. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/statements/build_statements.py +0 -0
  54. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/statements/builders.py +0 -0
  55. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/statements/joiners.py +0 -0
  56. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/statements/latex.py +0 -0
  57. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/statements/latex_jinja.py +0 -0
  58. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/statements/schema.py +0 -0
  59. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/stressing/__init__.py +0 -0
  60. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/stressing/generator_parser.py +0 -0
  61. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/testcases.py +0 -0
  62. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/ui/__init__.py +0 -0
  63. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/ui/captured_log.py +0 -0
  64. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/ui/css/app.tcss +0 -0
  65. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/ui/main.py +0 -0
  66. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/ui/run.py +0 -0
  67. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/box/validators_test.py +0 -0
  68. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/checker.py +0 -0
  69. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/config.py +0 -0
  70. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/conftest.py +0 -0
  71. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/console.py +0 -0
  72. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/create.py +0 -0
  73. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/edit.py +0 -0
  74. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/__init__.py +0 -0
  75. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/caching.py +0 -0
  76. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/conftest.py +0 -0
  77. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/judge/__init__.py +0 -0
  78. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/judge/cacher.py +0 -0
  79. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/judge/sandbox.py +0 -0
  80. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/judge/sandboxes/__init__.py +0 -0
  81. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/judge/sandboxes/isolate.py +0 -0
  82. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/judge/sandboxes/stupid_sandbox.py +0 -0
  83. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/judge/storage.py +0 -0
  84. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/judge/test.py +0 -0
  85. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/judge/testiso.py +0 -0
  86. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/steps_with_caching.py +0 -0
  87. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading/steps_with_caching_run_test.py +0 -0
  88. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/grading_utils.py +0 -0
  89. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/hydration.py +0 -0
  90. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/main.py +0 -0
  91. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/metadata.py +0 -0
  92. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/providers/__init__.py +0 -0
  93. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/providers/codeforces.py +0 -0
  94. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/providers/provider.py +0 -0
  95. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/checkers/boilerplate.cpp +0 -0
  96. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/default_config.json +0 -0
  97. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/envs/default.rbx.yml +0 -0
  98. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/envs/isolate.rbx.yml +0 -0
  99. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/checker.sh +0 -0
  100. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/compare +0 -0
  101. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/compile/c +0 -0
  102. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/compile/cc +0 -0
  103. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/compile/cpp +0 -0
  104. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/compile/java +0 -0
  105. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/compile/kt +0 -0
  106. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/compile/pas +0 -0
  107. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/compile/py2 +0 -0
  108. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/compile/py3 +0 -0
  109. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/run/c +0 -0
  110. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/run/cc +0 -0
  111. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/run/cpp +0 -0
  112. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/run/java +0 -0
  113. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/run/kt +0 -0
  114. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/run/py2 +0 -0
  115. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/packagers/boca/run/py3 +0 -0
  116. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/contest/contest.rbx.yml +0 -0
  117. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/contest/statement/contest.rbx.tex +0 -0
  118. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/contest/statement/olymp.sty +0 -0
  119. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/contest/statement/template.rbx.tex +0 -0
  120. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/preset.rbx.yml +0 -0
  121. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/.gitignore +0 -0
  122. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/gen.cpp +0 -0
  123. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/problem.rbx.yml +0 -0
  124. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/random.py +0 -0
  125. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/random.txt +0 -0
  126. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/sols/main.cpp +0 -0
  127. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/sols/slow.cpp +0 -0
  128. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/sols/wa.cpp +0 -0
  129. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/statement/olymp.sty +0 -0
  130. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/statement/projecao.png +0 -0
  131. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/statement/statement.rbx.tex +0 -0
  132. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/statement/template.rbx.tex +0 -0
  133. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/tests/samples/000.in +0 -0
  134. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/tests/samples/001.in +0 -0
  135. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/validator.cpp +0 -0
  136. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/presets/default/problem/wcmp.cpp +0 -0
  137. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/resources/templates/template.cpp +0 -0
  138. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/run.py +0 -0
  139. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/schema.py +0 -0
  140. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/submit.py +0 -0
  141. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/submitors/__init__.py +0 -0
  142. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/submitors/codeforces.py +0 -0
  143. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/submitors/submitor.py +0 -0
  144. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/test.py +0 -0
  145. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testcase.py +0 -0
  146. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testcase_rendering.py +0 -0
  147. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/box1/gen1.cpp +0 -0
  148. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/box1/gen2.cpp +0 -0
  149. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/box1/genScript.py +0 -0
  150. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/box1/hard-tle.sol.cpp +0 -0
  151. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/box1/ole.cpp +0 -0
  152. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/box1/problem.rbx.yml +0 -0
  153. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/box1/re.sol.cpp +0 -0
  154. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/box1/sol.cpp +0 -0
  155. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/box1/tests/1.in +0 -0
  156. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/box1/tle-and-incorrect.sol.cpp +0 -0
  157. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/box1/tle.sol.cpp +0 -0
  158. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/box1/validator.cpp +0 -0
  159. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/box1/wa.sol.cpp +0 -0
  160. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/caching/executable.py +0 -0
  161. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testdata/compatible +0 -0
  162. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/testing_utils.py +0 -0
  163. {rbx_cp-0.5.13 → rbx_cp-0.5.15}/rbx/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rbx.cp
3
- Version: 0.5.13
3
+ Version: 0.5.15
4
4
  Summary:
5
5
  Author: Roberto Sales
6
6
  Requires-Python: >=3.9,<4.0
@@ -10,7 +10,7 @@ Classifier: Programming Language :: Python :: 3.10
10
10
  Classifier: Programming Language :: Python :: 3.11
11
11
  Classifier: Programming Language :: Python :: 3.12
12
12
  Requires-Dist: chardet (>=5.2.0,<6.0.0)
13
- Requires-Dist: fastapi (>=0.111.0,<0.112.0)
13
+ Requires-Dist: fastapi (>=0.115.8,<0.116.0)
14
14
  Requires-Dist: filelock (>=3.14.0,<4.0.0)
15
15
  Requires-Dist: gevent (>=24.2.1,<25.0.0)
16
16
  Requires-Dist: gitpython (>=3.1.43,<4.0.0)
@@ -26,9 +26,9 @@ Requires-Dist: python-iso639 (>=2024.4.27,<2025.0.0)
26
26
  Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
27
27
  Requires-Dist: questionary (>=2.1.0,<3.0.0)
28
28
  Requires-Dist: requests (>=2.32.3,<3.0.0)
29
- Requires-Dist: rich (>=13.7.1,<14.0.0)
29
+ Requires-Dist: rich (>=13.9.4,<14.0.0)
30
30
  Requires-Dist: textual (>=0.79.1,<0.80.0)
31
- Requires-Dist: typer[all] (>=0.12.3,<0.13.0)
31
+ Requires-Dist: typer (>=0.15.1,<0.16.0)
32
32
  Description-Content-Type: text/markdown
33
33
 
34
34
  <p align="center">
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "rbx.cp"
3
- version = "0.5.13"
3
+ version = "0.5.15"
4
4
  description = ""
5
5
  packages = [
6
6
  {include = "rbx"}
@@ -10,14 +10,14 @@ readme = "README.md"
10
10
 
11
11
  [tool.poetry.dependencies]
12
12
  python = "^3.9"
13
- typer = {extras = ["all"], version = "^0.12.3"}
14
- fastapi = "^0.111.0"
13
+ typer = "^0.15.1"
14
+ fastapi = "^0.115.8"
15
15
  filelock = "^3.14.0"
16
16
  gevent = "^24.2.1"
17
17
  mechanize = "^0.4.10"
18
18
  jinja2 = "^3.1.4"
19
19
  pydantic = "2.8.2"
20
- rich = "^13.7.1"
20
+ rich = "^13.9.4"
21
21
  pyyaml = "^6.0.1"
22
22
  requests = "^2.32.3"
23
23
  latexbuild = "^0.2.2"
@@ -197,7 +197,7 @@ def get_environment(env: Optional[str] = None) -> Environment:
197
197
  except ValidationError as e:
198
198
  console.console.print(e)
199
199
  console.console.print(
200
- f'[error]Error parsing environment file [item]{env_path}[/item].[/error]'
200
+ f'[error]Error parsing environment file [item]{env_path}[/item][/error]'
201
201
  )
202
202
  raise typer.Exit(1) from e
203
203
 
@@ -116,8 +116,8 @@ def generate_output_for_testcase(
116
116
 
117
117
  timelimit = pkg.timelimit_for_language(main_solution.language)
118
118
  sandbox = EnvironmentSandbox()
119
- sandbox.timeLimit = timelimit * 2
120
- sandbox.wallTimeLimit = timelimit * 2
119
+ sandbox.timeLimit = timelimit * 3
120
+ sandbox.wallTimeLimit = timelimit * 3
121
121
  sandbox.memoryLimit = pkg.memorylimit_for_language(main_solution.language)
122
122
  sandbox.fileSizeLimit = pkg.outputLimit
123
123
  extra_config = ExecutionConfig(sandbox=sandbox)
@@ -146,9 +146,6 @@ def generate_output_for_testcase(
146
146
  if run_log is not None:
147
147
  console.console.print(f'[error]Summary:[/error] {run_log.get_summary()}')
148
148
  checker_result = checkers.check_with_no_output(run_log)
149
- console.console.print(
150
- f'[warning]Time: [item]{run_log.time:.2f}s[/item][/warning]',
151
- )
152
149
  console.console.print(
153
150
  f'[warning]Verdict: [item]{checker_result.outcome.value}[/item][/warning]',
154
151
  )
@@ -339,7 +336,7 @@ def generate_standalone(
339
336
  )
340
337
  if not generation_log or generation_log.exitcode != 0:
341
338
  console.console.print(
342
- f'[error]Failed generating test using generator call [info]{call.name} {expanded_args_str}[/info].[/error]',
339
+ f'[error]Failed generating test using generator call [info]{call.name} {expanded_args_str}[/info][/error]',
343
340
  )
344
341
  if generation_log is not None:
345
342
  console.console.print(
@@ -361,7 +358,7 @@ def generate_standalone(
361
358
  ok, message, *_ = validators.validate_test(output, validator, validator_digest)
362
359
  if not ok:
363
360
  console.console.print(
364
- f'[error]Failed validating testcase generated by call [info]{call.name} {expanded_args_str}[/info].[/error]'
361
+ f'[error]Failed validating testcase generated by call [info]{call.name} {expanded_args_str}[/info][/error]'
365
362
  )
366
363
  console.console.print(f'[error]Message:[/error] {message}')
367
364
  console.console.print(f'Testcase written at [item]{output}[/item]')
@@ -44,7 +44,6 @@ from rbx.box.solutions import (
44
44
  run_solutions,
45
45
  )
46
46
  from rbx.box.statements import build_statements
47
- from rbx.box.ui import main as ui_pkg
48
47
 
49
48
  app = typer.Typer(no_args_is_help=True, cls=annotations.AliasGroup)
50
49
  app.add_typer(
@@ -73,10 +72,10 @@ app.add_typer(
73
72
  )
74
73
 
75
74
 
76
- @app.command('ui', hidden=True)
77
- @package.within_problem
78
- def ui():
79
- ui_pkg.start()
75
+ # @app.command('ui', hidden=True)
76
+ # @package.within_problem
77
+ # def ui():
78
+ # ui_pkg.start()
80
79
 
81
80
 
82
81
  @app.command('edit, e', help='Open problem.rbx.yml in your default editor.')
@@ -106,8 +106,8 @@ class PolygonPackager(BasePackager):
106
106
 
107
107
  return polygon_schema.Testset(
108
108
  name='tests',
109
- timelimit=pkg.timeLimit,
110
- memorylimit=pkg.memoryLimit * 1024 * 1024,
109
+ timelimit=pkg.timelimit_for_language(None),
110
+ memorylimit=pkg.memorylimit_for_language(None) * 1024 * 1024,
111
111
  size=len(testcases),
112
112
  inputPattern='tests/%03d',
113
113
  answerPattern='tests/%03d.a',
@@ -4,6 +4,7 @@ import tempfile
4
4
  from typing import Annotated, Iterable, List, Optional, Sequence, Union
5
5
 
6
6
  import git
7
+ import questionary
7
8
  import rich
8
9
  import rich.prompt
9
10
  import typer
@@ -16,7 +17,7 @@ from rbx.box.presets.fetch import PresetFetchInfo, get_preset_fetch_info
16
17
  from rbx.box.presets.lock_schema import LockedAsset, PresetLock
17
18
  from rbx.box.presets.schema import Preset, TrackedAsset
18
19
  from rbx.config import get_default_app_path
19
- from rbx.grading.judge.digester import digest_cooperatively
20
+ from rbx.grading.judge.digester import digest_cooperatively, digest_file
20
21
 
21
22
  app = typer.Typer(no_args_is_help=True)
22
23
 
@@ -34,7 +35,7 @@ def get_preset_yaml(root: pathlib.Path = pathlib.Path()) -> Preset:
34
35
  found = find_preset_yaml(root)
35
36
  if not found:
36
37
  console.console.print(
37
- f'[error][item]preset.rbx.yml[/item] not found in [item]{root.absolute()}[/item].[/error]'
38
+ f'[error][item]preset.rbx.yml[/item] not found in [item]{root.absolute()}[/item][/error]'
38
39
  )
39
40
  raise typer.Exit(1)
40
41
  return utils.model_from_yaml(Preset, found.read_text())
@@ -300,10 +301,22 @@ def optionally_install_environment_from_preset(
300
301
  if preset.env is None:
301
302
  return
302
303
  env_path = get_environment_path(preset.name)
304
+ preset_env_path = root / preset.env
303
305
  if env_path.is_file():
304
- return
306
+ if digest_file(preset_env_path) == digest_file(env_path):
307
+ return
308
+ overwrite = questionary.confirm(
309
+ 'Preset environment file has changed. Overwrite?',
310
+ default=False,
311
+ ).ask()
312
+ if not overwrite:
313
+ return
314
+
315
+ console.console.print(
316
+ f'[success]Overwriting the existing environment based on [item]{preset.env}[/item].'
317
+ )
305
318
  env_path.parent.mkdir(parents=True, exist_ok=True)
306
- shutil.copyfile(str(root / preset.env), env_path)
319
+ shutil.copyfile(str(preset_env_path), env_path)
307
320
 
308
321
 
309
322
  def _install(root: pathlib.Path = pathlib.Path(), force: bool = False):
@@ -406,7 +419,7 @@ def _sync(update: bool = False):
406
419
  '[error]Package does not have a [item].preset.lock.yml[/item] file and thus cannot be synced.[/error]'
407
420
  )
408
421
  console.console.print(
409
- '[error]Ensure this package was created through a preset, or manually associate one with [item]rbx presets lock [PRESET][/item].[/error]'
422
+ '[error]Ensure this package was created through a preset, or manually associate one with [item]rbx presets lock [PRESET][/item][/error]'
410
423
  )
411
424
  raise typer.Exit(1)
412
425
 
@@ -1,5 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import os
3
4
  import pathlib
4
5
  from typing import Dict, List, Optional, Union
5
6
 
@@ -350,15 +351,14 @@ that is correct and used as reference -- and should have the `accepted` outcome.
350
351
 
351
352
  def timelimit_for_language(self, language: Optional[str]) -> int:
352
353
  res = self.timeLimit
353
- if language is None:
354
- return res
355
- if language not in self.modifiers:
356
- return res
357
- modifier = self.modifiers[language]
358
- if modifier.time is not None:
359
- return modifier.time
360
- if modifier.timeMultiplier is not None:
361
- return int(res * float(modifier.timeMultiplier))
354
+ if language is not None and language in self.modifiers:
355
+ modifier = self.modifiers[language]
356
+ if modifier.time is not None:
357
+ res = modifier.time
358
+ if modifier.timeMultiplier is not None:
359
+ res = int(res * float(modifier.timeMultiplier))
360
+ if 'RBX_TIME_MULTIPLIER' in os.environ:
361
+ res = int(res * float(os.environ['RBX_TIME_MULTIPLIER']))
362
362
  return res
363
363
 
364
364
  def memorylimit_for_language(self, language: Optional[str]) -> int:
@@ -114,7 +114,7 @@ def compile_solutions(
114
114
  compiled_solutions[solution.path] = compile_item(solution)
115
115
  except:
116
116
  console.console.print(
117
- f'[error]Failed compiling solution [item]{solution.path}[/item].[/error]'
117
+ f'[error]Failed compiling solution [item]{solution.path}[/item][/error]'
118
118
  )
119
119
  raise
120
120
 
@@ -491,14 +491,24 @@ def _get_evals_memory_in_mb(evals: List[Evaluation]) -> int:
491
491
  return max(int(eval.log.memory or 0) // (1024 * 1024) for eval in evals)
492
492
 
493
493
 
494
+ def _get_evals_memory_in_bytes(evals: List[Evaluation]) -> int:
495
+ if not evals:
496
+ return 0
497
+ return max(int(eval.log.memory or 0) for eval in evals)
498
+
499
+
494
500
  def get_evals_formatted_time(evals: List[Evaluation]) -> str:
495
501
  max_time = _get_evals_time_in_ms(evals)
496
502
  return f'{max_time} ms'
497
503
 
498
504
 
499
505
  def get_evals_formatted_memory(evals: List[Evaluation]) -> str:
500
- max_memory = _get_evals_memory_in_mb(evals)
501
- return f'{max_memory} MiB'
506
+ max_memory = _get_evals_memory_in_bytes(evals)
507
+ if max_memory < 1024 * 1024:
508
+ if max_memory < 1024:
509
+ return f'{max_memory} B'
510
+ return f'{max_memory // 1024} KiB'
511
+ return f'{max_memory // (1024 * 1024)} MiB'
502
512
 
503
513
 
504
514
  def _print_solution_outcome(
@@ -778,7 +788,10 @@ def print_run_report(
778
788
  is_closing_group = last_group is not None and is_new_group
779
789
 
780
790
  if is_closing_group:
781
- console.print(f'({get_evals_formatted_time(group_evals)})', end='')
791
+ console.print(
792
+ f'({get_evals_formatted_time(group_evals)}, {get_evals_formatted_memory(group_evals)})',
793
+ end='',
794
+ )
782
795
  console.print()
783
796
 
784
797
  if is_new_solution:
@@ -35,7 +35,7 @@ def _compile_finder(finder: CodeItem) -> str:
35
35
  digest = compile_item(finder)
36
36
  except Exception as e:
37
37
  console.console.print(
38
- f'[error]Failed compiling checker [item]{finder.path}[/item].[/error]'
38
+ f'[error]Failed compiling checker [item]{finder.path}[/item][/error]'
39
39
  )
40
40
  raise typer.Exit(1) from e
41
41
  return digest
@@ -214,7 +214,7 @@ def run_stress(
214
214
 
215
215
  if internal_error_results:
216
216
  console.console.print(
217
- f'[error]Checkers failed during stress test [item]{name}[/item] with args [info]{expanded_generator_call.name} {expanded_generator_call.args}[/info].[/error]'
217
+ f'[error]Checkers failed during stress test [item]{name}[/item] with args [info]{expanded_generator_call.name} {expanded_generator_call.args}[/info][/error]'
218
218
  )
219
219
  for internal_error_result in internal_error_results:
220
220
  assert internal_error_result.checker is not None
@@ -300,7 +300,7 @@ def validate(tree: lark.ParseTree):
300
300
  for checker in all_checkers:
301
301
  if not pathlib.Path(checker).is_file():
302
302
  console.console.print(
303
- f'[error]Finder expression references non-existing checker [item]{checker}[/item].[/error]'
303
+ f'[error]Finder expression references non-existing checker [item]{checker}[/item][/error]'
304
304
  )
305
305
  raise typer.Exit(1)
306
306
 
@@ -308,7 +308,7 @@ def validate(tree: lark.ParseTree):
308
308
  for solution in all_solutions:
309
309
  if not pathlib.Path(solution).is_file():
310
310
  console.console.print(
311
- f'[error]Finder expression references non-existing solution [item]{solution}[/item].[/error]'
311
+ f'[error]Finder expression references non-existing solution [item]{solution}[/item][/error]'
312
312
  )
313
313
  raise typer.Exit(1)
314
314
 
@@ -35,7 +35,7 @@ def _compile_validator(validator: CodeItem) -> str:
35
35
  digest = compile_item(validator)
36
36
  except:
37
37
  console.console.print(
38
- f'[error]Failed compiling validator [item]{validator.path}[/item].[/error]'
38
+ f'[error]Failed compiling validator [item]{validator.path}[/item][/error]'
39
39
  )
40
40
  raise
41
41
  return digest
@@ -158,7 +158,7 @@ def main(lang: Optional[str] = None):
158
158
  )
159
159
  else:
160
160
  console.print(
161
- f'[status][rbx]rbx[/rbx] parsed problem from [item]{problem.url}[/item].[/status]'
161
+ f'[status][rbx]rbx[/rbx] parsed problem from [item]{problem.url}[/item][/status]'
162
162
  )
163
163
  else:
164
164
  batch_to_left[problem.batch.id] -= 1
@@ -1,4 +1,5 @@
1
1
  import hashlib
2
+ import pathlib
2
3
  from typing import IO
3
4
 
4
5
  import gevent
@@ -33,3 +34,8 @@ def digest_cooperatively(f: IO[bytes], chunk_size: int = 2**20):
33
34
  d = Digester()
34
35
  digest_cooperatively_into_digester(f, d, chunk_size)
35
36
  return d.digest()
37
+
38
+
39
+ def digest_file(path: pathlib.Path):
40
+ with open(path, 'rb') as f:
41
+ return digest_cooperatively(f)
@@ -5,7 +5,6 @@ import resource
5
5
  import signal
6
6
  import stat
7
7
  import sys
8
- from math import ceil
9
8
  from time import monotonic
10
9
  from typing import List, Optional
11
10
 
@@ -58,8 +57,9 @@ def parse_opts() -> Options:
58
57
 
59
58
 
60
59
  def get_memory_usage(ru: resource.struct_rusage) -> int:
61
- used = ceil((ru.ru_maxrss + ru.ru_ixrss + ru.ru_idrss + ru.ru_isrss) / 1024)
62
- return used
60
+ if sys.platform == 'darwin':
61
+ return ru.ru_maxrss // 1024 + ru.ru_ixrss
62
+ return ru.ru_maxrss + ru.ru_ixrss + ru.ru_idrss + ru.ru_isrss
63
63
 
64
64
 
65
65
  def get_cpu_time(ru: resource.struct_rusage) -> float:
@@ -132,12 +132,6 @@ class TestcaseIO(BaseModel):
132
132
  output: Optional[pathlib.Path] = None
133
133
 
134
134
 
135
- class PreprocessLog(BaseModel):
136
- cmd: List[str]
137
- exitcode: int
138
- log: str
139
-
140
-
141
135
  class RunLogMetadata(BaseModel):
142
136
  language: Optional[str] = None
143
137
 
@@ -162,6 +156,11 @@ class RunLog(BaseModel):
162
156
  return f'FAILED with exit code {self.exitcode} and sandbox status {self.exitstatus} (time: {time}s, memory: {memory//(1024*1024)}MB)'
163
157
 
164
158
 
159
+ class PreprocessLog(RunLog):
160
+ cmd: List[str]
161
+ log: str
162
+
163
+
165
164
  class TestcaseLog(RunLog):
166
165
  stdout_absolute_path: Optional[pathlib.Path] = None
167
166
  stderr_absolute_path: Optional[pathlib.Path] = None
@@ -397,6 +396,9 @@ def compile(
397
396
  log = PreprocessLog(
398
397
  cmd=cmd,
399
398
  exitcode=sandbox.get_exit_code(),
399
+ exitstatus=sandbox.get_exit_status(),
400
+ time=sandbox.get_execution_time(),
401
+ memory=sandbox.get_memory_used(),
400
402
  log='\n'.join(std_outputs),
401
403
  )
402
404
  logs.append(log)
@@ -406,10 +408,10 @@ def compile(
406
408
 
407
409
  if logs and logs[-1].exitcode != 0:
408
410
  console.print(
409
- 'Preprocessing [error]failed[/error] with command',
411
+ '[error]FAILED[/error] Preprocessing failed with command',
410
412
  utils.highlight_json_obj(logs[-1].cmd),
411
413
  )
412
- console.print(f'Exit code: [error]{logs[-1].exitcode}[/error]')
414
+ console.print(f'[error]Summary:[/error] {logs[-1].get_summary()}')
413
415
  console.print(Text.from_ansi(logs[-1].log), style='default')
414
416
  return False
415
417
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes