A Go library for automated code grading and rubric-based assessment.
Gradebot provides a generic framework for building automated grading systems for programming assignments. It includes:
- Client Package: Generic configuration and execution framework
- Rubrics Package: Core types for program evaluation (
Program,Result,Evaluator) - Generic Evaluators: Git repository validation, code quality assessment
- Server Package: HTTP/gRPC server for rubric management
- Storage Package: R2 and SQL storage backends
- Proto Package: Protocol buffer definitions for communication
This library is designed to be imported by course-specific grading implementations.
import (
"github.com/jh125486/gradebot/pkg/client"
"github.com/jh125486/gradebot/pkg/rubrics"
)
// Use the generic execution framework
cfg := &client.Config{
Dir: client.WorkDir("/path/to/student/code"),
RunCmd: "go run .",
}
// Execute with custom evaluators
err := client.ExecuteProject(ctx, cfg, "Assignment1",
rubrics.EvaluateGit(osfs.New(cfg.Dir.String())),
customEvaluator1,
customEvaluator2,
)Course-specific implementations should:
- Import gradebot as a dependency
- Implement course-specific evaluators
- Provide ExecuteProjectX functions that call
client.ExecuteProjectwith appropriate evaluators
Example: Course-specific implementations should import this library
# Install dependencies
go mod download
# Run tests
go test ./...
# Run tests with coverage
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
# Lint
golangci-lint runSee LICENSE file for details.