feat: interface admin regles, refactoring viewer, README, pyproject.toml

- Nouveau module rules_manager.py : CRUD YAML pour les regles metier
- Nouveau blueprint bp_rules.py + template admin_rules.html :
  interface web pour activer/desactiver/ajouter/supprimer des regles
- Extraction helpers.py depuis app.py (filtres Jinja2, statistiques,
  scan dossiers, status systeme) — app.py passe de 1585 a 482 lignes
- Suppression backward-compat re-exports dans cim10_extractor et
  cpam_response (imports corriges dans les tests)
- README.md : architecture, modules, installation, utilisation
- pyproject.toml : dependencies completes, config ruff, pytest, coverage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
dom
2026-03-07 19:11:27 +01:00
parent 2478928798
commit 1e837c2758
13 changed files with 1694 additions and 1103 deletions

View File

@@ -5,10 +5,58 @@ build-backend = "setuptools.backends._legacy:_Backend"
[project]
name = "t2a"
version = "2.0.0"
requires-python = ">=3.12"
description = "Pipeline de codage CIM-10/CCAM automatise pour le PMSI hospitalier"
readme = "README.md"
requires-python = ">=3.11"
authors = [
{ name = "Equipe T2A" },
]
dependencies = [
"pdfplumber>=0.10.0",
"transformers>=4.35.0,<6.0.0",
"torch>=2.1.0",
"protobuf>=3.20.0,<7.0.0",
"regex>=2023.0",
"pydantic>=2.5.0",
"sentencepiece>=0.1.99,<0.3.0",
"edsnlp[ml]>=0.17.0",
"faiss-cpu>=1.7.0",
"sentence-transformers>=2.2.0",
"requests>=2.28.0",
"flask>=3.0.0",
"flask-httpauth>=4.0.0",
"python-dotenv>=1.0.0",
"openpyxl>=3.0.0",
"pandas>=2.0.0",
"PyMuPDF>=1.24.0",
"python-docx>=1.0.0",
"PyYAML>=6.0",
"gunicorn>=22.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"ruff>=0.4.0",
]
[project.scripts]
t2a = "src.main:main"
[tool.setuptools.packages.find]
include = ["src*"]
[tool.ruff]
target-version = "py311"
line-length = 120
[tool.ruff.lint]
select = ["E", "F", "W", "I"]
ignore = ["E501"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = "--strict-markers -x -q"
markers = ["integration: tests requiring Ollama"]