Spaces:
Sleeping
Sleeping
docs(readme): add coverage badge and test results table
Browse files
README.md
CHANGED
|
@@ -6,6 +6,7 @@ colorTo: green
|
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
---
|
|
|
|
| 9 |
|
| 10 |
# Déployez un modèle de Machine Learning
|
| 11 |
|
|
@@ -37,7 +38,8 @@ mon-projet/
|
|
| 37 |
│
|
| 38 |
├── tests/
|
| 39 |
│ ├── test_api.py
|
| 40 |
-
│
|
|
|
|
| 41 |
│
|
| 42 |
├── .github/workflows/
|
| 43 |
├── requirements.txt
|
|
@@ -327,6 +329,20 @@ Rapport HTML navigable (généré dans `htmlcov/`) :
|
|
| 327 |
pytest tests/ --cov=app --cov-report=term-missing --cov-report=html
|
| 328 |
```
|
| 329 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 330 |
### Structure des tests
|
| 331 |
|
| 332 |
| Fichier | Contenu |
|
|
@@ -334,6 +350,8 @@ pytest tests/ --cov=app --cov-report=term-missing --cov-report=html
|
|
| 334 |
| `tests/conftest.py` | Fixtures partagées (client de test, payload valide) |
|
| 335 |
| `tests/test_api.py` | Tests des endpoints HTTP (health, predict, auth) |
|
| 336 |
| `tests/test_model.py` | Tests du pipeline ML (chargement, prédiction, seuil) |
|
|
|
|
|
|
|
| 337 |
|
| 338 |
## Déploiement
|
| 339 |
|
|
|
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
+

|
| 10 |
|
| 11 |
# Déployez un modèle de Machine Learning
|
| 12 |
|
|
|
|
| 38 |
│
|
| 39 |
├── tests/
|
| 40 |
│ ├── test_api.py
|
| 41 |
+
│ ├── test_model.py
|
| 42 |
+
│ └── test_db.py
|
| 43 |
│
|
| 44 |
├── .github/workflows/
|
| 45 |
├── requirements.txt
|
|
|
|
| 329 |
pytest tests/ --cov=app --cov-report=term-missing --cov-report=html
|
| 330 |
```
|
| 331 |
|
| 332 |
+
### Résultat de couverture
|
| 333 |
+
|
| 334 |
+
Dernière mesure : **95%** (13 tests, 193 instructions)
|
| 335 |
+
|
| 336 |
+
| Fichier | Couverture |
|
| 337 |
+
|---|---|
|
| 338 |
+
| `app/db/crud.py` | 100% |
|
| 339 |
+
| `app/db/models.py` | 100% |
|
| 340 |
+
| `app/schemas/prediction.py` | 100% |
|
| 341 |
+
| `app/routes/predict.py` | 98% |
|
| 342 |
+
| `app/main.py` | 96% |
|
| 343 |
+
| `app/db/session.py` | 56% *(infrastructure PostgreSQL, non testée en isolation)* |
|
| 344 |
+
|
| 345 |
+
|
| 346 |
### Structure des tests
|
| 347 |
|
| 348 |
| Fichier | Contenu |
|
|
|
|
| 350 |
| `tests/conftest.py` | Fixtures partagées (client de test, payload valide) |
|
| 351 |
| `tests/test_api.py` | Tests des endpoints HTTP (health, predict, auth) |
|
| 352 |
| `tests/test_model.py` | Tests du pipeline ML (chargement, prédiction, seuil) |
|
| 353 |
+
| `tests/test_db.py` | Tests de la couche base de données (CRUD, contraintes d'intégrité) |
|
| 354 |
+
|
| 355 |
|
| 356 |
## Déploiement
|
| 357 |
|