infra! Added pre-commit module and configuration

This commit is contained in:
2025-12-18 07:37:50 +01:00
parent 9a726b52bc
commit f88f512cb0
3 changed files with 215 additions and 6 deletions
+7 -5
View File
@@ -4,6 +4,7 @@ version = "0.1.0"
description = "AI agent for managing a local media library"
authors = ["Francwa <francois.hodiaumont@gmail.com>"]
readme = "README.md"
package-mode = false
[tool.poetry.dependencies]
python = "^3.12"
@@ -21,6 +22,7 @@ pytest-asyncio = "^0.23.0"
httpx = "^0.27.0"
ruff = "^0.14.7"
black = "^25.11.0"
pre-commit = "^4.5.1"
[build-system]
requires = ["poetry-core"]
@@ -39,11 +41,11 @@ python_functions = ["test_*"] # Fonctions commençant par "test_"
addopts = [
"-v", # --verbose : affiche chaque test individuellement
"--tb=short", # --traceback=short : tracebacks courts et lisibles
"--cov=.", # --coverage : mesure le coverage de tout le projet (.)
"--cov-report=term-missing", # Affiche les lignes manquantes dans le terminal
"--cov-report=html", # Génère un rapport HTML dans htmlcov/
"--cov-report=xml", # Génère un rapport XML (pour CI/CD)
"--cov-fail-under=80", # Échoue si coverage < 80%
#"--cov=.", # --coverage : mesure le coverage de tout le projet (.)
#"--cov-report=term-missing", # Affiche les lignes manquantes dans le terminal
#"--cov-report=html", # Génère un rapport HTML dans htmlcov/
#"--cov-report=xml", # Génère un rapport XML (pour CI/CD)
#"--cov-fail-under=80", # Échoue si coverage < 80%
"-n=auto", # --numprocesses=auto : parallélise les tests (pytest-xdist)
"--strict-markers", # Erreur si un marker non déclaré est utilisé
"--disable-warnings", # Désactive l'affichage des warnings (sauf erreurs)