Python autograder for Purdue ECE department
Project description
Grader Module
The entry point for the grader is located at grader/__main__.py
. It is responsible for loading specified tests in a specified loaction that match a specified pattern. It will grade a specified submission directory against these tests and collect the output. If grading the submission fails, it will fallback to grading the template
directory. It can load a config file that can rename the submission directory to a custom label and can assign weights to individual tests. The help output for the grader is below:
python -m grader -h
usage: grader [-h] [--submission SUBMISSION] [--tests TESTS] [--test-pattern TEST_PATTERN] [--output OUTPUT] [--log LOG]
[--config CONFIG]
path
positional arguments:
path path of the module to grade
optional arguments:
-h, --help show this help message and exit
--submission SUBMISSION
submission name to grade
--tests TESTS path of tests to run
--test-pattern TEST_PATTERN
test name pattern to match
--output OUTPUT output file for scores
--log LOG log file to use
--config CONFIG config file to use
Grader Tests
Tests to run can be located anywhere using a combination of the --tests
and --test-pattern
args. By default, they are searched for under the current directory and match the test*.py
pattern. Tests are discovered using the unittest
module.
Grader Config
The grader config can be specified with the --config
arg. It is a json file that can specify what happens when a certain test runs or when a certain submission is graded. Individual test configs should be under the "tests"
map and the key should be of the form: testFunction (test_filename.TestCaseName)
. Inividual submission configs should be under the "submissions"
map and match the repository name of the submission. An example format is below:
{
"tests": {
"testSimple1 (test_simple.TestSimpleTestCase)": {
"name": "Simple Test 1",
"weight": 2
}
},
"submissions": {
"submission_name": {
"name": "custom label here"
}
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for grader_purdueece-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eff2a5f5873cb3fa0f0cfeff59deeba9f8c4ae84c8b35143aa42d7cd0ad1184f |
|
MD5 | 1e337a0478af5c05d644e7d3a6aecbc4 |
|
BLAKE2b-256 | 9007c20eb6f7bb0c8ff5bbd3857579bc9a612e4d5bf3ce4be594e62e9521cef6 |