codex
This commit is contained in:
86
TODO.md
86
TODO.md
@@ -101,72 +101,92 @@ Liste des tâches priorisées pour le développement de PriceWatch.
|
||||
|
||||
### Étape 9 : Tests
|
||||
- [x] Configurer pytest dans pyproject.toml
|
||||
- [x] Tests core/schema.py
|
||||
- [x] Tests core/schema.py (29 tests - 100% coverage)
|
||||
- [x] Validation ProductSnapshot
|
||||
- [x] Serialization JSON
|
||||
- [x] Tests core/registry.py
|
||||
- [x] Tests core/registry.py (40 tests - 100% coverage)
|
||||
- [x] Enregistrement stores
|
||||
- [x] Détection automatique
|
||||
- [x] Tests stores/amazon/
|
||||
- [x] Tests d'intégration avec 4 stores réels
|
||||
- [x] Tests core/io.py (36 tests - 97% coverage)
|
||||
- [x] Lecture/écriture YAML/JSON
|
||||
- [x] Sauvegarde debug HTML/screenshots
|
||||
- [x] Tests stores/amazon/ (33 tests - 89% coverage)
|
||||
- [x] match() avec différentes URLs
|
||||
- [x] canonicalize()
|
||||
- [x] extract_reference()
|
||||
- [~] parse() sur fixtures HTML (6 tests nécessitent fixtures réels)
|
||||
- [ ] Tests stores/cdiscount/
|
||||
- [ ] Idem Amazon
|
||||
- [ ] Tests scraping/
|
||||
- [ ] http_fetch avec mock
|
||||
- [ ] pw_fetch avec mock
|
||||
- [x] parse() sur fixtures HTML
|
||||
- [x] Tests stores/cdiscount/ (30 tests - 72% coverage)
|
||||
- [x] Tests complets avec fixtures réels
|
||||
- [x] Tests stores/backmarket/ (25 tests - 85% coverage)
|
||||
- [x] Tests complets avec fixtures réels
|
||||
- [x] Tests stores/aliexpress/ (32 tests - 85% coverage)
|
||||
- [x] Tests complets avec fixtures réels
|
||||
- [x] Tests scraping/ (42 tests)
|
||||
- [x] http_fetch avec mock (21 tests - 100% coverage)
|
||||
- [x] pw_fetch avec mock (21 tests - 91% coverage)
|
||||
|
||||
### Étape 10 : Intégration et validation
|
||||
- [x] Créer scrap_url.yaml exemple
|
||||
- [x] Tester pipeline complet YAML → JSON
|
||||
- [x] Tester avec vraies URLs Amazon
|
||||
- [ ] Tester avec vraies URLs Cdiscount
|
||||
- [x] Tester avec vraies URLs Cdiscount
|
||||
- [x] Vérifier tous les modes de debug
|
||||
- [x] Valider sauvegarde HTML/screenshots
|
||||
- [x] Documentation finale
|
||||
|
||||
### Bilan Étape 9 (Tests pytest)
|
||||
**État**: 80 tests passent / 86 tests totaux (93%)
|
||||
- ✓ core/schema.py: 29/29 tests
|
||||
- ✓ core/registry.py: 24/24 tests
|
||||
- ✓ stores/amazon/: 27/33 tests (6 tests nécessitent fixtures HTML réalistes)
|
||||
### ✅ PHASE 1 TERMINÉE À 100%
|
||||
**État final**: 295 tests passent / 295 tests totaux (100%)
|
||||
**Coverage global**: 76%
|
||||
|
||||
**Tests restants**:
|
||||
- Fixtures HTML Amazon/Cdiscount
|
||||
- Tests Cdiscount store
|
||||
- Tests scraping avec mocks
|
||||
**Détail par module**:
|
||||
- ✅ core/schema.py: 100% coverage
|
||||
- ✅ core/registry.py: 100% coverage (40 tests)
|
||||
- ✅ core/io.py: 97% coverage (36 tests)
|
||||
- ✅ scraping/http_fetch.py: 100% coverage (21 tests)
|
||||
- ✅ scraping/pw_fetch.py: 91% coverage (21 tests)
|
||||
- ✅ stores/amazon/: 89% coverage (33 tests)
|
||||
- ✅ stores/aliexpress/: 85% coverage (32 tests)
|
||||
- ✅ stores/backmarket/: 85% coverage (25 tests)
|
||||
- ✅ stores/cdiscount/: 72% coverage (30 tests)
|
||||
|
||||
**4 stores opérationnels**: Amazon, Cdiscount, Backmarket, AliExpress
|
||||
|
||||
---
|
||||
|
||||
## Phase 2 : Base de données (Future)
|
||||
## Phase 2 : Base de données (En cours)
|
||||
|
||||
### Persistence
|
||||
- [ ] Schéma PostgreSQL
|
||||
- [ ] Migrations Alembic
|
||||
- [ ] Models SQLAlchemy
|
||||
- [x] Schéma PostgreSQL
|
||||
- [x] Migrations Alembic
|
||||
- [x] Models SQLAlchemy
|
||||
- [x] Connexion DB (engine, session, init)
|
||||
- [x] Tests DB de base
|
||||
- [x] Repository pattern (ProductRepository)
|
||||
- [x] ScrapingPipeline (persistence optionnelle)
|
||||
- [x] CLI `--save-db/--no-db`
|
||||
- [x] Tests end-to-end CLI + DB
|
||||
- [ ] CRUD produits
|
||||
- [ ] Historique prix
|
||||
|
||||
### Configuration
|
||||
- [ ] Fichier config (DB credentials)
|
||||
- [ ] Variables d'environnement
|
||||
- [ ] Dockerfile PostgreSQL
|
||||
- [x] Fichier config (DB credentials)
|
||||
- [x] Variables d'environnement
|
||||
- [x] Docker Compose PostgreSQL/Redis
|
||||
|
||||
---
|
||||
|
||||
## Phase 3 : Worker et automation (Future)
|
||||
## Phase 3 : Worker et automation (En cours)
|
||||
|
||||
### Worker
|
||||
- [ ] Setup Redis
|
||||
- [ ] Worker RQ ou Celery
|
||||
- [ ] Queue de scraping
|
||||
- [x] Setup Redis
|
||||
- [x] Worker RQ
|
||||
- [x] Queue de scraping
|
||||
- [ ] Retry policy
|
||||
|
||||
### Planification
|
||||
- [ ] Cron ou scheduler intégré
|
||||
- [ ] Scraping quotidien automatique
|
||||
- [x] Cron ou scheduler intégré
|
||||
- [x] Scraping quotidien automatique
|
||||
- [ ] Logs des runs
|
||||
|
||||
---
|
||||
@@ -216,4 +236,4 @@ Liste des tâches priorisées pour le développement de PriceWatch.
|
||||
|
||||
---
|
||||
|
||||
**Dernière mise à jour**: 2026-01-13
|
||||
**Dernière mise à jour**: 2026-01-14
|
||||
|
||||
Reference in New Issue
Block a user