rbx.cp 0.17.7__tar.gz → 0.18.0__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.17.7 → rbx_cp-0.18.0}/PKG-INFO +2 -1
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/pyproject.toml +2 -1
- rbx_cp-0.18.0/rbx/__version__.py +1 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/code.py +10 -1
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/environment.py +11 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/polygon/upload.py +12 -9
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/sanitizers/warning_stack.py +4 -3
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/schema.py +3 -3
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/solutions.py +3 -3
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/tooling/boca/scrape.py +2 -3
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/tooling/boca/scraper.py +3 -5
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/steps.py +1 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/compile/kt +8 -12
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/interactive/kt +17 -9
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/run/kt +47 -13
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/env.rbx.yml +14 -4
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/preset.rbx.yml +1 -1
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/utils.py +36 -1
- rbx_cp-0.17.7/rbx/__version__.py +0 -1
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/LICENSE +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/README.md +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/annotations.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/autoenum.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/builder.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/cd.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/checkers.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/cli.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/compile.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/contest/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/contest/build_contest_statements.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/contest/contest_package.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/contest/contest_utils.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/contest/main.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/contest/schema.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/contest/statements.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/creation.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/deferred.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/download.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/dump_schemas.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/extensions.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/fields.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/formatting.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/generators.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/git_utils.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/global_package.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/header.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/lang.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/lazy_importing_main.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/limits_info.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/linting.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/main.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/naming.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/package.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/boca/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/boca/boca_language_utils.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/boca/boca_outcome_utils.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/boca/extension.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/boca/packager.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/contest_main.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/importer.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/main.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/moj/packager.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/packager.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/pkg/packager.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/polygon/importer.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/polygon/packager.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/polygon/polygon_api.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/polygon/test.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/packaging/polygon/xml_schema.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/presets/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/presets/fetch.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/presets/lock_schema.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/presets/schema.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/remote.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/retries.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/sanitizers/issue_stack.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/setter_config.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/state.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/statements/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/statements/build_statements.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/statements/builders.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/statements/expander.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/statements/joiners.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/statements/latex.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/statements/latex_jinja.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/statements/schema.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/stats.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/stresses.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/stressing/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/stressing/finder_parser.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/stressing/generator_parser.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/tasks.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/testcase_extractors.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/testcase_utils.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/testcases/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/testcases/main.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/testing/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/testing/testing_package.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/testing/testing_preset.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/testing/testing_shared.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/timing.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/tooling/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/tooling/boca/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/tooling/boca/debug_utils.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/tooling/boca/main.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/tooling/boca/manual_scrape.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/tooling/converter.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/tooling/main.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/captured_log.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/css/app.tcss +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/main.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/screens/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/screens/build.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/screens/command.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/screens/differ.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/screens/error.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/screens/rich_log_modal.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/screens/run.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/screens/run_explorer.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/screens/run_test_explorer.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/screens/selector.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/screens/test_explorer.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/utils/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/utils/run_ui.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/widgets/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/widgets/diff_box.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/widgets/file_log.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/widgets/interaction_box.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/widgets/rich_log_box.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/widgets/test_output_box.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/ui/widgets/two_sided_test_output_box.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/unit.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/box/validators.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/config.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/console.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/caching.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/debug_context.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/grading_context.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/judge/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/judge/cacher.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/judge/digester.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/judge/program.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/judge/sandbox.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/judge/sandboxes/__init__.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/judge/sandboxes/stupid_sandbox.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/judge/sandboxes/tee.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/judge/storage.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/limits.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/profiling.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/grading/steps_with_caching.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/checkers/boilerplate.cpp +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/checkers/noop.cpp +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/default_config.json +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/default_setter_config.mac.yml +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/default_setter_config.yml +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/envs/default.rbx.yml +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/checker.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/compare.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/compile/c +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/compile/cc +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/compile/cpp +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/compile/java +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/compile/py2 +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/compile/py3 +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/interactive/c +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/interactive/cc +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/interactive/cpp +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/interactive/java +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/interactive/py2 +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/interactive/py3 +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/interactor_compile.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/interactor_run.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/run/bkp +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/run/c +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/run/cc +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/run/cpp +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/run/java +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/run/py2 +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/run/py3 +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/safeexec.c +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/boca/safeexec_compile.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/c/compile.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/c/prep.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/c/run.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/compare.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/cpp/compile.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/cpp/prep.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/cpp/run.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/interactor_prep.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/interactor_run.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/java/compile.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/java/prep.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/java/run.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/py2/compile.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/py2/prep.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/py2/run.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/py3/compile.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/py3/prep.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/packagers/moj/scripts/py3/run.sh +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/contest/.gitignore +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/contest/contest.rbx.yml +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/contest/statement/contest.rbx.tex +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/contest/statement/info.rbx.tex +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/contest/statement/instructions.tex +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/contest/statement/logo.png +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/problem/.gitignore +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/problem/gens/gen.cpp +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/problem/manual_tests/samples/000.in +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/problem/manual_tests/samples/001.in +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/problem/problem.rbx.yml +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/problem/rbx.h +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/problem/sols/main.cpp +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/problem/sols/wa-overflow.cpp +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/problem/statement/statement.rbx.tex +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/problem/testlib.h +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/problem/testplan/random.py +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/problem/testplan/random.txt +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/problem/validator.cpp +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/problem/wcmp.cpp +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/shared/contest_template.rbx.tex +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/shared/icpc.sty +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/presets/default/shared/problem_template.rbx.tex +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/templates/rbx.h +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/resources/templates/template.cpp +0 -0
- {rbx_cp-0.17.7 → rbx_cp-0.18.0}/rbx/testing_utils.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: rbx.cp
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.18.0
|
4
4
|
Summary:
|
5
5
|
Author: Roberto Sales
|
6
6
|
Requires-Python: >=3.9.1,<4.0.0
|
@@ -34,6 +34,7 @@ Requires-Dist: pydantic (>=2.11.7,<3.0.0)
|
|
34
34
|
Requires-Dist: pydantic-xml[lxml] (>=2.11.0,<3.0.0)
|
35
35
|
Requires-Dist: pypandoc (>=1.15,<2.0)
|
36
36
|
Requires-Dist: pyte (>=0.8.2,<0.9.0)
|
37
|
+
Requires-Dist: python-dotenv (>=1.1.1,<2.0.0)
|
37
38
|
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
|
38
39
|
Requires-Dist: questionary (>=2.1.0,<3.0.0)
|
39
40
|
Requires-Dist: requests (>=2.32.3,<3.0.0)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "rbx.cp"
|
3
|
-
version = "0.
|
3
|
+
version = "0.18.0"
|
4
4
|
description = ""
|
5
5
|
packages = [
|
6
6
|
{include = "rbx"}
|
@@ -53,6 +53,7 @@ sqlitedict = "^2.1.0"
|
|
53
53
|
throttlex = "^1.0.0"
|
54
54
|
typing-extensions = "^4.14.1"
|
55
55
|
semver = "^3.0.4"
|
56
|
+
python-dotenv = "^1.1.1"
|
56
57
|
|
57
58
|
[tool.poetry.scripts]
|
58
59
|
rbx = "rbx.box.main:app"
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = '0.18.0'
|
@@ -23,6 +23,7 @@ from rbx.box.environment import (
|
|
23
23
|
get_execution_config,
|
24
24
|
get_file_mapping,
|
25
25
|
get_language,
|
26
|
+
get_language_by_extension,
|
26
27
|
get_mapped_command,
|
27
28
|
get_mapped_commands,
|
28
29
|
get_sandbox_params_from_config,
|
@@ -81,7 +82,7 @@ def get_extension(code: CodeItem) -> str:
|
|
81
82
|
def find_language_name(code: CodeItem) -> str:
|
82
83
|
if code.language is not None:
|
83
84
|
return get_language(code.language).name
|
84
|
-
return
|
85
|
+
return get_language_by_extension(get_extension(code)).name
|
85
86
|
|
86
87
|
|
87
88
|
def is_executable_sanitized(executable: DigestOrSource) -> bool:
|
@@ -113,6 +114,12 @@ CXX_WARNING_FLAGS = (
|
|
113
114
|
)
|
114
115
|
|
115
116
|
|
117
|
+
def add_color_flags_to_command(command: str) -> str:
|
118
|
+
if is_cxx_command(command):
|
119
|
+
return command + ' -fdiagnostics-color=always'
|
120
|
+
return command
|
121
|
+
|
122
|
+
|
116
123
|
def add_warning_flags_to_command(command: str) -> str:
|
117
124
|
if is_cxx_command(command):
|
118
125
|
return command + ' ' + CXX_WARNING_FLAGS
|
@@ -121,6 +128,7 @@ def add_warning_flags_to_command(command: str) -> str:
|
|
121
128
|
|
122
129
|
def add_warning_flags(commands: List[str], force_warnings: bool) -> List[str]:
|
123
130
|
cfg = setter_config.get_setter_config()
|
131
|
+
commands = [add_color_flags_to_command(command) for command in commands]
|
124
132
|
if cfg.warnings.enabled or force_warnings:
|
125
133
|
return [add_warning_flags_to_command(command) for command in commands]
|
126
134
|
return commands
|
@@ -512,6 +520,7 @@ def compile_item(
|
|
512
520
|
dependency_cache = package.get_dependency_cache()
|
513
521
|
sandbox = package.get_singleton_sandbox()
|
514
522
|
sandbox_params = get_sandbox_params_from_config(compilation_options.sandbox)
|
523
|
+
sandbox_params.set_env['CLICOLOR_FORCE'] = '1'
|
515
524
|
|
516
525
|
if not compilation_options.commands:
|
517
526
|
# Language is not compiled.
|
@@ -302,6 +302,17 @@ def get_language(name: str) -> EnvironmentLanguage:
|
|
302
302
|
raise typer.Exit()
|
303
303
|
|
304
304
|
|
305
|
+
@functools.cache
|
306
|
+
def get_language_by_extension(extension: str) -> EnvironmentLanguage:
|
307
|
+
for lang in get_environment().languages:
|
308
|
+
if lang.extension == extension:
|
309
|
+
return lang
|
310
|
+
console.console.print(
|
311
|
+
f'Language with extension [item]{extension}[/item] not found.', style='error'
|
312
|
+
)
|
313
|
+
raise typer.Exit()
|
314
|
+
|
315
|
+
|
305
316
|
def install_environment(name: str, file: pathlib.Path):
|
306
317
|
if not file.is_file():
|
307
318
|
console.console.print(
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import os
|
2
1
|
import pathlib
|
3
2
|
import tempfile
|
4
3
|
from typing import Any, Dict, Optional
|
@@ -7,7 +6,7 @@ import rich
|
|
7
6
|
import rich.progress
|
8
7
|
import typer
|
9
8
|
|
10
|
-
from rbx import console
|
9
|
+
from rbx import console, utils
|
11
10
|
from rbx.box import header, limits_info, naming, package
|
12
11
|
from rbx.box.generators import get_all_built_testcases
|
13
12
|
from rbx.box.lang import code_to_langs, is_valid_lang_code
|
@@ -28,11 +27,14 @@ from rbx.box.testcase_utils import (
|
|
28
27
|
|
29
28
|
_API_URL = 'https://polygon.codeforces.com/api'
|
30
29
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
30
|
+
|
31
|
+
def _get_polygon_api() -> api.Polygon:
|
32
|
+
env = utils.environ()
|
33
|
+
return api.Polygon(
|
34
|
+
_API_URL,
|
35
|
+
env.get('POLYGON_API_KEY', '').strip(),
|
36
|
+
env.get('POLYGON_API_SECRET', '').strip(),
|
37
|
+
)
|
36
38
|
|
37
39
|
|
38
40
|
def _get_source_type(code: CodeItem):
|
@@ -56,7 +58,8 @@ def _get_solution_tag(solution: Solution, is_first: bool = False) -> api.Solutio
|
|
56
58
|
|
57
59
|
|
58
60
|
def _find_or_create_problem(problem_name: str) -> api.Problem:
|
59
|
-
|
61
|
+
api = _get_polygon_api()
|
62
|
+
results = api.problems_list(name=problem_name)
|
60
63
|
for result in results:
|
61
64
|
if result.name == problem_name:
|
62
65
|
console.console.print(
|
@@ -64,7 +67,7 @@ def _find_or_create_problem(problem_name: str) -> api.Problem:
|
|
64
67
|
)
|
65
68
|
return result
|
66
69
|
console.console.print(f'Creating new problem [item]{problem_name}[/item].')
|
67
|
-
return
|
70
|
+
return api.problem_create(problem_name)
|
68
71
|
|
69
72
|
|
70
73
|
def _update_problem_info(problem: api.Problem):
|
@@ -3,6 +3,7 @@ import pathlib
|
|
3
3
|
import shutil
|
4
4
|
|
5
5
|
from rbx import console, utils
|
6
|
+
from rbx.box.formatting import href
|
6
7
|
from rbx.box.schema import CodeItem
|
7
8
|
from rbx.grading.judge.cacher import FileCacher
|
8
9
|
from rbx.grading.steps import GradingFileOutput
|
@@ -70,7 +71,7 @@ def print_warning_stack_report():
|
|
70
71
|
return
|
71
72
|
console.console.rule('[status]Warning stack[/status]')
|
72
73
|
console.console.print(
|
73
|
-
f'[warning]There were some warnings within the code that run at
|
74
|
+
f'[warning]There were some warnings within the code that run at {href(stack.root.absolute())}[/warning]'
|
74
75
|
)
|
75
76
|
if stack.warnings:
|
76
77
|
console.console.print(f'{len(stack.warnings)} compilation warnings')
|
@@ -78,13 +79,13 @@ def print_warning_stack_report():
|
|
78
79
|
'You can use [item]rbx compile[/item] to reproduce the issues with the files below.'
|
79
80
|
)
|
80
81
|
for path in sorted(stack.warnings):
|
81
|
-
console.console.print(f'-
|
82
|
+
console.console.print(f'- {href(path)}')
|
82
83
|
console.console.print()
|
83
84
|
|
84
85
|
if stack.sanitizer_warnings:
|
85
86
|
console.console.print(f'{len(stack.sanitizer_warnings)} sanitizer warnings')
|
86
87
|
for path in sorted(stack.sanitizer_warnings):
|
87
88
|
console.console.print(
|
88
|
-
f'-
|
89
|
+
f'- {href(path)}, example log at {href(stack.sanitizer_warnings[path])}'
|
89
90
|
)
|
90
91
|
console.console.print()
|
@@ -1,6 +1,5 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
-
import os
|
4
3
|
import pathlib
|
5
4
|
import re
|
6
5
|
import typing
|
@@ -9,6 +8,7 @@ from typing import Annotated, Any, Dict, List, Optional
|
|
9
8
|
from pydantic import AfterValidator, BaseModel, ConfigDict, Field, model_validator
|
10
9
|
from pydantic_core import PydanticCustomError
|
11
10
|
|
11
|
+
from rbx import utils
|
12
12
|
from rbx.autoenum import AutoEnum, alias
|
13
13
|
from rbx.box.fields import NameField, Primitive, RecVars, Vars, expand_vars
|
14
14
|
from rbx.box.statements.expander import expand_statements
|
@@ -492,8 +492,8 @@ A formula to estimate the time limit for the problem.
|
|
492
492
|
res = modifier.time
|
493
493
|
if modifier.timeMultiplier is not None:
|
494
494
|
res = int(res * float(modifier.timeMultiplier))
|
495
|
-
if 'RBX_TIME_MULTIPLIER' in
|
496
|
-
res = int(res * float(
|
495
|
+
if 'RBX_TIME_MULTIPLIER' in utils.environ():
|
496
|
+
res = int(res * float(utils.environ()['RBX_TIME_MULTIPLIER']))
|
497
497
|
return res
|
498
498
|
|
499
499
|
def memorylimit_for_language(self, language: Optional[str] = None) -> int:
|
@@ -742,14 +742,14 @@ async def run_and_print_interactive_solutions(
|
|
742
742
|
stdout_path = stdout_path.with_suffix('.pout')
|
743
743
|
|
744
744
|
if stdout_path.is_file():
|
745
|
-
console.console.print(f'[status]Output:[/status] {stdout_path}')
|
745
|
+
console.console.print(f'[status]Output:[/status] {href(stdout_path)}')
|
746
746
|
if stdout_path.with_suffix('.pio').is_file():
|
747
747
|
console.console.print(
|
748
|
-
f'[status]Interaction:[/status] {stdout_path.with_suffix(".pio")}'
|
748
|
+
f'[status]Interaction:[/status] {href(stdout_path.with_suffix(".pio"))}'
|
749
749
|
)
|
750
750
|
if eval.log.stderr_absolute_path is not None:
|
751
751
|
console.console.print(
|
752
|
-
f'[status]Stderr:[/status] {eval.log.stderr_absolute_path}'
|
752
|
+
f'[status]Stderr:[/status] {href(eval.log.stderr_absolute_path)}'
|
753
753
|
)
|
754
754
|
console.console.print()
|
755
755
|
|
@@ -22,9 +22,8 @@ def scrape_boca(into_path: pathlib.Path):
|
|
22
22
|
|
23
23
|
def work(run: BocaRun):
|
24
24
|
scraper.download_run(
|
25
|
-
run
|
26
|
-
|
27
|
-
pathlib.Path(into_path) / run.problem_shortname,
|
25
|
+
run,
|
26
|
+
pathlib.Path(into_path),
|
28
27
|
name=f'{run.run_number}-{run.site_number}-{run.outcome.short_name().lower()}',
|
29
28
|
)
|
30
29
|
|
@@ -1,10 +1,8 @@
|
|
1
1
|
import datetime
|
2
2
|
import functools
|
3
3
|
import hashlib
|
4
|
-
import os
|
5
4
|
import pathlib
|
6
5
|
import re
|
7
|
-
import shutil
|
8
6
|
import time
|
9
7
|
import typing
|
10
8
|
from typing import Any, Callable, List, NoReturn, Optional, Tuple, Union
|
@@ -16,7 +14,7 @@ from bs4 import BeautifulSoup, Tag
|
|
16
14
|
from pydantic import BaseModel
|
17
15
|
from throttlex import Throttler
|
18
16
|
|
19
|
-
from rbx import console
|
17
|
+
from rbx import console, utils
|
20
18
|
from rbx.box import naming
|
21
19
|
from rbx.box.tooling.boca.debug_utils import pretty_print_request_data
|
22
20
|
from rbx.grading.steps import Outcome
|
@@ -32,7 +30,7 @@ UPLOAD_LOG_REGEX = re.compile(r'Problem (\d+) \([^\)]+\) updated')
|
|
32
30
|
def _parse_env_var(var: str, override: Optional[str]) -> str:
|
33
31
|
if override is not None:
|
34
32
|
return override
|
35
|
-
value =
|
33
|
+
value = utils.environ().get(var)
|
36
34
|
if value is None:
|
37
35
|
console.console.print(
|
38
36
|
f'[error][item]{var}[/item] is not set. Set it as an environment variable.[/error]'
|
@@ -635,7 +633,7 @@ class BocaScraper:
|
|
635
633
|
)
|
636
634
|
final_path = into_dir / filename
|
637
635
|
final_path.parent.mkdir(parents=True, exist_ok=True)
|
638
|
-
|
636
|
+
final_path.write_text(detailed_run.code)
|
639
637
|
return final_path
|
640
638
|
|
641
639
|
def _set_starttime(
|
@@ -617,6 +617,7 @@ _WARNING_RE = re.compile(r'([^:]+):\d+:\d+:[ ]+warning:.*')
|
|
617
617
|
def _check_for_compilation_warnings_in_line(line: str) -> bool:
|
618
618
|
if line.startswith('./'):
|
619
619
|
return False
|
620
|
+
line = utils.strip_ansi_codes(line)
|
620
621
|
match = _WARNING_RE.match(line)
|
621
622
|
if match is None:
|
622
623
|
return False
|
@@ -98,36 +98,31 @@ fi
|
|
98
98
|
|
99
99
|
maxms=100
|
100
100
|
|
101
|
-
|
102
|
-
jarfile=run.jar
|
103
|
-
else
|
104
|
-
jarfile=$2
|
105
|
-
fi
|
101
|
+
jarfile=run.jar
|
106
102
|
|
107
103
|
cdir=$(pwd)
|
108
104
|
echo "Current directory is $cdir" >&2
|
109
|
-
|
110
|
-
|
111
|
-
mainname=Main
|
112
|
-
fi
|
105
|
+
|
106
|
+
mv "src/$name" "src/Main.kt"
|
113
107
|
|
114
108
|
cat <<EOF >compileit.sh
|
115
109
|
#!/bin/bash
|
116
|
-
kotlinc
|
110
|
+
kotlinc=$(which kotlinc)
|
111
|
+
[ -x "\$kotlinc" ] || kotlinc=/snap/kotlin/24/bin/kotlinc
|
117
112
|
[ -x "\$kotlinc" ] || kotlinc=/snap/bin/kotlinc
|
113
|
+
[ -x "\$kotlinc" ] || kotlinc=/opt/kotlinc/bin/kotlinc
|
118
114
|
if [ ! -x \$kotlinc ]; then
|
119
115
|
echo "\$kotlinc not found or it's not executable"
|
120
116
|
exit 47
|
121
117
|
fi
|
122
118
|
cd src
|
123
|
-
\$kotlinc -
|
119
|
+
\$kotlinc -d ../$jarfile -include-runtime Main.kt
|
124
120
|
echo \$? > ../compileit.retcode
|
125
121
|
|
126
122
|
exit 0
|
127
123
|
EOF
|
128
124
|
chmod 755 compileit.sh
|
129
125
|
|
130
|
-
echo "COMPILATION IS NOT BEING CHROOTED -- THIS IS NOT AN IDEAL SETTING"
|
131
126
|
#$kotlinc "$name"
|
132
127
|
$sf -r1 -t20 -T32 -istdin0 -F512 -u512 -U$bocau -G$bocag -n0 -C. -d40000000000 -m40000000000 ./compileit.sh
|
133
128
|
#./compileit.sh
|
@@ -148,4 +143,5 @@ if [ "$ret" != "0" ]; then
|
|
148
143
|
echo "Compilation Error: $ret"
|
149
144
|
ret=1
|
150
145
|
fi
|
146
|
+
echo "Kotlin compilation successful with return code $ret"
|
151
147
|
exit $ret
|
@@ -70,9 +70,17 @@ if [ "$1" == "" -o "$2" == "" -o "$3" == "" ]; then
|
|
70
70
|
echo "parameter problem"
|
71
71
|
exit 43
|
72
72
|
fi
|
73
|
-
if [
|
74
|
-
|
75
|
-
|
73
|
+
if [ -r run.exe ]; then
|
74
|
+
rm -f run.jar
|
75
|
+
cp run.exe run.jar
|
76
|
+
fi
|
77
|
+
if [ -r "$1" ]; then
|
78
|
+
rm -f run.jar
|
79
|
+
cp "$1" run.jar
|
80
|
+
fi
|
81
|
+
if [ ! -r run.jar ]; then
|
82
|
+
echo "ERROR: file run.jar not found - possible error during compilation"
|
83
|
+
exit 1
|
76
84
|
fi
|
77
85
|
name=$(basename "$1")
|
78
86
|
if [ "${name##*.}" == "class" -a "${name##*.}" == "CLASS" ]; then
|
@@ -114,6 +122,7 @@ if [ "$5" != "" ]; then
|
|
114
122
|
maxm=${5}000
|
115
123
|
fi
|
116
124
|
fi
|
125
|
+
let "maxms = $maxm / 10"
|
117
126
|
maxf=1024
|
118
127
|
if [ "$6" != "" ]; then
|
119
128
|
if [ "$6" -gt "0" ]; then
|
@@ -143,14 +152,13 @@ if [ $? -eq 0 ]; then
|
|
143
152
|
cd "$cdir"
|
144
153
|
[ -f /proc/cpuinfo ] || /bin/mount -t proc proc /proc
|
145
154
|
[ -d /sys/kernel ] || /bin/mount -t sysfs sysfs /sys
|
146
|
-
|
147
|
-
[ -x "\$
|
148
|
-
if [ ! -x "\$
|
149
|
-
echo "\$
|
155
|
+
java=$(which java)
|
156
|
+
[ -x "\$java" ] || java=/usr/bin/java
|
157
|
+
if [ ! -x "\$java" ]; then
|
158
|
+
echo "\$java not found or it's not executable"
|
150
159
|
exit 47
|
151
160
|
fi
|
152
|
-
|
153
|
-
./runit.sh "$cdir" "$sf" "$ttime" -r$nruns -t$time -T$ttime -F512 -u512 -U$bocau -G$bocag -n0 -C. -d40000000000 -m40000000000 -- "\$kotlin" -cp run.jar -J-Xmx${maxm}K -J-Xss${maxms}K -J-Xms${maxm}K "$name"
|
161
|
+
./runit.sh "$cdir" "$sf" "$ttime" -r$nruns -t$time -T$ttime -F256 -u256 -U$bocau -G$bocag -n0 -C. -f20000 -d20000000 -m20000000 -- "\$java" -cp run.jar -Xmx${maxm}K -Xss${maxms}K -Xms${maxm}K MainKt
|
154
162
|
retval=\$?
|
155
163
|
echo \$retval > runch.exitcode
|
156
164
|
if [ ! -d /bocajail ]; then
|
@@ -111,7 +111,7 @@ if [ "$4" != "" ]; then
|
|
111
111
|
nruns=$4
|
112
112
|
fi
|
113
113
|
fi
|
114
|
-
maxm=
|
114
|
+
maxm=512000
|
115
115
|
if [ "$5" != "" ]; then
|
116
116
|
if [ "$5" -gt "0" ]; then
|
117
117
|
maxm=${5}000
|
@@ -130,18 +130,52 @@ cp "$2" stdin0 2>/dev/null
|
|
130
130
|
|
131
131
|
cdir=$(pwd)
|
132
132
|
echo "Current directory is $cdir" >&2
|
133
|
-
echo
|
134
|
-
|
135
|
-
echo
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
133
|
+
echo $cdir | grep -q "/bocajail"
|
134
|
+
if [ $? == 0 ]; then
|
135
|
+
cdir=$(echo $cdir | sed "s/.*\/bocajail//")
|
136
|
+
cat <<EOF >runit.sh
|
137
|
+
#!/bin/bash
|
138
|
+
cd "$cdir"
|
139
|
+
[ -f /proc/cpuinfo ] || /bin/mount -t proc proc /proc
|
140
|
+
#/bin/mount --bind /dev /dev
|
141
|
+
[ -d /sys/kernel ] || /bin/mount -t sysfs sysfs /sys
|
142
|
+
java=$(which java)
|
143
|
+
[ -x "\$java" ] || java=/usr/bin/java
|
144
|
+
if [ ! -x "\$java" ]; then
|
145
|
+
echo "\$java not found or it's not executable"
|
146
|
+
exit 47
|
147
|
+
fi
|
148
|
+
"$sf" -r$nruns -t$time -T$ttime -istdin0 -F256 -u256 -ostdout0 -estderr0 -U$bocau -G$bocag -n0 -C. -f20000 -d20000000 -m20000000 -- "\$java" -cp run.jar -Xmx${maxm}K -Xss${maxms}K -Xms${maxm}K MainKt
|
149
|
+
retval=\$?
|
150
|
+
echo \$retval > runit.retcode
|
151
|
+
if [ ! -d /bocajail ]; then
|
152
|
+
/bin/umount /proc 2>/dev/null
|
153
|
+
#/bin/umount /dev
|
154
|
+
/bin/umount /sys 2>/dev/null
|
155
|
+
fi
|
156
|
+
EOF
|
157
|
+
chmod 755 runit.sh
|
158
|
+
chroot /bocajail "$cdir/runit.sh"
|
159
|
+
if [ -r runit.retcode ]; then
|
160
|
+
ret=$(cat runit.retcode)
|
161
|
+
fi
|
162
|
+
if [ "$ret" == "" ]; then
|
163
|
+
echo "Execution error - check autojudging"
|
164
|
+
exit 49
|
165
|
+
fi
|
166
|
+
else
|
167
|
+
echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
|
168
|
+
echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
|
169
|
+
echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2
|
170
|
+
java=$(which java)
|
171
|
+
[ -x "$java" ] || java=/usr/bin/java
|
172
|
+
if [ ! -x "$java" ]; then
|
173
|
+
echo "$java not found or it's not executable"
|
174
|
+
exit 47
|
175
|
+
fi
|
176
|
+
"$sf" -r$nruns -t$time -T$ttime -istdin0 -F256 -u256 -U$bocau -G$bocag -ostdout0 -estderr0 -n0 -C. -d20000000 -m20000000 -- "$java" -jar run.jar -Xmx${maxm}K -Xss${maxms}K -Xms${maxm}K
|
177
|
+
ret=$?
|
178
|
+
fi
|
145
179
|
if [ $ret -gt 10 ]; then
|
146
180
|
if [ -r stderr0 ]; then
|
147
181
|
grep -q "not find or load main class" stderr0
|
@@ -22,9 +22,6 @@ languages:
|
|
22
22
|
command: "./{executable}"
|
23
23
|
fileMapping:
|
24
24
|
compilable: "compilable.cpp"
|
25
|
-
extensions:
|
26
|
-
boca:
|
27
|
-
bocaLanguage: "cc"
|
28
25
|
- name: "c"
|
29
26
|
readableName: "C"
|
30
27
|
extension: "c"
|
@@ -58,9 +55,22 @@ languages:
|
|
58
55
|
fileMapping:
|
59
56
|
compilable: "Main.java"
|
60
57
|
executable: "Main.jar"
|
58
|
+
- name: "kotlin"
|
59
|
+
readableName: "Kotlin"
|
60
|
+
extension: "kt"
|
61
|
+
compilation:
|
62
|
+
commands:
|
63
|
+
- "kotlinc -d {executable} -include-runtime {compilable}"
|
64
|
+
execution:
|
65
|
+
command:
|
66
|
+
"java -Xss100m -Xmx{{memory}}m -Xms{{initialMemory}}m -cp {executable}
|
67
|
+
MainKt"
|
68
|
+
fileMapping:
|
69
|
+
compilable: "Main.kt"
|
70
|
+
executable: "Main.jar"
|
61
71
|
extensions:
|
62
72
|
boca:
|
63
|
-
languages: ["c", "
|
73
|
+
languages: ["c", "cpp", "java", "py3", "kt"]
|
64
74
|
flags:
|
65
75
|
c: "-O2 -lm -static"
|
66
76
|
cc: "-std=c++20 -O2 -lm -static"
|
@@ -9,8 +9,9 @@ import re
|
|
9
9
|
import shutil
|
10
10
|
import subprocess
|
11
11
|
import sys
|
12
|
-
from typing import Any, Optional, Type, TypeVar, Union
|
12
|
+
from typing import Any, Dict, Optional, Type, TypeVar, Union
|
13
13
|
|
14
|
+
import dotenv
|
14
15
|
import rich
|
15
16
|
import rich.markup
|
16
17
|
import rich.prompt
|
@@ -123,6 +124,16 @@ def escape_markup(s: str) -> str:
|
|
123
124
|
return rich.markup.escape(s, _escape=re.compile(r'(\\*)(\[)').sub)
|
124
125
|
|
125
126
|
|
127
|
+
ANSI_RE = re.compile(r'\x1b\[[0-9;]*m')
|
128
|
+
|
129
|
+
|
130
|
+
def strip_ansi_codes(text: str) -> str:
|
131
|
+
"""
|
132
|
+
Removes ANSI escape codes (including color codes) from a string.
|
133
|
+
"""
|
134
|
+
return ANSI_RE.sub('', text)
|
135
|
+
|
136
|
+
|
126
137
|
def abspath(path: pathlib.Path) -> pathlib.Path:
|
127
138
|
return pathlib.Path(os.path.abspath(path))
|
128
139
|
|
@@ -403,3 +414,27 @@ class StatusProgress(rich.status.Status):
|
|
403
414
|
def step(self, delta: int = 1):
|
404
415
|
self.processed += delta
|
405
416
|
self.update_with_progress(self.processed)
|
417
|
+
|
418
|
+
|
419
|
+
@functools.cache
|
420
|
+
def _read_envrc_at(path: pathlib.Path) -> Dict[str, str]:
|
421
|
+
entries = []
|
422
|
+
while os.path.dirname(str(path)) != str(path):
|
423
|
+
envrc = path / '.envrc'
|
424
|
+
envrc_local = path / '.envrc.local'
|
425
|
+
if envrc_local.is_file():
|
426
|
+
entries.append(dotenv.dotenv_values(envrc_local))
|
427
|
+
if envrc.is_file():
|
428
|
+
entries.append(dotenv.dotenv_values(envrc))
|
429
|
+
path = path.parent
|
430
|
+
|
431
|
+
res = {}
|
432
|
+
for entry in reversed(entries):
|
433
|
+
res.update(entry)
|
434
|
+
return res
|
435
|
+
|
436
|
+
|
437
|
+
def environ() -> Dict[str, str]:
|
438
|
+
res = os.environ.copy()
|
439
|
+
res.update(_read_envrc_at(pathlib.Path.cwd()))
|
440
|
+
return res
|
rbx_cp-0.17.7/rbx/__version__.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = '0.17.7'
|
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
|