feat: fuzzy matching Picnic ↔ Leclerc + page /matches dans le dashboard
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>
This commit is contained in:
@@ -46,3 +46,72 @@
|
||||
.overflow-auto {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* Badge pour les correspondances fuzzy dans la table compare */
|
||||
.badge-fuzzy {
|
||||
display: inline-block;
|
||||
background: var(--pico-secondary-background, #e8f4fd);
|
||||
color: var(--pico-secondary, #0077b6);
|
||||
border-radius: 3px;
|
||||
padding: 0 4px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: bold;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
/* Score de similarité dans la table matches */
|
||||
.match-score {
|
||||
display: inline-block;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.score-high { background: #d4edda; color: #155724; }
|
||||
.score-medium { background: #fff3cd; color: #856404; }
|
||||
.score-low { background: #f8d7da; color: #721c24; }
|
||||
|
||||
/* Boutons valider/rejeter dans la table matches */
|
||||
.btn-validate {
|
||||
background: var(--pico-primary);
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 4px 10px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.btn-reject {
|
||||
padding: 4px 10px;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.match-actions {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Formulaire de filtre de dates */
|
||||
.date-filter {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 1.5rem;
|
||||
padding: 0.75rem 1rem;
|
||||
background: var(--pico-card-background-color, #f8f9fa);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.date-filter input[type="month"] {
|
||||
width: auto;
|
||||
margin: 0;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.date-filter button,
|
||||
.date-filter a {
|
||||
margin: 0;
|
||||
padding: 4px 12px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user