f17abdbaec
- Removed backward-compat shims _sanitise_for_fs / _strip_episode_from_normalised
in domain/release/value_objects.py (zero callers).
- Fixed ruff warnings across the codebase:
* PLW1510: explicit check=False on subprocess.run calls
* PLC0415: promoted lazy imports to module top where no cycle exists
(manage_subtitles, placer, qbittorrent/client, file_manager)
* E402: fixed module-level import ordering in language_registry.py and
subtitles/knowledge/loader.py
* F841 / B007: removed unused locals (identifier.py)
* C416: replaced unnecessary set comprehension with set() in
release/knowledge.py
- Ruff config: ignore PLR0911/PLR0912 globally (noisy on mappers and
orchestrator use-cases) and PLW0603 (intentional for the memory singleton).
- Updated tech debt memory: P1 done, ShowStatus actually complete (was a
stale note).
152 lines
4.0 KiB
TOML
152 lines
4.0 KiB
TOML
[project]
|
|
name = "alfred"
|
|
version = "0.1.7"
|
|
description = "AI agent for managing a local media library"
|
|
authors = ["Francwa <francois.hodiaumont@gmail.com>"]
|
|
readme = "README.md"
|
|
requires-python = "==3.14.3"
|
|
dependencies = [
|
|
"python-dotenv~=1.0.0",
|
|
"requests~=2.32.5",
|
|
"fastapi~=0.127.1",
|
|
"pydantic~=2.12.4",
|
|
"uvicorn~=0.40.0",
|
|
"httpx~=0.28.1",
|
|
"pydantic-settings~=2.12.0",
|
|
"click~=8.1",
|
|
]
|
|
|
|
[tool.alfred]
|
|
image_name = "alfred_media_organizer"
|
|
librechat_version = "v0.8.4"
|
|
rag_version = "v0.7.3"
|
|
service_name = "alfred"
|
|
uv_version = "0.11.6"
|
|
|
|
[tool.alfred.secrets]
|
|
JWT_SECRET = "32:hex"
|
|
JWT_REFRESH_SECRET = "32:hex"
|
|
CREDS_KEY = "32:hex"
|
|
CREDS_IV = "16:hex"
|
|
MEILI_MASTER_KEY = "32:b64"
|
|
MONGO_PASSWORD = "16:hex"
|
|
POSTGRES_PASSWORD = "16:hex"
|
|
QBITTORRENT_PASSWORD = "16:hex"
|
|
|
|
[tool.alfred.config.pattern]
|
|
type = "multi"
|
|
patterns = [
|
|
"^#[=\\-*#]{3,}#?\\s*$",
|
|
"^#\\s+(.+?)\\s+#\\s*$",
|
|
"^#[=\\-*#]{3,}#?\\s*$",
|
|
]
|
|
|
|
[tool.alfred.config]
|
|
extra_fields = []
|
|
|
|
[tool.uv]
|
|
package = false
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest~=8.0.0",
|
|
"pytest-cov~=4.1.0",
|
|
"pytest-asyncio~=0.23.0",
|
|
"pytest-xdist~=3.8.0",
|
|
"ruff~=0.14.7",
|
|
"pre-commit~=4.5.1",
|
|
"bump-my-version~=1.2.5",
|
|
]
|
|
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[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 = [
|
|
"PLR0911", # too-many-returns: noisy on mappers / orchestrator use-cases with early-return validation
|
|
"PLR0912", # too-many-branches: same as above
|
|
"PLR0913", # too-many-arguments
|
|
"PLR2004", # magic-value-comparison
|
|
"PLW0603", # global statement: intentional for the memory singleton (see project_memory_singleton.md)
|
|
"TID252",
|
|
"E501",
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests/**/*.py" = ["PLC0415"]
|
|
"conftest.py" = ["PLC0415"]
|