Nouvelle table product_matches (status: pending/validated/rejected).
Matching via RapidFuzz token_sort_ratio, seuil configurable (défaut 85%).
Workflow :
1. python -m tickettracker.cli match [--threshold 85]
→ calcule et stocke les paires candidates
2. http://localhost:8000/matches
→ l'utilisateur valide ou rejette chaque paire
3. La comparaison de prix enrichie avec les paires validées
Nouvelles dépendances : rapidfuzz, watchdog (requirements.txt).
10 tests ajoutés (test_matcher.py), tous passent.
Suite complète : 129 passent, 1 xfail, 0 échec.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
# Parser HTML (mails Picnic)
|
|
beautifulsoup4==4.12.3
|
|
lxml==5.3.0
|
|
|
|
# Parser PDF (tickets Leclerc)
|
|
pdfplumber==0.11.4
|
|
pytesseract>=0.3.10 # binding Python pour Tesseract OCR
|
|
Pillow>=10.0 # manipulation d'images (extraction JPEG du PDF)
|
|
|
|
# LLM (appels API OpenAI-compatible)
|
|
requests>=2.31
|
|
|
|
# Web (dashboard FastAPI)
|
|
fastapi>=0.115
|
|
uvicorn[standard]>=0.30
|
|
jinja2>=3.1
|
|
python-multipart>=0.0.12
|
|
httpx>=0.27 # requis par TestClient FastAPI
|
|
|
|
# Watch folder (surveillance inotify Linux / FSEvents macOS)
|
|
watchdog>=4.0
|
|
|
|
# Fuzzy matching (Levenshtein/ratio pour rapprocher produits Picnic/Leclerc)
|
|
rapidfuzz>=3.9
|
|
|
|
# Tests
|
|
pytest==8.3.4
|
|
|
|
# Note : Tesseract OCR (binaire C++) doit être installé séparément :
|
|
# Windows : https://github.com/UB-Mannheim/tesseract/wiki
|
|
# Linux : apt install tesseract-ocr tesseract-ocr-fra
|
|
# Le modèle français (fra.traineddata) est requis.
|
|
# Sans droits admin, créer un dossier tessdata/ à la racine du projet :
|
|
# tessdata/fra.traineddata (14 Mo, téléchargeable sur github.com/tesseract-ocr/tessdata)
|
|
# tessdata/eng.traineddata (copié depuis l'install Tesseract)
|