Compare commits
1 Commits
47ed7e7db5
...
feat/app-f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01bb09af0d |
27
.github/workflows/ci.yml
vendored
Normal file
27
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
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
|
||||||
14
.gitlab-ci.yml
Normal file
14
.gitlab-ci.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
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
|
||||||
40
PR_DESCRIPTION.md
Normal file
40
PR_DESCRIPTION.md
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
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