An assortment of scripts to help manage autograding of assignments.
- Grab the
grade.py
from an existing assignment - Implement
get_test_cases_and_submissions
, which must returntest_cases
andsubmissions
. This gets injected into the cli. grade.py
is the entrypoint forcli.py
. In your directory, callgrade.py --help
for more usage information.
# grade everything in a given submissions file
# will clone but throw away the grades
$ ./grade.py grade --submissions ~/Downloads/c4cs-rpn-repos.csv
# you really want to chain commands (write results.json and scores.csv):
$ ./grade.py grade -s ~/Downloads/c4cs-rpn-repos.csv write_results write_canvas print_stats
# you can also load the results back up from results.json:
$ ./grade.py load_results print_stats
# write emails but don't send
$ ./grade.py load_results write_emails \
--assignment-name="Homework 10" \
--total-points=4 \
--regrade-date="April 7" \
--autograder-link="https://google.com" \
--dest="/tmp/hw10_emails"
# send the emails
$ ./grade.py send_emails \
--loc="/tmp/hw10_emails" \
--subject="[c4cs] HW10 Graded" \
--smtp-username="mterwil" \
--cc="[email protected]"
# and each command and subcommand has help
$ ./grade.py load_results --help
The autograder.py
script contains a collection of classes.
Autograder
takes in a list ofTestCase
s and submissions which then individually get passed toTestCase.test
by way of theTestRunner
.TestCase
returns aTestCaseResult
.
Probably a lot of them... Sorry.