|
1 | | -# Local Docs Development (MkDocs) |
| 1 | +# Run Your First Grading Workflow |
2 | 2 |
|
3 | | -This project uses **MkDocs Material** to publish the documentation website. |
| 3 | +This quickstart walks you through one complete grading cycle: |
4 | 4 |
|
5 | | -## Run locally |
| 5 | +1. start the API |
| 6 | +2. create a grading configuration |
| 7 | +3. submit student code |
| 8 | +4. fetch the graded result |
| 9 | + |
| 10 | +## Prerequisites |
| 11 | + |
| 12 | +- Docker and Docker Compose installed |
| 13 | +- Python available on your machine |
| 14 | +- Project dependencies installed (`pip install -r requirements.txt`) |
| 15 | + |
| 16 | +## 1) Start Autograder |
6 | 17 |
|
7 | 18 | ```bash |
8 | | -pip install -r requirements-docs.txt |
9 | | -mkdocs serve |
| 19 | +make start-autograder |
10 | 20 | ``` |
11 | 21 |
|
12 | | -Open `http://127.0.0.1:8000` to preview changes with live reload. |
| 22 | +When ready, the API is available at `http://localhost:8080`. |
| 23 | + |
| 24 | +You can check health: |
13 | 25 |
|
14 | | -## Build locally |
| 26 | +```bash |
| 27 | +curl http://localhost:8080/api/v1/health |
| 28 | +``` |
| 29 | + |
| 30 | +## 2) Create a grading configuration |
15 | 31 |
|
16 | 32 | ```bash |
17 | | -mkdocs build --strict |
| 33 | +curl -X POST http://localhost:8080/api/v1/configs \ |
| 34 | + -H "Content-Type: application/json" \ |
| 35 | + -d '{ |
| 36 | + "external_assignment_id": "demo-assignment-1", |
| 37 | + "template_name": "input_output", |
| 38 | + "criteria_config": { |
| 39 | + "base": { |
| 40 | + "weight": 100, |
| 41 | + "subjects": [ |
| 42 | + { |
| 43 | + "subject_name": "Functionality", |
| 44 | + "weight": 100, |
| 45 | + "tests": [ |
| 46 | + { |
| 47 | + "name": "expect_output", |
| 48 | + "weight": 100, |
| 49 | + "parameters": { |
| 50 | + "inputs": ["Alice"], |
| 51 | + "expected_output": "Hello, Alice!", |
| 52 | + "program_command": "python3 main.py" |
| 53 | + } |
| 54 | + } |
| 55 | + ] |
| 56 | + } |
| 57 | + ] |
| 58 | + } |
| 59 | + }, |
| 60 | + "languages": ["python"], |
| 61 | + "setup_config": { |
| 62 | + "required_files": ["main.py"], |
| 63 | + "setup_commands": [] |
| 64 | + }, |
| 65 | + "include_feedback": true, |
| 66 | + "feedback_config": { |
| 67 | + "general": { |
| 68 | + "report_title": "Evaluation Report", |
| 69 | + "show_score": true, |
| 70 | + "show_passed_tests": false, |
| 71 | + "add_report_summary": true |
| 72 | + } |
| 73 | + } |
| 74 | + }' |
18 | 75 | ``` |
19 | 76 |
|
20 | | -`--strict` turns warnings into errors, which helps catch broken navigation or links before opening a PR. |
| 77 | +## 3) Submit a student solution |
| 78 | + |
| 79 | +```bash |
| 80 | +curl -X POST http://localhost:8080/api/v1/submissions \ |
| 81 | + -H "Content-Type: application/json" \ |
| 82 | + -d '{ |
| 83 | + "external_assignment_id": "demo-assignment-1", |
| 84 | + "external_user_id": "student-1", |
| 85 | + "username": "student_1", |
| 86 | + "language": "python", |
| 87 | + "files": [ |
| 88 | + { |
| 89 | + "filename": "main.py", |
| 90 | + "content": "name = input().strip()\nprint(f\"Hello, {name}!\")" |
| 91 | + } |
| 92 | + ] |
| 93 | + }' |
| 94 | +``` |
| 95 | + |
| 96 | +Copy the returned `id` from the response. That is your `submission_id`. |
| 97 | + |
| 98 | +## 4) Poll for the result |
| 99 | + |
| 100 | +```bash |
| 101 | +curl http://localhost:8080/api/v1/submissions/<submission_id> |
| 102 | +``` |
21 | 103 |
|
22 | | -## Where to edit |
| 104 | +When grading finishes, response status becomes `completed`, and you will get: |
23 | 105 |
|
24 | | -- Main landing page: `docs/index.md` |
25 | | -- Core concept pages: `docs/core/` |
26 | | -- Pipeline deep dives: `docs/pipeline/` |
27 | | -- Architecture references: `docs/architecture/` |
28 | | -- Roadmaps: `docs/roadmaps/` |
| 106 | +- `final_score` |
| 107 | +- `feedback` |
| 108 | +- `result_tree` |
| 109 | +- `focus` |
29 | 110 |
|
30 | | -## Documentation standards |
| 111 | +## What you just exercised |
31 | 112 |
|
32 | | -Every new technical page should follow this teaching pattern: |
| 113 | +You ran the full core flow: |
33 | 114 |
|
34 | | -1. **What it is** |
35 | | -2. **Why it matters** |
36 | | -3. **How it works** |
37 | | -4. **Concrete example** |
38 | | -5. **Common mistakes** |
| 115 | +`LOAD_TEMPLATE -> BUILD_TREE -> SANDBOX -> PRE_FLIGHT -> GRADE -> FOCUS -> FEEDBACK` |
39 | 116 |
|
40 | | -For rubric quality guidance, use [Educational Criteria Design](../guides/criteria-tree-educational-standards.md). |
| 117 | +To understand each stage in depth, continue with [Pipeline Architecture](../core/pipeline-architecture.md). |
0 commit comments