API reference
scholia.scheme
Marking scheme: criteria and their scored categories.
Band
dataclass
Category
dataclass
Criterion
dataclass
Scheme
dataclass
The full marking scheme for one piece of assessment.
Source code in src/scholia/scheme.py
criterion_names()
get_category(criterion_name, category_id)
Return the category, or None if not found.
Source code in src/scholia/scheme.py
load(path)
classmethod
Load a scheme from a YAML file.
Source code in src/scholia/scheme.py
save(path)
Write the scheme to a YAML file.
Source code in src/scholia/scheme.py
scholia.students
Student roster and per-student category assignments.
Student
dataclass
Students
dataclass
The full student roster.
Source code in src/scholia/students.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |
get_student(student_id)
Return the student with the given ID, or None.
load(path)
classmethod
Load the roster from a CSV file.
UTF-8 (with or without BOM) is tried first. For files in a
legacy single-byte encoding (e.g. Mac Roman or Windows-1252
exported by some university systems), charset-normalizer
detects the encoding; if detection fails or the detected
encoding cannot decode the raw bytes, Mac Roman is used as a
final fallback.
Source code in src/scholia/students.py
save(path)
Write the roster to a CSV file.
Source code in src/scholia/students.py
sync_headers(criterion_names)
Sync criterion columns with the given list.
Criteria not yet in the roster are added with empty values.
The column order is updated to match criterion_names; columns
already present but absent from criterion_names are appended
at the end.
Source code in src/scholia/students.py
update(student_id, criterion, category)
Set a student's category for one criterion.
If criterion is not yet a column in the roster, it is added.
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/scholia/students.py
scholia.marks
Compute numeric marks from category assignments and a scheme.
compute_criterion_marks(student, scheme)
Return each criterion's mark for a student.
Returns None for any criterion with no category assigned yet.
Raises:
| Type | Description |
|---|---|
CategoryNotInSchemeError
|
if a non-empty category label recorded in
|
Source code in src/scholia/marks.py
compute_total_marks(student, scheme)
Return the sum of all criterion marks for a student.
Returns None if any criterion is unassigned or the scheme is empty.
Source code in src/scholia/marks.py
scholia.feedback
Generate per-student feedback markdown files.
generate_all_feedback(students, scheme, feedback_dir)
Write feedback files for all students in the roster.
Source code in src/scholia/feedback.py
generate_student_feedback(student, scheme, feedback_dir)
Write a markdown feedback file to feedback_dir/<student_id>.md.
Source code in src/scholia/feedback.py
scholia.stats
Generate summary statistics and charts for a marked cohort.
generate_marks_csv(students, scheme, output_path)
Write student IDs and total marks to a CSV file.
Students with incomplete marking have an empty total_marks cell.
Source code in src/scholia/stats.py
generate_summary(students, scheme, output_path, charts_dir=None)
Write a cohort summary to output_path.
When charts_dir is provided, saves a distribution histogram,
cumulative distribution, per-criterion boxplot, and (with at least two
criteria and two complete students) a correlation heatmap.
Source code in src/scholia/stats.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | |