@ -29,6 +29,10 @@ In whole exercise configuration and appropriate structures variables and ports a
Represents basic exercise configuration which connects all things together. For some reasons there two formats of this configuration, one which is saved in the database and the other one which is sent back to web application. Both formats are described bellow.
Represents basic exercise configuration which connects all things together. For some reasons there two formats of this configuration, one which is saved in the database and the other one which is sent back to web application. Both formats are described bellow.
Important features:
* Variables table in exercise config can contain **references** to variables which should be given during submitting of solution. Variable is reference if it starts with the character **'$'**, variable cannot be used inside variable value (textual value "hello $world", where world should be reference, is not allowed). If for some reasons is needed to use variable value which starts with dollar sign it has to be escaped with backslash, so this "\$1 million" is actual value and not a reference.
### Frontend Format
### Frontend Format
Returned as JSON. There is one generated "environment" which is called "default" in here default pipelines for all tests can be found.
Returned as JSON. There is one generated "environment" which is called "default" in here default pipelines for all tests can be found.
@ -225,13 +229,13 @@ Pipelines are sent to clients in JSON format and are stored in API in correspond
Important features:
Important features:
* Every port either have to have defined reference to variable or it has to be blank. Actual value (for example string) is not allowed in port. If variable name is declared in port it has to exist in variables table.
* Every port either have to have defined reference to variable or it has to be blank. Actual value (for example string) is not allowed in port. If variable name is declared in port it has to exist in variables table.
* Connection between ports can be one-to-one or one-to-many from the perspective of output port. That means it is possible to have one output port which redirects variables to two or more input ports. Of course there has to be exception, it is allowed to have variable which is used only in input port, value of this variable has to be defined in pipeline variables table.
* Connection between ports can be **one-to-one** or **one-to-many** from the perspective of output port. That means it is possible to have one output port which redirects variables to two or more input ports. Of course there has to be exception, it is allowed to have variable which is used only in input port, value of this variable has to be defined in pipeline variables table.
* Variables table in pipeline can contain references to external variables, these references can be directed to variables from environment configuration or exercise configuration. Variable is reference if it starts with the character '$', variable cannot be used inside variable value (textual value "hello $world", where world should be reference, is not allowed). If for some reasons is needed to use variable value which starts with dollar sign it has to be escaped with backslash, so this "\$1 million" is actual value and not a reference.
* Variables table in pipeline can contain **references** to external variables, these references can be directed to variables from environment configuration or exercise configuration. Variable is reference if it starts with the character **'$'**, variable cannot be used inside variable value (textual value "hello $world", where world should be reference, is not allowed). If for some reasons is needed to use variable value which starts with dollar sign it has to be escaped with backslash, so this "\$1 million" is actual value and not a reference.
### Boxes
### Boxes
* DataInBox and DataOutBox are special boxes which are treated differently from the others. This means that their deletion or even some breaking changes may have unforseen consequences. They are used for importing and exporting files in/out from pipeline. For importing string or array of strings, variable references have to be used. Inputs or outputs from pipeline may have been connected to another pipeline or to supervisor/student inputs.
* DataInBox and DataOutBox are special boxes which are treated differently from the others. This means that their deletion or even some breaking changes may have unforseen consequences. They are used for importing and exporting files in/out from pipeline. For importing string or array of strings, variable references have to be used. Inputs or outputs from pipeline may have been connected to another pipeline or to supervisor/student inputs.
* Date boxes have to be unconditionally used for importing or exporting files from pipelines. Variable references are not usable here since these references are only substitutions. For example files uploaded by supervisor (inputs and outputs) have to have input boxes in order to be properly downloaded from fileserver during execution.
* Data boxes have to be unconditionally used for importing or exporting files from pipelines. Variable references are not usable here since these references are only substitutions. For example files uploaded by supervisor (inputs and outputs) have to have input boxes in order to be properly downloaded from fileserver during execution.
* Every (except data boxes) box is used only in BoxService for creation purposes and then through abstract Box interface which is of course using inheritance for providing general usage schema. Thanks to this, creation of new boxes is quite simple and straightforward.
* Every (except data boxes) box is used only in BoxService for creation purposes and then through abstract Box interface which is of course using inheritance for providing general usage schema. Thanks to this, creation of new boxes is quite simple and straightforward.
### Configuration
### Configuration
@ -311,32 +315,32 @@ Example:
Mandatory items are bold, optional italic, description of items follows:
Mandatory items are bold, optional italic, description of items follows:
* **${test identification}** - identifier of test from database
* **${test identification}** - identifier of test from database
* **${pipeline identification}** - identifier of pipeline taken from database
* _wall-time_ - elapsed real-time in seconds, defined as float
* **${box identification}** - identifier of box within pipeline
* _cpu-time_ - elapsed cpu-time in seconds, defined as float
* _wall-time_ - elapsed real-time in seconds, defined as float
* _memory_ - maximal memory usage in kilobytes
* _memory_ - maximal memory usage in kilobytes
* _parallel_ - maximal number of threads/processes used
* _parallel_ - maximal number of threads/processes used
Example:
Example:
```
```
test-id-1:
test-id-1:
pipeline-id-1:
wall-time: 5
box-id-1:
cpu-time: 6.4
wall-time: 5
memory: 50
memory: 50
parallel: 500
parallel: 500
test-id-2:
test-id-2:
pipeline-id-2:
wall-time: 6
box-id-2:
memory: 60
wall-time: 6
memory: 60
```
```
## ExerciseEnvironmentConfig
## ExerciseEnvironmentConfig
Configuration for particular environments is stored here. This configuration can be seen in two formats the one which is returned to the web-app and the one in which configuration is stored. Environment configuration is stored in individual database entities, but it is desirable to return it as a whole for the whole exercise. Hence there appears to be two formats, both of them are described bellow.
Configuration for particular environments is stored here. This configuration can be seen in two formats the one which is returned to the web-app and the one in which configuration is stored. Environment configuration is stored in individual database entities, but it is desirable to return it as a whole for the whole exercise. Hence there appears to be two formats, both of them are described bellow.
Important features:
* Variable of type `file` or `file[]` in environment config can contain **wildcards**. These wildcards are then matched against files submitted in solution. For every wildcard/variable there has to be at least one file which match it.
### Frontend Format
### Frontend Format
Mandatory items are bold, optional italic, description of items follows:
Mandatory items are bold, optional italic, description of items follows: