[tool.poetry] name = "alfred" version = "0.1.6" description = "AI agent for managing a local media library" authors = ["Francwa "] readme = "README.md" package-mode = false [tool.poetry.dependencies] python = "==3.14.2" python-dotenv = "^1.0.0" requests = "^2.32.5" fastapi = "^0.127.0" pydantic = "^2.12.4" uvicorn = "^0.40.0" pytest-xdist = "^3.8.0" httpx = "^0.28.1" [tool.poetry.group.dev.dependencies] pytest = "^8.0.0" pytest-cov = "^4.1.0" pytest-asyncio = "^0.23.0" ruff = "^0.14.7" pre-commit = "^4.5.1" bump-my-version = "^1.2.5" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" [tool.pytest.ini_options] # Chemins où pytest cherche les tests testpaths = ["tests"] # Ajouter le répertoire racine au PYTHONPATH pour les imports pythonpath = ["."] # 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) "--dist=loadscope", # Distribution strategy: group tests by module "--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.ruff] line-length = 88 exclude = [ "__pycache__", ".git", ".ruff_cache", ".qodo", ".vscode", ] lint.select = [ "E", "W", "F", "I", "B", "C4", "TID", "PL", "UP", ] lint.ignore = ["PLR0913", "PLR2004", "TID252", "E501"] [tool.ruff.lint.per-file-ignores] "tests/**/*.py" = ["PLC0415"] "conftest.py" = ["PLC0415"]