MoonBit assignment grading and actionable learning feedback.
git clone https://github.com/2227057182/moongrade.git
cd moongrade
moon update
moon check --deny-warn
moon test --deny-warnmoon run cmd/main -- grade \
--assignment examples/assignment.json \
--student examples/passing-student \
--markdown passing-report.md \
--json passing-report.json \
--html passing-report.html \
--fail-on-failmoon run cmd/main -- batch \
--assignment examples/assignment.json \
--students examples \
--reports examples/reports \
--fail-on-fail{
"name": "MoonBit Fundamentals",
"pass_score": 70,
"checks": [
{
"id": "compile",
"title": "Project compiles",
"kind": "check",
"points": 30,
"timeout_seconds": 60,
"required": true
},
{
"id": "tests",
"title": "Public tests",
"kind": "test",
"points": 70,
"timeout_seconds": 120,
"required": true
}
]
}moon fmt --check
moon check --deny-warn
moon test --deny-warn
moon test . --target wasm --deny-warn
moon test . --target wasm-gc --deny-warn
./scripts/e2e.sh./scripts/e2e.ps1assignment.mbt 作业 JSON 解析与校验
scoring.mbt 部分得分、超时和错误提示
render.mbt Markdown / JSON / HTML 报告
runtime/ 薄 Node.js 本地进程适配层
cmd/main/ CLI 与批量评测
examples/ 可运行作业、学生项目和报告
docs/ 架构、格式、课堂流程与申报书pub(all) struct CheckResult {
id : String
title : String
passed : Bool
earned_points : Int
possible_points : Int
exit_code : Int
timed_out : Bool
duration_ms : Int
feedback : Array[String]
output_excerpt : String
}pub(all) struct GradeReport {
assignment_name : String
student_path : String
score : Int
max_score : Int
passed : Bool
checks : Array[CheckResult]
}pub(all) struct ProcessResult {
exit_code : Int
timed_out : Bool
stdout : String
stderr : String
duration_ms : Int
}fn build_report(assignment : Assignment, student_path : StringView, results : Array[CheckResult]) -> GradeReportInstall
Download zipMoonBit assignment grading and actionable learning feedback.