Dies ist eine alte Version des Dokuments!
| Review-Protokoll |
| Objekt | ghwalin/exam_api, Python-Dateien in app.py, data/, model/, service/, util/ |
| Stand | Commit b18ef94 |
| Grundlage | BZZ Codingstandards für Python, Kapitel 01–04 |
| Datum | … |
| Moderator | … |
| Autor | … |
| Gutachter | …, …, … |
| Dauer | 45 Minuten |
| Nr | Dateiname | Zeile | Bew. | Befund |
| 1 | app.py | 16–18 | N | Vor create_app fehlt eine zweite Leerzeile. |
| 2 | app.py | 18 | N | create_app hat keinen Docstring. |
| 3 | app.py | 77 | N | Nach create_app fehlt eine zweite Leerzeile. |
| 4 | data/*.py, model/*.py, service/*.py | – | N | Modulnamen in PascalCase statt in Kleinbuchstaben (snake_case). |
| 5 | data/EventDAO.py | 38, 50, 89 | B | Unbenutzte Schleifenvariable key. |
| 6 | data/EventDAO.py | 39 | H | timestamp ist ein String, .date() führt beim Filtern zu einem AttributeError. |
| 7 | data/EventDAO.py | 51–55 | H | TypeError wird übergangen, fehlerhafte Termine fehlen ohne Meldung. |
| 8 | data/ExamDAO.py | 39–41 | H | Fehler in condition wird mit print gemeldet und als «passt» gewertet. |
| 9 | data/ExamDAO.py | 142 | N | Leerzeile vor Methode fehlt. |
| 10 | model/Event.py | 8–12 | N | Klassen-Docstring ohne Attribute und Methoden (gleich in Exam, Person). |
| 11 | model/Event.py | 20–26 | N | to_json ohne Docstring, JSON aus Strings zusammengesetzt. |
| 12 | model/Event.py | 68 | N | Vor __main__-Prüfung fehlt eine Leerzeile; die Prüfung ist leer. |
| 13 | model/Exam.py | 10 | N | Dataclass erbt unnötig von dict (gleich in Person). |
| 14 | service/AuthenticationService.py | 59 | N | Fehlgeschlagener Login liefert 404 statt 401. |
| 15 | service/AuthenticationService.py | 63 | N | Zu allgemeine Exception, Variable ex unbenutzt. |
| 16 | service/ExamService.py | 87–92 | N | Docstring von save unvollständig. |
| 17 | service/ExamService.py | 97 | N | oldExam nicht in snake_case. |
| 18 | util/authorization.py | 31 | N | Zu allgemeine Exception bei der Token-Prüfung. |
| 19 | util/authorization.py | 39–43 | N | teacher_required ohne Docstring, liefert 401 statt 403. |
| Zusammenfassung |
| Hauptfehler (H) | 3 |
| Nebenfehler (N) | 15 |
| Bemerkungen (B) | 1 |
| Empfehlung | Überarbeitung nötig. Die drei Hauptfehler werden vor dem nächsten Release korrigiert. Die Umbenennung der Module (Nr. 4) betrifft alle Imports und erfolgt in einem eigenen Schritt. |
Marcel Suter