114 lines
2.9 KiB
TOML
114 lines
2.9 KiB
TOML
[tool.poetry]
|
|
name = "agent-media"
|
|
version = "0.1.0"
|
|
description = "AI agent for managing a local media library"
|
|
authors = ["Francwa <francois.hodiaumont@gmail.com>"]
|
|
readme = "README.md"
|
|
|
|
[tool.poetry.dependencies]
|
|
python = "^3.12"
|
|
python-dotenv = "^1.0.0"
|
|
requests = "^2.32.5"
|
|
fastapi = "^0.121.1"
|
|
pydantic = "^2.12.4"
|
|
uvicorn = "^0.38.0"
|
|
pytest-xdist = "^3.8.0"
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
|
pytest = "^8.0.0"
|
|
pytest-cov = "^4.1.0"
|
|
pytest-asyncio = "^0.23.0"
|
|
httpx = "^0.27.0"
|
|
ruff = "^0.14.7"
|
|
black = "^25.11.0"
|
|
|
|
[build-system]
|
|
requires = ["poetry-core"]
|
|
build-backend = "poetry.core.masonry.api"
|
|
|
|
[tool.pytest.ini_options]
|
|
# Chemins où pytest cherche les tests
|
|
testpaths = ["tests"]
|
|
|
|
# Patterns de fichiers/classes/fonctions à considérer comme tests
|
|
python_files = ["test_*.py"] # Fichiers commençant par "test_"
|
|
python_classes = ["Test*"] # Classes commençant par "Test"
|
|
python_functions = ["test_*"] # Fonctions commençant par "test_"
|
|
|
|
# Options ajoutées automatiquement à chaque exécution de pytest
|
|
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%
|
|
"-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)
|
|
]
|
|
|
|
# Mode asyncio automatique pour pytest-asyncio
|
|
asyncio_mode = "auto"
|
|
|
|
# Déclaration des markers personnalisés
|
|
markers = [
|
|
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
|
|
"integration: marks tests as integration tests",
|
|
"unit: marks tests as unit tests",
|
|
]
|
|
|
|
# Filtrage des warnings
|
|
filterwarnings = [
|
|
"ignore::DeprecationWarning",
|
|
"ignore::PendingDeprecationWarning",
|
|
]
|
|
|
|
[tool.coverage.run]
|
|
source = ["agent", "application", "domain", "infrastructure"]
|
|
omit = ["tests/*", "*/__pycache__/*"]
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"def __repr__",
|
|
"raise NotImplementedError",
|
|
"if __name__ == .__main__.:",
|
|
]
|
|
|
|
[tool.black]
|
|
line-length = 88
|
|
target-version = ['py312']
|
|
include = '\.pyi?$'
|
|
exclude = '''
|
|
/(
|
|
__pycache__
|
|
| \.git
|
|
| \.qodo
|
|
| \.vscode
|
|
| \.ruff_cache
|
|
)/
|
|
'''
|
|
|
|
[tool.ruff]
|
|
line-length = 88
|
|
exclude = [
|
|
"__pycache__",
|
|
".git",
|
|
".ruff_cache",
|
|
".qodo",
|
|
".vscode",
|
|
]
|
|
select = [
|
|
"E", "W",
|
|
"F",
|
|
"I",
|
|
"B",
|
|
"C4",
|
|
"TID",
|
|
"PL",
|
|
"UP",
|
|
]
|
|
ignore = ["W503", "PLR0913", "PLR2004"]
|