rbx.cp 0.5.0__tar.gz → 0.5.2__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.
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/PKG-INFO +1 -1
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/pyproject.toml +1 -1
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/contest/main.py +0 -1
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/main.py +4 -4
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/packaging/boca/extension.py +3 -3
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/packaging/boca/packager.py +41 -5
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/checker.sh +2 -2
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/LICENSE +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/README.md +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/__init__.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/annotations.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/autoenum.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/__init__.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/builder.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/cd.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/checkers.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/code.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/compile.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/conftest.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/contest/__init__.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/contest/build_contest_statements.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/contest/contest_package.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/contest/contest_utils.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/contest/schema.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/contest/statements.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/creation.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/download.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/environment.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/extensions.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/generators.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/generators_test.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/package.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/packaging/contest_main.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/packaging/main.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/packaging/packager.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/packaging/polygon/packager.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/packaging/polygon/test.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/packaging/polygon/xml_schema.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/presets/__init__.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/presets/fetch.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/presets/lock_schema.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/presets/schema.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/schema.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/solutions.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/solutions_test.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/statements/__init__.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/statements/build_statements.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/statements/builders.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/statements/joiners.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/statements/latex.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/statements/latex_jinja.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/statements/schema.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/stresses.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/stressing/__init__.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/stressing/finder_parser.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/stressing/generator_parser.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/testcases.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/ui/__init__.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/ui/captured_log.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/ui/css/app.tcss +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/ui/main.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/ui/run.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/validators.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/box/validators_test.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/checker.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/clone.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/config.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/conftest.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/console.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/create.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/edit.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/__init__.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/caching.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/conftest.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/judge/__init__.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/judge/cacher.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/judge/digester.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/judge/sandbox.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/judge/sandboxes/__init__.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/judge/sandboxes/isolate.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/judge/sandboxes/stupid_sandbox.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/judge/sandboxes/timeit.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/judge/storage.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/judge/test.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/judge/testiso.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/steps.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/steps_with_caching.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading/steps_with_caching_run_test.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/grading_utils.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/hydration.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/main.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/metadata.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/providers/__init__.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/providers/codeforces.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/providers/provider.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/checkers/boilerplate.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/default_config.json +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/envs/default.rbx.yml +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/envs/isolate.rbx.yml +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/compare +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/compile/c +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/compile/cc +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/compile/cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/compile/java +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/compile/kt +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/compile/pas +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/compile/py2 +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/compile/py3 +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/run/c +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/run/cc +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/run/cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/run/java +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/run/kt +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/run/py2 +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/packagers/boca/run/py3 +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/contest/contest.rbx.yml +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/contest/statement/contest.rbx.tex +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/contest/statement/olymp.sty +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/contest/statement/template.rbx.tex +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/preset.rbx.yml +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/.gitignore +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/gen.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/problem.rbx.yml +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/random.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/random.txt +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/sols/main.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/sols/slow.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/sols/wa.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/statement/olymp.sty +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/statement/projecao.png +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/statement/statement.rbx.tex +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/statement/template.rbx.tex +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/tests/samples/000.in +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/tests/samples/001.in +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/validator.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/wcmp.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/templates/template.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/run.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/schema.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/submit.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/submitors/__init__.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/submitors/codeforces.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/submitors/submitor.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/test.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testcase.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testcase_rendering.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/box1/gen1.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/box1/gen2.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/box1/genScript.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/box1/hard-tle.sol.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/box1/ole.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/box1/problem.rbx.yml +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/box1/re.sol.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/box1/sol.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/box1/tests/1.in +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/box1/tle-and-incorrect.sol.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/box1/tle.sol.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/box1/validator.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/box1/wa.sol.cpp +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/caching/executable.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testdata/compatible +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/testing_utils.py +0 -0
- {rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/utils.py +0 -0
@@ -233,7 +233,6 @@ def irun(
|
|
233
233
|
|
234
234
|
|
235
235
|
@app.command('create, c', help='Create a new problem package.')
|
236
|
-
@package.within_problem
|
237
236
|
def create(
|
238
237
|
name: str,
|
239
238
|
preset: Annotated[
|
@@ -350,7 +349,6 @@ def stress(
|
|
350
349
|
|
351
350
|
|
352
351
|
@app.command('environment, env', help='Set or show the current box environment.')
|
353
|
-
@package.within_problem
|
354
352
|
def environment_command(
|
355
353
|
env: Annotated[Optional[str], typer.Argument()] = None,
|
356
354
|
install_from: Annotated[
|
@@ -365,6 +363,9 @@ def environment_command(
|
|
365
363
|
if env is None:
|
366
364
|
cfg = config.get_config()
|
367
365
|
console.console.print(f'Current environment: [item]{cfg.boxEnvironment}[/item]')
|
366
|
+
console.console.print(
|
367
|
+
f'Location: {environment.get_environment_path(cfg.boxEnvironment)}'
|
368
|
+
)
|
368
369
|
return
|
369
370
|
if install_from is not None:
|
370
371
|
environment.install_environment(env, pathlib.Path(install_from))
|
@@ -420,7 +421,6 @@ def activate():
|
|
420
421
|
|
421
422
|
|
422
423
|
@app.command('languages', help='List the languages available in this environment')
|
423
|
-
@package.within_problem
|
424
424
|
def languages():
|
425
425
|
env = environment.get_environment()
|
426
426
|
|
@@ -437,7 +437,7 @@ def languages():
|
|
437
437
|
|
438
438
|
|
439
439
|
@app.command('clear, clean', help='Clears cache and build directories.')
|
440
|
-
@
|
440
|
+
@cd.within_closest_package
|
441
441
|
def clear():
|
442
442
|
console.console.print('Cleaning cache and build directories...')
|
443
443
|
shutil.rmtree('.box', ignore_errors=True)
|
@@ -14,9 +14,9 @@ class BocaExtension(BaseModel):
|
|
14
14
|
|
15
15
|
def flags_with_defaults(self) -> typing.Dict[BocaLanguage, str]:
|
16
16
|
res: typing.Dict[BocaLanguage, str] = {
|
17
|
-
'c': '-std=gnu11 -O2 -
|
18
|
-
'cpp': '-O2 -
|
19
|
-
'cc': '-std=c++20 -O2 -
|
17
|
+
'c': '-std=gnu11 -O2 -lm -static',
|
18
|
+
'cpp': '-O2 -lm -static',
|
19
|
+
'cc': '-std=c++20 -O2 -lm -static',
|
20
20
|
}
|
21
21
|
res.update(self.flags)
|
22
22
|
return res
|
@@ -48,13 +48,13 @@ class BocaPackager(BasePackager):
|
|
48
48
|
|
49
49
|
def _get_problem_name(self) -> str:
|
50
50
|
pkg = package.find_problem_package_or_die()
|
51
|
-
|
51
|
+
# BOCA forces Java class names to be the name of the problem.
|
52
|
+
return pkg.name.replace('-', '_')
|
52
53
|
|
53
54
|
def _get_problem_info(self) -> str:
|
54
|
-
pkg = package.find_problem_package_or_die()
|
55
55
|
statement = self._get_main_statement()
|
56
56
|
return (
|
57
|
-
f'basename={
|
57
|
+
f'basename={self._get_problem_name()}\n'
|
58
58
|
f'fullname={statement.title}\n'
|
59
59
|
f'descfile={self._get_problem_name()}.pdf\n'
|
60
60
|
)
|
@@ -128,6 +128,8 @@ class BocaPackager(BasePackager):
|
|
128
128
|
return compare_path.read_text()
|
129
129
|
|
130
130
|
def _get_checker(self) -> str:
|
131
|
+
extension = get_extension_or_default('boca', BocaExtension)
|
132
|
+
|
131
133
|
checker_path = get_default_app_path() / 'packagers' / 'boca' / 'checker.sh'
|
132
134
|
if not checker_path.exists():
|
133
135
|
console.console.print(
|
@@ -137,8 +139,10 @@ class BocaPackager(BasePackager):
|
|
137
139
|
checker_text = checker_path.read_text()
|
138
140
|
testlib = get_testlib().read_text()
|
139
141
|
checker = package.get_checker().path.read_text()
|
140
|
-
return
|
141
|
-
'{{
|
142
|
+
return (
|
143
|
+
checker_text.replace('{{rbxFlags}}', extension.flags_with_defaults()['cc'])
|
144
|
+
.replace('{{testlib_content}}', testlib)
|
145
|
+
.replace('{{checker_content}}', checker)
|
142
146
|
)
|
143
147
|
|
144
148
|
def _get_compile(self, language: BocaLanguage) -> str:
|
@@ -165,6 +169,33 @@ class BocaPackager(BasePackager):
|
|
165
169
|
compile_text = compile_text.replace('{{rbxFlags}}', flags[language])
|
166
170
|
return compile_text
|
167
171
|
|
172
|
+
def _copy_solutions(self, into_path: pathlib.Path):
|
173
|
+
for solution in package.get_solutions():
|
174
|
+
dest_path = (
|
175
|
+
into_path
|
176
|
+
/ solution.path.stem
|
177
|
+
/ pathlib.Path(self._get_problem_name()).with_suffix(
|
178
|
+
solution.path.suffix
|
179
|
+
)
|
180
|
+
)
|
181
|
+
dest_path.parent.mkdir(parents=True, exist_ok=True)
|
182
|
+
shutil.copy(str(solution.path), dest_path)
|
183
|
+
|
184
|
+
if solution.path.suffix == '.java':
|
185
|
+
java_content = dest_path.read_text()
|
186
|
+
if (
|
187
|
+
'class Main ' not in java_content
|
188
|
+
and f'class {self._get_problem_name()} ' not in java_content
|
189
|
+
):
|
190
|
+
console.console.print(
|
191
|
+
'[error]For BOCA packaging, Java solutions must be named `class Main` or `class <ProblemName>`.[/error]'
|
192
|
+
)
|
193
|
+
dest_path.write_text(
|
194
|
+
java_content.replace(
|
195
|
+
'class Main ', f'class {self._get_problem_name()} '
|
196
|
+
)
|
197
|
+
)
|
198
|
+
|
168
199
|
def name(self) -> str:
|
169
200
|
return 'boca'
|
170
201
|
|
@@ -223,6 +254,11 @@ class BocaPackager(BasePackager):
|
|
223
254
|
(description_path / self._get_problem_name()).with_suffix('.pdf'),
|
224
255
|
)
|
225
256
|
|
257
|
+
# Copy solutions
|
258
|
+
solutions_path = into_path / 'solutions'
|
259
|
+
solutions_path.mkdir(parents=True, exist_ok=True)
|
260
|
+
self._copy_solutions(solutions_path)
|
261
|
+
|
226
262
|
# Prepare IO
|
227
263
|
inputs_path = into_path / 'input'
|
228
264
|
inputs_path.mkdir(parents=True, exist_ok=True)
|
@@ -29,7 +29,7 @@ if [ -f "$checker_cache" ]; then
|
|
29
29
|
cp "$checker_cache" $CHECKER_OUT -f
|
30
30
|
else
|
31
31
|
echo "Compiling polygon checker: $CHECKER_PATH"
|
32
|
-
$cc {{
|
32
|
+
$cc {{rbxFlags}} $CHECKER_PATH -o $CHECKER_OUT
|
33
33
|
|
34
34
|
if [ $? -ne 0 ]; then
|
35
35
|
echo "Checker could not be compiled"
|
@@ -40,4 +40,4 @@ else
|
|
40
40
|
fi
|
41
41
|
|
42
42
|
chmod 0755 $CHECKER_OUT
|
43
|
-
### END OF CHECKER COMPILATION
|
43
|
+
### END OF CHECKER COMPILATION
|
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
|
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
|
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
|
{rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/contest/statement/contest.rbx.tex
RENAMED
File without changes
|
File without changes
|
{rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/contest/statement/template.rbx.tex
RENAMED
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
|
{rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/statement/statement.rbx.tex
RENAMED
File without changes
|
{rbx_cp-0.5.0 → rbx_cp-0.5.2}/rbx/resources/presets/default/problem/statement/template.rbx.tex
RENAMED
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
|