API reference
scholia.scheme
Marking scheme: questions and their scored categories.
Category
dataclass
Question
dataclass
Scheme
dataclass
The full marking scheme for one piece of assessment.
Source code in src/scholia/scheme.py
get_category(question_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
question_names()
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
get_student(student_id)
Return the student with the given ID, or None.
load(path)
classmethod
Load the roster from a CSV file.
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(question_names)
Sync question columns with the given list.
Questions not yet in the roster are added with empty values.
The column order is updated to match question_names; columns
already present but absent from question_names are appended
at the end.
Source code in src/scholia/students.py
update(student_id, question, category)
Set a student's category for one question.
If question 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_question_marks(student, scheme)
Return each question's mark for a student.
Returns None for any question with no valid category assigned.
Source code in src/scholia/marks.py
compute_total_marks(student, scheme)
Return the sum of all question marks for a student.
Returns None if any question 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-question boxplot, and (with at least two
questions and two complete students) a correlation heatmap.
Source code in src/scholia/stats.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 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 | |