gwoe-antragspruefer/app
Dotty Dotter 6a433e9217 #44 Batch-Analyse: POST /api/batch-analyze
Neuer Endpoint der die neuesten ungeprüften Drucksachen eines BL
automatisch sucht, herunterlädt und in die Queue (#95) einreiht:

POST /api/batch-analyze
  bundesland=NRW  (Pflicht)
  limit=10        (1-100, default 10)

Flow:
1. adapter.search("", limit=limit*3) holt neueste Drucksachen
2. Pro Drucksache: check ob schon bewertet → skip
3. download_text → enqueue(run_drucksache_analysis)
4. Queue verarbeitet seriell mit 10s Pause (DashScope-freundlich)

Response:
{
  "status": "batch_enqueued",
  "enqueued": 7,
  "skipped_existing": 3,
  "jobs": [{"drucksache": "18/...", "title": "...", "queue_position": 1}, ...]
}

Rate-limited auf 3/min. Erfordert Auth (#43).
Bei voller Queue: enqueued nur soweit Platz, kein Error.

Tests: 201 passed.

Refs: #44, #95 (Queue-Basis)
2026-04-10 17:26:05 +02:00
..
kontext Activate LSA: Wahlprogramme + ingest + frontend (#2) 2026-04-07 22:12:32 +02:00
routers Initial commit: GWÖ-Antragsprüfer v1.0 2026-03-28 22:30:24 +01:00
static/referenzen Add 30 Wahlprogramme für TH/BB/HH/SH/BW/RP (#37, #39, #40, #32, #41, #42) 2026-04-09 08:03:11 +02:00
templates #96: Methodik-Seite um konkretes Bewertungsbeispiel ergänzt 2026-04-10 16:34:44 +02:00
__init__.py Initial commit: GWÖ-Antragsprüfer v1.0 2026-03-28 22:30:24 +01:00
analyzer.py Fix: PFLICHT-FRAKTIONEN = alle Landtagsfraktionen der WP, nicht nur Antragsteller+Regierung 2026-04-10 16:08:04 +02:00
auswertungen.py Phase C: Auswertungen-Dashboard #58 + CSV-Export #45 (Roadmap #59) 2026-04-09 11:25:57 +02:00
auth.py #43 Keycloak SSO: JWT-Middleware + UI-Guiding 2026-04-10 14:28:57 +02:00
bundeslaender.py Phase J: SN EDAS-XML-Adapter (#26/#38) — Sachsen aktiv via XML-Export 2026-04-09 14:39:03 +02:00
config.py Initial commit: GWÖ-Antragsprüfer v1.0 2026-03-28 22:30:24 +01:00
database.py #47: Auto-Re-Analyse bei nicht-verifizierbaren Zitaten 2026-04-10 10:35:01 +02:00
embeddings.py #57 Security: print() → logger.exception für alle Module 2026-04-10 17:05:12 +02:00
main.py #44 Batch-Analyse: POST /api/batch-analyze 2026-04-10 17:26:05 +02:00
models.py Initial commit: GWÖ-Antragsprüfer v1.0 2026-03-28 22:30:24 +01:00
parlamente.py #57 Security: print() → logger.exception für alle Module 2026-04-10 17:05:12 +02:00
parteien.py Phase J: SN EDAS-XML-Adapter (#26/#38) — Sachsen aktiv via XML-Export 2026-04-09 14:39:03 +02:00
queue.py #95 Job-Queue: SQLite-backed asyncio Worker mit Backpressure 2026-04-10 17:24:34 +02:00
report.py #57 Security: print() → logger.exception für alle Module 2026-04-10 17:05:12 +02:00
validators.py Phase A: Audit-Restbefunde #57.3/4/7 (Roadmap #59) 2026-04-09 11:15:16 +02:00
wahlperioden.py Phase C: Auswertungen-Dashboard #58 + CSV-Export #45 (Roadmap #59) 2026-04-09 11:25:57 +02:00
wahlprogramme.py Add 30 Wahlprogramme für TH/BB/HH/SH/BW/RP (#37, #39, #40, #32, #41, #42) 2026-04-09 08:03:11 +02:00