Environment schema#
Environment#
BaseCompilationConfig
#
Bases: BaseModel
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
commands
|
List[str] | None
|
Commands to compile the program. |
[]
|
sandbox
|
EnvironmentSandbox | None
|
Sandbox configuration to use when compiling for this language. |
None
|
passthrough
|
bool | None
|
Whether to pass through the compilable as an executable file. |
None
|
Source code in rbx/box/environment.py
BaseExecutionConfig
#
Bases: BaseModel
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
command
|
str | None
|
Command to run the program. |
None
|
sandbox
|
EnvironmentSandbox | None
|
Sandbox configuration to use when executing for this language. |
None
|
problemLimits
|
Limits
|
Original limits of the problem. |
<dynamic>
|
Source code in rbx/box/environment.py
CompilationConfig
#
Bases: BaseCompilationConfig
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
solutionOverrides
|
SolutionCompilationOverrides
|
Overrides to apply when compiling solutions for this language. |
<dynamic>
|
Source code in rbx/box/environment.py
Environment
#
Bases: BaseModel
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
defaultFileMapping
|
FileMapping | None
|
Default mapping for files within the sandbox. Fields in the mapping can be individually overridden in the language configuration. |
None
|
defaultCompilation
|
CompilationConfig | None
|
Default compilation configuration to use when compiling programs. Fields in the compilation config can be individually overridden in the language configuration. |
None
|
defaultExecution
|
ExecutionConfig | None
|
Default execution configuration to use when running programs. Fields in the execution config can be individually overridden in the language configuration. |
None
|
languages
|
List[EnvironmentLanguage]
|
Configuration for each language supported in this environment. |
[]
|
sandbox
|
str
|
Identifier of the sandbox used by this environment (e.g. "stupid") |
'stupid'
|
timing
|
TimingConfig
|
Timing configuration for the environment. |
<dynamic>
|
extensions
|
Extensions | None
|
Extensions to be added to the environment. |
None
|
buildDir
|
Path
|
Directory to store the build files. |
PosixPath('build')
|
Source code in rbx/box/environment.py
EnvironmentLanguage
#
Bases: BaseModel
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identifier of this language within this environment. |
required |
readableName
|
str | None
|
Readable name for this language. |
None
|
extension
|
str
|
File extension supported by this language. If there's only one language that supports a certain file extension in the environment, the tool will automatically identify the language based on such extension. |
required |
extraExtensions
|
List[str]
|
Extra file extensions supported by this language. If not specified, the tool will automatically identify the language based on such extensions. |
<dynamic>
|
compilation
|
CompilationConfig | None
|
Compilation config to use when compiling programs for this language. |
None
|
execution
|
ExecutionConfig
|
Execution config to use when running programs for this language. |
required |
fileMapping
|
FileMapping | None
|
Mapping for files within the sandbox. If not specified, the default mapping for the environment will be used. |
None
|
extensions
|
LanguageExtensions | None
|
Extensions to apply for this language. |
None
|
Source code in rbx/box/environment.py
EnvironmentSandbox
#
Bases: BaseModel
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
maxProcesses
|
int | None
|
Max. number of process to allow to run concurrently for the program. |
1
|
timeLimit
|
int | None
|
Time limit in milliseconds to allow the program to run. |
None
|
wallTimeLimit
|
int | None
|
Wall time limit in milliseconds to allow the program to run. |
None
|
memoryLimit
|
int | None
|
Memory limit in MiB. |
None
|
fileSizeLimit
|
int | None
|
File size limit in KiB |
None
|
stackLimit
|
int | None
|
Stack limit in MiB. |
None
|
preserveEnv
|
bool | None
|
Whether to preserve env. variables coming from the host. |
False
|
mirrorDirs
|
List[str] | None
|
Directories in the host that should be read-only exposed to the sandbox. |
[]
|
Source code in rbx/box/environment.py
ExecutionConfig
#
Bases: BaseExecutionConfig
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
solutionOverrides
|
SolutionExecutionOverrides
|
Overrides to apply when executing solutions for this language. |
<dynamic>
|
Source code in rbx/box/environment.py
FileMapping
#
Bases: BaseModel
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
str
|
Path where to copy the stdin file to before running the program, relative to the sandbox root. |
'stdin'
|
output
|
str
|
Path where to output the stdout file after running the program, relative to the sandbox root. |
'stdout'
|
error
|
str
|
Path where to output the stderr file after running the program, relative to the sandbox root. |
'stderr'
|
capture
|
str
|
Path where to output the capture file after running the program, relative to the sandbox root. |
'capture'
|
compilable
|
str
|
Path where to copy the compilable file to before compiling the program, relative to the sandbox root. |
'{source}'
|
executable
|
str
|
Path to where to output the executable file after compiling the program, relative to the sandbox root. |
'executable'
|
Source code in rbx/box/environment.py
SolutionCompilationOverrides
#
SolutionExecutionOverrides
#
TimingConfig
#
Bases: BaseModel
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
formula
|
str
|
Formula to use to calculate the time limit for the environment. |
'step_up(max(fastest * 3, slowest * 1.5), 100)'
|
Source code in rbx/box/environment.py
Extensions#
Extensions
#
Bases: BaseModel
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
boca
|
BocaExtension | None
|
Environment-level extensions for BOCA packaging. |
None
|
Source code in rbx/box/extensions.py
LanguageExtensions
#
Bases: BaseModel
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
boca
|
BocaLanguageExtension | None
|
Language-level extensions for BOCA packaging. |
None
|
polygon
|
PolygonLanguageExtension | None
|
Language-level extensions for Polygon packaging. |
None
|
Source code in rbx/box/extensions.py
BOCA#
BocaExtension
#
Bases: BaseModel
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
languages
|
List[Literal[c, cpp, cc, kt, java, py2, py3]]
|
|
['c', 'cpp', 'cc', 'kt', 'java', 'py2', 'py3']
|
flags
|
Dict[Literal[c, cpp, cc, kt, java, py2, py3], str]
|
|
{}
|
maximumTimeError
|
float
|
|
0.2
|
preferContestLetter
|
bool
|
|
False
|
usePypy
|
bool
|
|
False
|