Skip to content
Sumukh Sridhara edited this page Jan 12, 2016 · 3 revisions

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.

Format

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
    ]
}

Endpoint

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.

Src

A list of files that constitute the student's submission. File names are specified relative to the current directory.

Tests

A mapping of file patterns to test sources. See Sources for more details.

Protocols

A list of protocols that the assignment uses. See Protocols for a full list of supported protocols.

Config recognition

The process for loading a configuration file is the following:

  1. If the user has specified a particular configuration with the --config flag, use that configuration file.
  2. Otherwise, if there is more than one file with a .ok extension, abort.
  3. Otherwise, if there are no files with a .ok extension, abort.
  4. Otherwise, use the unique .ok configuration file in the current directory.
Clone this wiki locally