Update JOJ3 Configuration Schema
parent
f512cc9f0f
commit
928ac4bd60
|
|
@ -3,62 +3,49 @@
|
||||||
*Goals:* simple configuration files, which can easily be manually edited by TAs. These files is then parsed by joj-config-generation script to generate final internal `json` configurations files.
|
*Goals:* simple configuration files, which can easily be manually edited by TAs. These files is then parsed by joj-config-generation script to generate final internal `json` configurations files.
|
||||||
|
|
||||||
|
|
||||||
## repo level config file
|
|
||||||
|
|
||||||
Used to discover what assignment and tasks are requested and where corresponding json config files can be found.
|
|
||||||
|
|
||||||
- `assignments`: list of all assignments in this repo
|
|
||||||
- `assignment`: array of table with list of tasks
|
|
||||||
|
|
||||||
Example:
|
|
||||||
- 4 assignments
|
|
||||||
- no task for 0, tasks 2 3 4 5 and 6 can be tested on joj for h1, etc.
|
|
||||||
- tree structure: `h1/2/conf.json`
|
|
||||||
- expected joj commit: `feat[h1/2]: joj` or `fix[h2/4]: joj`
|
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
assignments = [ "h0", "h1", "h2", "h3" ]
|
stages = [ "compile", "code_quality", "joj" ]
|
||||||
|
|
||||||
[[assignment]]
|
[compile]
|
||||||
|
compiler = "cmake"
|
||||||
|
copyfiles= [ "main.c", "task.h" ]
|
||||||
|
|
||||||
[[assignment]]
|
[[code_quality]]
|
||||||
tasks = [ 2, 3, 4, 5, 6 ]
|
command = "file-length"
|
||||||
|
tests = [ "max", "recommend"]
|
||||||
|
weights = [ 50, 20 ]
|
||||||
|
|
||||||
[[assignment]]
|
[[code_quality]]
|
||||||
tasks = [ 1, 2, 4, 6 ]
|
command = "clang-tidy-18 -header-filter=.* -quiet -load=/usr/local/lib/libcodequality.so -p build"
|
||||||
|
test = [ "codequality-no-global-variables", "codequality-no-header-guard", "readability-function-size", "readability-duplicate-include", "readability-identifier-naming", "readability-redundant", "readability-misleading-indentation", "readability-misplaced-array-index", "cppcoreguidelines-init-variables", "bugprone-suspicious-string-compare", "google-global-names-in-headers", "clang-diagnostic", "clang-analyzer", "misc performance" ]
|
||||||
|
weights = [100, 100, 50, 10, 5, 5, 10, 5, 5, 8, 5, 5, 5, 5, 8]
|
||||||
|
|
||||||
|
[[code_quality]]
|
||||||
|
command = "cppcheck --enable=all --language=c++ --suppress=*:build* --suppress=missingIncludeSystem ./"
|
||||||
|
tests = ["error", "warning", "portability", "performance", "style"]
|
||||||
|
weights = [20, 10, 15, 15, 10]
|
||||||
|
|
||||||
|
[[code_quality]]
|
||||||
|
command = "cpplint --linelength=120 --filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-readability/todo,-build/include_subdir,-build/header_guard --recursive --exclude=build ."
|
||||||
|
tests = [ "runtime", "readability", "build" ]
|
||||||
|
weights = [ 10, 20, 15]
|
||||||
|
|
||||||
|
[joj]
|
||||||
|
score = 10
|
||||||
|
limit.cpu = 10000000000
|
||||||
|
limit.mem = 536870912
|
||||||
|
limit.proc = 50
|
||||||
|
|
||||||
|
[[test-cases]]
|
||||||
|
name = "case4"
|
||||||
|
score = 20
|
||||||
|
limit.cpu = 5000000000
|
||||||
|
limit.mem = 53687091
|
||||||
|
|
||||||
|
[[test-cases]]
|
||||||
|
name = "case10"
|
||||||
|
score = 30
|
||||||
|
limit.proc = 25
|
||||||
|
|
||||||
[[assignment]]
|
|
||||||
tasks = [ 2, 3, 4, 7 ]
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Similarly for tree structure of type `hw1/ex7`
|
|
||||||
```toml
|
|
||||||
assignments = [ "hw0", "hw1", "hw2", "hw3" ]
|
|
||||||
|
|
||||||
[[assignment]]
|
|
||||||
|
|
||||||
[[assignment]]
|
|
||||||
tasks = [ "ex2", "ex3", "ex4", "ex5", "ex6" ]
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Assignment level
|
|
||||||
|
|
||||||
- lang
|
|
||||||
- mem_limit
|
|
||||||
- cpu_limit
|
|
||||||
- stages (cq, build, oj, etc.)
|
|
||||||
|
|
||||||
## Exercise level
|
|
||||||
|
|
||||||
- lang
|
|
||||||
- mem_limit
|
|
||||||
- cpu_limit
|
|
||||||
- stages (cq, build, oj, etc.)
|
|
||||||
- cases_list (list of test cases for the exercise, can be specified as a range)
|
|
||||||
|
|
||||||
## Test case level
|
|
||||||
|
|
||||||
- score
|
|
||||||
- mem_limit
|
|
||||||
- cpu_limit
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user