Compare commits
2 Commits
feat/app-f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 47ed7e7db5 | |||
| ecce144bf2 |
27
.github/workflows/ci.yml
vendored
27
.github/workflows/ci.yml
vendored
@@ -1,27 +0,0 @@
|
|||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ '**' ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ '**' ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python-version: ['3.11']
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r requirements.txt
|
|
||||||
- name: Run tests
|
|
||||||
run: |
|
|
||||||
pytest -q
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
stages:
|
|
||||||
- test
|
|
||||||
|
|
||||||
test:
|
|
||||||
image: python:3.11
|
|
||||||
stage: test
|
|
||||||
before_script:
|
|
||||||
- pip install --upgrade pip
|
|
||||||
- pip install -r requirements.txt
|
|
||||||
script:
|
|
||||||
- pytest -q
|
|
||||||
only:
|
|
||||||
- branches
|
|
||||||
- merge_requests
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
Titel: Feature: App‑Factory, Validierung, vCard-Export, Tests
|
|
||||||
|
|
||||||
Kurzbeschreibung
|
|
||||||
- Ersetzt das papierbasierte Anmeldeformular durch eine Flask-Webseite (App‑Factory).
|
|
||||||
- Speichert deutsche Adressdaten inkl. Telefon und E‑Mail in SQLite.
|
|
||||||
- Fügt serverseitige Validierung für PLZ, E‑Mail und Telefon hinzu (`email-validator`, `phonenumbers` mit Fallback).
|
|
||||||
- Generiert vCard 4.0 nach erfolgreicher Einreichung und speichert sie unter `vcards/`.
|
|
||||||
- Enthält Unit- und Integrationstests (pytest) und initiale Datenbank-Migrationen (Alembic/Flask‑Migrate).
|
|
||||||
|
|
||||||
Änderungen
|
|
||||||
- Neue/überarbeitete Dateien:
|
|
||||||
- `application/` package (App‑Factory, `routes.py`, `models.py`, `extensions.py`)
|
|
||||||
- `utils.py` (vCard-Generator)
|
|
||||||
- `templates/index.html` (Formular/Fehlermeldungen)
|
|
||||||
- `tests/` (Unit- und Integrationstests)
|
|
||||||
- `migrations/` (gestampfte Basis)
|
|
||||||
- `requirements.txt` (`email-validator`, `phonenumbers`)
|
|
||||||
|
|
||||||
Testen (lokal)
|
|
||||||
1. Virtuelle Umgebung aktivieren / Python 3.11 verwenden.
|
|
||||||
2. Abhängigkeiten installieren:
|
|
||||||
```bash
|
|
||||||
pip install -r requirements.txt
|
|
||||||
```
|
|
||||||
3. Tests ausführen:
|
|
||||||
```bash
|
|
||||||
pytest -q
|
|
||||||
```
|
|
||||||
|
|
||||||
Migrationshinweise
|
|
||||||
- `migrations/` ist initialisiert und die DB wurde gestampft. Bei Modelländerungen bitte neue Migrationen mit `flask db migrate` und `flask db upgrade` erzeugen.
|
|
||||||
|
|
||||||
Review-Checklist
|
|
||||||
- [ ] Validierung (E‑Mail / Telefon / PLZ) prüfen.
|
|
||||||
- [ ] Formular-UI prüfen (templates/index.html).
|
|
||||||
- [ ] vCard-Export testen (Erstellung in `vcards/`).
|
|
||||||
- [ ] CI testen (siehe `.github/workflows/ci.yml` / `.gitlab-ci.yml`).
|
|
||||||
|
|
||||||
Zusätzliche Hinweise
|
|
||||||
- `email-validator` wird ohne externe Lieferbarkeitschecks verwendet, damit Tests reproduzierbar sind.
|
|
||||||
Reference in New Issue
Block a user