-
Notifications
You must be signed in to change notification settings - Fork 7
/
run_autograder
32 lines (25 loc) · 960 Bytes
/
run_autograder
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
#!/usr/bin/env bash
# Run the actual autograder
cd /autograder/source/autograder
python3 run_autograder.py
# Compile the results
cd /autograder/results
jq --slurp -c '.' */results.json > raw_results.json
# Download latest results->gradescope report converter
cd /autograder/result-processing
git reset HEAD --hard
git pull
# Find whether due date has past to turn on examplar
npm i @types/node
BEFORE_LATE_DEADLINE=$(ts-node /autograder/source/autograder/is_before_late_deadline.ts /autograder/submission_metadata.json)
if [[ $BEFORE_LATE_DEADLINE == true ]]
then
EXAMPLAR_CONFIG=/autograder/source/examplar/config.json
else
EXAMPLAR_CONFIG=""
fi
# Convert results to gradescope's format and location
cd /autograder/result-processing
npm i @types/node
tsc --target es6 gradescope_report.ts
node gradescope_report.js /autograder/results/raw_results.json /autograder/results/results.json /autograder/source/instructor/points.json $EXAMPLAR_CONFIG