lograder
A Python library for building programming assignment autograders. The central abstraction is a Pipeline of Step instances -- each step validates input, runs a process, and passes results forward.
Input -> Check -> Mixin -> Build -> Test
Installation
pip install lograder
# or for development:
uv sync --extra dev
Minimal example
from pathlib import Path
from lograder.pipeline.config import config
from lograder.pipeline.input.local_directory import LocalDirectory
from lograder.pipeline.check.project.simple_project import CMakeManifestCheck
from lograder.pipeline.build.cmake import CMakeBuild
from lograder.pipeline.test.output_compare import OutputCompareTest, OutputCompareCase
from lograder.pipeline.score import TestCaseScorer, AllOrNothingScorer, GradescopeConfig
from lograder.pipeline.pipeline import Pipeline
# Define test cases
cases = [
OutputCompareCase(name="hello", args=[], expected_stdout="Hello, World!\n"),
OutputCompareCase(name="echo", args=["foo"], expected_stdout="foo\n"),
]
# Build the pipeline
pipeline = Pipeline()
pipeline.add(inp := LocalDirectory())
pipeline.add(check := CMakeManifestCheck())
pipeline.add(build := CMakeBuild())
pipeline.add(tests := OutputCompareTest("hello", cases))
# Attach scorers
build.scorer = AllOrNothingScorer(10.0, label="Build")
tests.scorer = TestCaseScorer({"hello": 40.0, "echo": 50.0}, label="Correctness")
# Run
with config(root_directory=Path("/autograder/submission")):
score = pipeline()
score.write_results_json(config=GradescopeConfig(visibility="visible"))
Documentation
| Doc | Contents |
|---|---|
| Getting started | First autograder in 5 minutes |
| Concepts | Pipeline, Step, Result, Manifest, Artifact |
| Input | LocalDirectory, EnvironmentConfig |
| Check | Manifest checks, SourceCheck, constraints |
| Build | CMakeBuild, MakefileBuild, BashScriptBuild, PrebuiltArtifacts |
| Test | All 9 test step types with full examples |
| Scoring | Scorers, Gradescope output, results.json |
| Process layer | TypedExecutable, CLIArgs, registry |
| Output / layouts | Logging, HTML report, custom layouts |
| Examples | Complete worked autograders |
Design principles
- Errors as values. Steps return
Result[Ok, Err]rather than raising. A fatalErrreturn stops the pipeline; a yieldedErris logged and execution continues. - Typed data flow. Each step declares its input and output types.
pipeline.validate_step_types()catches mismatches before the first submission runs. - No magic. Every process invocation goes through a
TypedExecutablewith validatedCLIArgs. You can see exactly what command was run and what it produced. - Library only. lograder has no CLI and no service. You write a Python script; lograder is a collection of reusable building blocks.
Metadata
Release files for lograder 0.3.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| lograder-0.3.9.tar.gz | 127.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lograder-0.3.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 324.4 kB
Release files / lograder-0.3.9.tar.gz
| Download URL | lograder-0.3.9.tar.gz |
|---|---|
| Size | 127.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd35890f69ddd9c34b98c8149da86ebff9735a6d1c5bb0bcac6245b6918781a5
|
|
BLAKE2b-256 checksum How to use checksums |
74672dfdb6657dcb1c6d440bcab5ae568cff847c3d5d4903e4d950eadaf7c190
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / lograder-0.3.9-py3-none-any.whl
| Download URL | lograder-0.3.9-py3-none-any.whl |
|---|---|
| Size | 196.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c04cba6a00b367c34d0e14ad0dce8612102a7c833ab7d5b272d5184f62c26b3
|
|
BLAKE2b-256 checksum How to use checksums |
d77edf875d3d6cb6355bddba1007babc0a2b63ef0eab82659111a2f40f397404
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for lograder 0.3.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.