Skip to main content

autograder_gen

License: MIT Code style: black

autograder_gen is a tool for lecturers to automatically generate assessment scripts for Grading a Programming Assignment on Gradescope. It supports filling out an interactive web form or providing a YAML configuration, which then generates a packaged ZIP file ready to be uploaded to Gradescope. The project validates your YAML configuration, renders test scripts using Jinja2 templates, and packages everything for immediate upload to Gradescope.

Installation

Install the package via pip:

pip install autograder-gen

CLI Usage

When installed, autograder-gen generates Gradescope autograders directly from configuration files. Running without parameters displays usage help:

autograder-gen
usage: autograder-gen [-h] [--version] [--config CONFIG |
                      --batch DIR_OR_CONFIG [DIR_OR_CONFIG ...]]
                      [--description] [--run-submission DIR_OR_ZIP]
                      [--run-stub-submissions] [--verbose]

Generate Gradescope autograder script from YAML configuration. Generated files
will be at the same folder as the config (autograder.zip, stub submissions for
testing such as stub_correct_answer.zip, stub_wrong_answer.zip, and optionally
description.docx and description.md when --description is specified).

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --config, -c CONFIG   Path to YAML configuration file
  --batch, -b DIR_OR_CONFIG [DIR_OR_CONFIG ...]
                        One or more directories to search or config files to
                        batch process
  --description         Generate description.docx and description.md for the
                        assessment
  --run-submission, -r DIR_OR_ZIP
                        Use submission directory or zip file relative to
                        config to be run (can be specified multiple times)
  --run-stub-submissions
                        Run autograder for generated stub submissions
                        (stub_correct_answer.zip, stub_wrong_answer.zip,
                        stub_compiler_error.zip,
                        stub_correct_answer_wrong_location.zip)
  --verbose, -v         Print full autograder execution logs instead of only
                        paths to log files

Examples

Generate an autograder package:

autograder-gen --config config.yaml

Generate assessment description (description.docx and description.md):

autograder-gen --config config.yaml --description

Run student submission against an autograder configuration:

autograder-gen --config config.yaml --run-submission submission.zip

Run autograder against generated stub submissions:

autograder-gen --config config.yaml --run-stub-submissions

Batch Processing

Use autograder-gen --batch to process multiple configuration files or directories at once. When passing a directory, each subfolder should be a config folder containing a config.yaml (or config.yml):

Batch generate autograders:

autograder-gen --batch path/to/assignments/

Batch run stub submissions:

autograder-gen --batch path/to/assignments/ --run-stub-submissions

Batch run student submission:

autograder-gen --batch path/to/assignments/ --run-submission submission.zip

Web Interface

Launch the interactive web interface:

autograder-gen-web

Development and Building from Source

For development instructions, building from source, and running Python source files directly, see BUILD.md.

Authors

License

Contributions are welcome and will be credited. This project is licensed under the MIT License.
The University of Reading retains rights of original contributions.

Metadata

Release files for autograder-gen 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for autograder-gen 0.1.2
File Interpreter ABI Platform
autograder_gen-0.1.2-py3-none-any.whl Python 3 none any Details

Release files / autograder_gen-0.1.2-py3-none-any.whl

Download URL autograder_gen-0.1.2-py3-none-any.whl
Size 70.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25ad4a586ae2e017abba4d4267539a25f4ec3ce295e9bfe229e1e2819488de2d
BLAKE2b-256 checksum
How to use checksums
e337fb521e32f3775446242a063baa444176855004580dc8297dd5809c107b5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page