A collection of tools for grading homework automatically
Project description
Otter-Autograder
An autograding system for teaching, primarily focused on Canvas LMS integration. Supports automated grading of programming assignments (via Docker) and text submissions (like learning logs).
Installation
pip install Otter-Autograder
Quick Start
1. Set up Canvas API credentials
Create a .env file (by default this tool reads ~/.env):
CANVAS_API_KEY=your_canvas_api_key_here
CANVAS_API_URL=https://your-institution.instructure.com
2. Create a grading configuration
Create a YAML file (e.g., assignments.yaml) defining your courses and assignments:
privacy_mode: id_only # none | id_only | blind
reveal_identity: false
idempotency_key: null # Optional: set to skip re-pushing already pushed feedback
idempotency_state_dir: "~/.autograder/idempotency" # Optional override
assignment_types:
programming:
kind: ProgrammingAssignment
grader: template-grader
settings:
base_image_name: "your-docker-image"
record_retention: true
records_dir: "~/autograder-records/your-course" # required when record_retention=true
courses:
- name: "Your Course"
id: 12345
assignment_groups:
- type: programming
assignments:
- id: 67890
repo_path: "PA1"
3. Run the grader
grade-assignments --yaml assignments.yaml
Use a specific env file:
grade-assignments --yaml assignments.yaml --env /path/to/.env
Temporarily include Canvas numeric IDs in logs (break-glass):
AUTOGRADER_BREAK_GLASS=1 grade-assignments --yaml assignments.yaml --reveal-identity
Idempotent push mode (safe rerun key):
grade-assignments --yaml assignments.yaml --idempotency-key spring26-ll2
Path safety defaults:
record_retention: truerequires an explicit absoluterecords_dir(or~/...).records_diris blocked if it points inside this git repo unlessAUTOGRADER_ALLOW_IN_REPO_RECORDS=1.- Idempotency state defaults to
~/.autograder/idempotency.
Features
Supported Assignment Types
- Programming Assignments: Docker-based grading with template matching and test execution
- Text Submissions: AI-powered grading with rubric generation and clustering analysis
Key Capabilities
- Parallel execution with configurable worker threads
- Privacy modes:
none,id_only,blind - Optional idempotent feedback push via
idempotency_key - Automatic score scaling to Canvas points
- Slack notifications for grading errors
- Record retention for audit trails
- Regrade support for existing submissions
- Test mode for validation before full grading runs
Usage Examples
Grade with limited submissions (testing)
grade-assignments --yaml config.yaml --limit 5
Regrade existing submissions
grade-assignments --yaml config.yaml --regrade
Test submissions without pushing grades
grade-assignments --yaml config.yaml --test
Control parallelism
grade-assignments --yaml config.yaml --max_workers 2
Show stage timings and push aggregates
grade-assignments --yaml config.yaml --show-stage-timings
Configuration
See the example_files/ directory for complete configuration examples:
workhorse.yaml: Recommended combined programming + text setupprogramming_assignments.yaml: Programming-only setuplearning-logs.yaml: Text submission gradingexample-template.yaml: All available options
Requirements
- Python >= 3.12
- Docker (for programming assignment grading)
- Canvas API access
- Optional: OpenAI or Anthropic API keys for AI-powered features
Local Git Hygiene Hook (Recommended)
Install the repository-managed pre-commit hook so hygiene checks run before each commit:
bash scripts/install_git_hooks.sh
This hook runs scripts/check_repo_hygiene.sh and blocks commits that include runtime artifacts (records/, .autograder/, *.log) or unsafe example paths.
Documentation
For detailed documentation, see:
documentation/instructor_onboarding.md(minimal setup + common customizations)documentation/operations_runbook.md(failure autopsy + rerun procedures)documentation/archives/step_by_step_grader_reference.md(archived grader concept for future redesign)- documentation directory on GitHub
License
This project is licensed under the GPL-3.0-or-later license. See the LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or pull request on GitHub.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file otter_autograder-0.5.0.tar.gz.
File metadata
- Download URL: otter_autograder-0.5.0.tar.gz
- Upload date:
- Size: 94.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4064fbcdadb773e8423324b09e6512e4406c35cec44cb5146121dbcad0096912
|
|
| MD5 |
24d471ef87efec2730ed74cbada9fc72
|
|
| BLAKE2b-256 |
f8132a4b5a739ba3672f300c06ab1fa80e09964efafd9380c428ddf21fbdeb07
|
File details
Details for the file otter_autograder-0.5.0-py3-none-any.whl.
File metadata
- Download URL: otter_autograder-0.5.0-py3-none-any.whl
- Upload date:
- Size: 96.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
614212a4b19ec45f2c3bc3b94628f328db7c845ade3567bcecb1faf847908f97
|
|
| MD5 |
fc5db5a568eb09753d9778c862b76041
|
|
| BLAKE2b-256 |
a00d1d467cdba6ecbc1d5d0e3d265662297309253fa56c880f7aecfaca81e579
|