-
Notifications
You must be signed in to change notification settings - Fork 44
Configuration
Each assignment is defined by its configuration file. Configuration files are JSON files with the file extension .ok. Other than the file extension, configuration files can have any name.
The current format for configuration files is the following:
{
"name": "Name of assignment",
"endpoint": "endpoint/for/assignment/on/website",
"src": [
... // a list of files that students will submit
],
"tests": {
... // a mapping of file patterns to test sources
},
"protocols": [
... // a list of OK protocols that the assignment uses
]
}
The endpoint is unique to each assignment and notifies the server about the appropriate assignment to categorize submissions.
Staff can create endpoints using the ok server admin interface.
A list of files that constitute the student's submission. File names are specified relative to the current directory.
A mapping of file patterns to test sources. See Sources for more details.
A list of protocols that the assignment uses. See Protocols for a full list of supported protocols.
The process for loading a configuration file is the following:
- If the user has specified a particular configuration with the
--configflag, use that configuration file. - Otherwise, if there is more than one file with a
.okextension, abort. - Otherwise, if there are no files with a
.okextension, abort. - Otherwise, use the unique
.okconfiguration file in the current directory.