-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathschema_input.json
135 lines (116 loc) · 8.44 KB
/
schema_input.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{ "title": "TaskGrader input JSON",
"type": "object",
"definitions": {
"fileDescr": {"type": "object",
"description": "Description of a file, either by path or by content. If none of them is specified, the file will be searched for in libraries generated by the current task.",
"properties": {
"name": {"$ref": "#/definitions/filename", "description": "Filename."},
"path": {"type": "string", "description": "Path of the file to retrieve."},
"content": {"type": "string", "description": "Content of the file to save."}},
"required": ["name"]},
"compilationDescr": {"type": "object",
"description": "Description of the files required to compile a program.",
"properties": {
"language": {"type": "string", "description": "Language of the program. Possible values: 'c', 'cpp', 'cpp11', 'ml', 'ocaml', 'java', 'javascool', 'js', 'sh', 'shell', 'pascal', 'php'', 'py', 'py2', 'py3', 'python', 'python2', 'python3'."},
"files": {"type": "array", "description": "List of source files.", "items": {"$ref": "#/definitions/fileDescr"}},
"dependencies": {"type": "array", "description": "List of dependencies.", "items": {"$ref": "#/definitions/fileDescr"}}},
"required": ["language", "files"]},
"executionParams": {"type": "object",
"description": "Parameters of an execution.",
"properties": {
"timeLimitMs": {"type": "integer", "description": "Time limit in milliseconds."},
"memoryLimitKb": {"type": "integer", "description": "Memory limit in kilobytes."},
"useCache": {"type": "boolean", "description": "Use taskgrader's cached items."},
"executionArgs": {"type": "string", "description": "Command-line arguments for the execution of the program."},
"forceStatic": {"type": "boolean", "description": "If present, force static or non-static compilation."},
"continueOnError": {"type": "boolean", "description": "Consider errors as non-fatal."},
"stdoutTruncateKb": {"type": "integer", "description": "Size in kilobytes to capture from stdout, -1 means no limit."},
"stderrTruncateKb": {"type": "integer", "description": "Size in kilobytes to capture from stderr, -1 means no limit."},
"addFiles": {"type": "array", "description": "Files to add to the execution folder.", "items": {"$ref": "#/definitions/fileDescr"}},
"getFiles": {"type": "array", "description": "Files to capture in the report.", "items": {"$ref": "#/definitions/filename"}}},
"required": ["timeLimitMs", "memoryLimitKb"]},
"compileAndRunParams": {"type": "object",
"description": "Parameters for a compilation and an execution.",
"properties": {
"compilationDescr": {"$ref": "#/definitions/compilationDescr"},
"compilationExecution": {"$ref": "#/definitions/executionParams"},
"runExecution": {"$ref": "#/definitions/executionParams"}},
"required": ["compilationDescr", "compilationExecution", "runExecution"]},
"filename": {"type": "string",
"description": "A valid file name.",
"pattern": "^\\w[\\w.~/-]+$"}},
"properties": {
"extraParams": {"description": "Extra variables which can be used in the JSON. Either a path to a JSON or directly some JSON object.",
"oneOf": [{"type": "string"}, {"type": "object"}]},
"options": {"description": "Global options for the evaluation.",
"type": "object"},
"rootPath": {"type": "string",
"decription": "Path to the files used. Can be referred to as $ROOT_PATH in paths."},
"taskPath": {"type": "string",
"description": "Path to the task files. defaultParams.json will be loaded from this folder. Can be referred to as $TASK_PATH in paths."},
"restrictToPaths": {"type": "array",
"description": "Paths from which the taskgrader is allowed to load files from. If empty, taskgrader will load from any path.",
"items": {"type": "string"}},
"generators": {"type": "array",
"description": "List of generators to compile.",
"items": {"type": "object",
"description": "Generator, generates tests and libraries to be used for evaluation.",
"properties": {
"id": {"type": "string", "description": "Name of the generator."},
"compilationDescr": {"$ref": "#/definitions/compilationDescr"},
"compilationExecution": {"$ref": "#/definitions/executionParams"}},
"required": ["id", "compilationDescr", "compilationExecution"]}},
"generations": {"type": "array",
"description": "List of generations (executions of generators).",
"items": {"type": "object",
"description": "Generation (execution of a generator).",
"properties": {
"id": {"type": "string", "description": "Name of the generation."},
"idGenerator": {"type": "string", "description": "Name of the tests and libraries generator."},
"idOutputGenerator": {"type": "string", "description": "Name of the results generator, if applicable."},
"genExecution": {"$ref": "#/definitions/executionParams"},
"outGenExecution": {"$ref": "#/definitions/executionParams"},
"testCases": {"type": "array", "description": "List of specific test cases to generate.",
"items": {"type": "object", "properties": {
"name": {"$ref": "#/definitions/filename", "description": "Filename of the test to generate."},
"params": {"type": "string", "description": "Command-line arguments for the generator."}},
"required": ["name", "params"]}}},
"required": ["id", "idGenerator", "genExecution"]}},
"extraTests": {"type": "array",
"description": "List of specific test files to import.",
"items": {"$ref": "#/definitions/fileDescr"}},
"sanitizer": {"description": "Sanitizer, tests whether an input file is a valid test.",
"$ref": "#/definitions/compileAndRunParams"},
"checker": {"description": "Checker, grades the solution's result.",
"$ref": "#/definitions/compileAndRunParams"},
"solutions": {"type": "array",
"description": "List of solutions to grade.",
"items": {"type": "object",
"description": "Solution to be graded.",
"properties": {
"id": {"type": "string", "description": "Name of the solution."},
"compilationDescr": {"$ref": "#/definitions/compilationDescr"},
"compilationExecution": {"$ref": "#/definitions/executionParams"}},
"required": ["id", "compilationDescr", "compilationExecution"]}},
"executions": {"type": "array",
"description": "List of solution executions.",
"items": {"type": "object",
"description": "Execution of a solution on one or multiple tests.",
"properties": {
"id": {"type": "string", "description": "Name of the execution."},
"idSolution": {"type": "string", "description": "Name of the solution to grade."},
"filterTests": {
"type": "array",
"description": "List of globs filtering tests to input to the solution.",
"items": {
"type": "string",
"pattern": "^[^/]+$"}},
"noFeedbackTests": {
"type": "array",
"description": "List of globs filtering tests (selected with filterTests) whose outputs will be hidden.",
"items": {
"type": "string",
"pattern": "^[^/]+$"}},
"runExecution": {"$ref": "#/definitions/executionParams"}},
"required": ["id", "idSolution", "filterTests", "runExecution"]}}},
"required": ["rootPath", "taskPath", "generators", "generations", "extraTests", "sanitizer", "checker", "solutions", "executions"]}