Environment schema#
Environment#
CompilationConfig
#
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
|
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
|
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 |
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: 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
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. |
'compilable'
|
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
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
|
Source code in rbx/box/extensions.py
BOCA#
BocaExtension
#
Bases: BaseModel
Parameters:
Name | Type | Description | Default |
---|---|---|---|
languages |
List[Literal[str, str, str, str, str, str, str]]
|
|
['c', 'cpp', 'cc', 'kt', 'java', 'py2', 'py3']
|
flags |
Dict[Literal[str, str, str, str, str, str, str], str]
|
|
{}
|
maximumTimeError |
float
|
|
0.2
|
preferContestLetter |
bool
|
|
False
|