Physics TA Assignment Tool (physethta)
This Python package automates the assignment of teaching assistants (TAs) to physics courses at ETH Zurich. It processes structured data from internal and external sources, applies configuration rules, and generates LaTeX reports summarizing TA allocations by group and course.
🧠 Overview
The assignment pipeline consists of:
-
Data Loading: Reading input files from Excel/CSV format.
-
Mapping Supervisors: Combining internal (via
vorg.csv) and external (viaExterne.xlsx) PhD supervisors. -
Course Title Normalization: Creating consistent course titles via
config.yaml. -
Assignment Logic:
- Organizing assistants under supervisors (PIs).
- Associating students with courses (with language information).
-
Report Generation:
- Producing
LaTeXdocuments sorted by PI and course. - Optionally compiling them into PDFs.
- Producing
📁 Project Structure
physethta/
│
├── assigner.py # Core logic for building PI and course dictionaries
├── config.py # YAML config loader
├── external.py # Handles mappings for external PhD students
├── loader.py # Loads and cleans data from Excel/CSV
├── report.py # Generates LaTeX reports (per group and per course)
├── utils.py # Name normalization and exclusion helpers
├── assets/
│ └── Logo.pdf # ETH footer logo (copied into output)
├── __init__.py
│
run_assignment.py # Main command-line entry point
setup.py # Install script (for pip)
⚙️ Input Files
All expected in the same input directory (default: current working directory):
Externe.xlsx: List of external PhDs and their advisors.vorg.csv: Internal assignments linking assistants to supervisors.alle.csv: All applicants with metadata and course assignments.sprachen.csv: Language flags (e.g.,unterricht_deutsch).config.yaml: Configuration file with exclusions, aliases, formatting overrides.
✏️ Configuration
The config.yaml file lets you:
- Exclude supervisors or MAS from reports (
exclude_pis,exclude_mas) - Reassign supervisors (
reassignments) - Rename courses (
course_overrides,conditional_courses) - Group and label special roles (
special_modules,praktikum_modules) - Override responsible lecturers (
lecturer_aliases) - Set metadata for LaTeX output (
meta.semester,meta.author)
See the included config.yaml for a working example.
🚀 Installation
From the project root, install with:
pip install physethta
This provides the command-line tool:
run_assignment
🛠️ Usage
From the directory containing your input files:
run_assignment --draft
Optional arguments:
--input DIR: Input folder (default:.)--config FILE: Path toconfig.yaml(default:./config.yaml)--output DIR: Output folder (default:./output)--draft: Adds a "Draft" watermark to the PDF output
📆 Output
Two .tex files will be created in output/:
AssHS25_perGroup.pdf: Sorted by PI/supervisorAssHS25_perCourse.pdf: Sorted by course title
In the folder output/tables you will find csv files per course, for VMP, etc.
Logo.pdfwill be copied into the output folder automatically.
🔄 Start of New Semester
To prepare the tool for a new semester:
-
Do all the assignments in hat-admin https://swc.itsapp.ethz.ch/hat-swc/app
-
To get to the OIS report, use https://zo-srv-citweb.ethz.ch/Citrix/ETH_CitrixWeb/
-
Once done, export via citrix viewer -> OIS reports
- Bedarfszuweisung -> Choose semester -> Export CSV (UTF8) to alle.csv
- Vorgesetzte und Mitarbeiter -> Choose semester -> Export CSV (UTF8) to vorg.csv
- Bewerbungen -> Choose semester --> Export CSV (UTF8) to sprachen.csv
-
Duplicate and edit
config.yaml:- Update
meta.semestertoFS26orHS26 - Update exclusions, reassignments, or course overrides as needed
- Update
-
Run:
run_assignment --draft -
Check
.pdfoutput inoutput/and the csv's inoutput/tables
Package things
python -m build --no-isolation
And then
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=...my API TOKEN...
twine upload dist/*
Metadata
Release files for physethta 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| physethta-1.0.4.tar.gz | 12.7 kB | Without provenance | Details for physethta-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| physethta-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for physethta-1.0.4-py3-none-any.whl |
Total release size: 24.3 kB
Release files / physethta-1.0.4.tar.gz
| Download URL | physethta-1.0.4.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f4617ce81f8611abd8bd7ec8df7504c5529c6482b84882a1e755f9f2a64645a
|
|
BLAKE2b-256 checksum How to use checksums |
58da8e2de98f0eeb684238fa5322740e2c7e7a49f9fe2c8d43caf271837d1424
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / physethta-1.0.4-py3-none-any.whl
| Download URL | physethta-1.0.4-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e99a0e3652453f51f14aa3de63023626d325824e7cc89517204113ad31592962
|
|
BLAKE2b-256 checksum How to use checksums |
e324c6a5a058119b11e48a8f37ec5cf8efe88cfcd6856ca2cd3b594a083cde41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for physethta 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.