This Python script assigns ENSC students to specialty tracks based on their grades, track wishes and track capacities.
Input data (student names, grades and track wishes) is loaded from a CSV file. Students ranking and track assignments are written to CSV files.
Algorithm goes as follow:
- For each student, a weighted average of their grades during past semesters is computed.
- These average grades are used to sort students by merit (best first).
- In that order, students are assigned to the highest non-full track in their wishes.
> python -m match <students CSV file name>
This script needs Python 3.7+ and uses the following tools:
Run the following commands to check the codebase.
> python -m pylint match.py # linting (including type checks)
> python -m mypy match.py # type checks only