241 lines
5.1 KiB
TOML
241 lines
5.1 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=68.0", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "pipeline-mco-pmsi-codage"
|
|
version = "0.1.0"
|
|
description = "Pipeline d'automatisation du codage médical PMSI avec architecture RAG"
|
|
readme = "README.md"
|
|
requires-python = ">=3.10"
|
|
license = {text = "MIT"}
|
|
authors = [
|
|
{name = "DIM Team", email = "dim@hospital.fr"}
|
|
]
|
|
keywords = ["pmsi", "medical-coding", "rag", "llm", "healthcare"]
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: Healthcare Industry",
|
|
"Topic :: Scientific/Engineering :: Medical Science Apps.",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
]
|
|
|
|
dependencies = [
|
|
# Core dependencies
|
|
"pydantic>=2.5.0",
|
|
"pydantic-settings>=2.1.0",
|
|
|
|
# Database
|
|
"sqlalchemy>=2.0.0",
|
|
"alembic>=1.13.0",
|
|
"psycopg2-binary>=2.9.9", # PostgreSQL driver
|
|
|
|
# Property-based testing
|
|
"hypothesis>=6.92.0",
|
|
|
|
# LLM and embeddings
|
|
"langchain>=0.1.0",
|
|
"langchain-community>=0.0.10",
|
|
"sentence-transformers>=2.2.0",
|
|
"transformers>=4.36.0",
|
|
"torch>=2.1.0",
|
|
|
|
# Vector store and search
|
|
"faiss-cpu>=1.7.4", # or faiss-gpu for GPU support
|
|
"qdrant-client>=1.7.0",
|
|
|
|
# Text processing and NLP
|
|
"spacy>=3.7.0",
|
|
"nltk>=3.8.1",
|
|
"regex>=2023.12.0",
|
|
"edsnlp>=0.10.0", # EDS-NLP for French clinical text processing
|
|
|
|
# Search and indexing
|
|
"rank-bm25>=0.2.2",
|
|
"whoosh>=2.7.4",
|
|
|
|
# PDF processing
|
|
"pypdf>=3.17.0",
|
|
"pdfplumber>=0.10.0",
|
|
|
|
# Excel processing
|
|
"openpyxl>=3.1.0",
|
|
"xlrd>=2.0.0",
|
|
|
|
# Data validation and serialization
|
|
"python-dateutil>=2.8.2",
|
|
"pytz>=2023.3",
|
|
|
|
# Cryptography for exports
|
|
"cryptography>=41.0.0",
|
|
|
|
# Configuration
|
|
"pyyaml>=6.0.1",
|
|
"python-dotenv>=1.0.0",
|
|
|
|
# Logging and monitoring
|
|
"structlog>=23.2.0",
|
|
"python-json-logger>=2.0.7",
|
|
|
|
# HTTP client for potential API calls
|
|
"httpx>=0.25.0",
|
|
|
|
# API framework
|
|
"fastapi>=0.109.0",
|
|
"uvicorn[standard]>=0.27.0",
|
|
"python-multipart>=0.0.6",
|
|
|
|
# CLI interface
|
|
"click>=8.1.7",
|
|
"rich>=13.7.0", # For beautiful CLI output
|
|
|
|
# Utilities
|
|
"tqdm>=4.66.0",
|
|
"tenacity>=8.2.3", # Retry logic
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
# Testing
|
|
"pytest>=7.4.0",
|
|
"pytest-cov>=4.1.0",
|
|
"pytest-asyncio>=0.21.0",
|
|
"pytest-mock>=3.12.0",
|
|
"pytest-timeout>=2.2.0",
|
|
|
|
# Code quality
|
|
"black>=23.12.0",
|
|
"isort>=5.13.0",
|
|
"flake8>=7.0.0",
|
|
"mypy>=1.8.0",
|
|
"pylint>=3.0.0",
|
|
|
|
# Documentation
|
|
"sphinx>=7.2.0",
|
|
"sphinx-rtd-theme>=2.0.0",
|
|
|
|
# Development tools
|
|
"ipython>=8.18.0",
|
|
"ipdb>=0.13.13",
|
|
]
|
|
|
|
gpu = [
|
|
"faiss-gpu>=1.7.4",
|
|
]
|
|
|
|
[project.scripts]
|
|
pipeline-mco = "pipeline_mco_pmsi.cli:main"
|
|
|
|
[tool.setuptools]
|
|
packages = ["pipeline_mco_pmsi"]
|
|
package-dir = {"" = "src"}
|
|
|
|
[tool.pytest.ini_options]
|
|
minversion = "7.0"
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py", "*_test.py"]
|
|
python_classes = ["Test*"]
|
|
python_functions = ["test_*"]
|
|
addopts = [
|
|
"-v",
|
|
"--strict-markers",
|
|
"--tb=short",
|
|
"--cov=pipeline_mco_pmsi",
|
|
"--cov-report=term-missing",
|
|
"--cov-report=html",
|
|
"--cov-report=xml",
|
|
]
|
|
markers = [
|
|
"unit: Unit tests",
|
|
"integration: Integration tests",
|
|
"property: Property-based tests",
|
|
"slow: Slow tests",
|
|
"gpu: Tests requiring GPU",
|
|
]
|
|
timeout = 300 # 5 minutes default timeout
|
|
|
|
[tool.coverage.run]
|
|
source = ["src"]
|
|
omit = [
|
|
"*/tests/*",
|
|
"*/test_*.py",
|
|
"*/__pycache__/*",
|
|
"*/site-packages/*",
|
|
]
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"def __repr__",
|
|
"raise AssertionError",
|
|
"raise NotImplementedError",
|
|
"if __name__ == .__main__.:",
|
|
"if TYPE_CHECKING:",
|
|
"@abstractmethod",
|
|
]
|
|
|
|
[tool.black]
|
|
line-length = 100
|
|
target-version = ['py310', 'py311', 'py312']
|
|
include = '\.pyi?$'
|
|
extend-exclude = '''
|
|
/(
|
|
# directories
|
|
\.eggs
|
|
| \.git
|
|
| \.hg
|
|
| \.mypy_cache
|
|
| \.tox
|
|
| \.venv
|
|
| build
|
|
| dist
|
|
)/
|
|
'''
|
|
|
|
[tool.isort]
|
|
profile = "black"
|
|
line_length = 100
|
|
multi_line_output = 3
|
|
include_trailing_comma = true
|
|
force_grid_wrap = 0
|
|
use_parentheses = true
|
|
ensure_newline_before_comments = true
|
|
|
|
[tool.mypy]
|
|
python_version = "3.10"
|
|
warn_return_any = true
|
|
warn_unused_configs = true
|
|
disallow_untyped_defs = true
|
|
disallow_incomplete_defs = true
|
|
check_untyped_defs = true
|
|
disallow_untyped_decorators = false
|
|
no_implicit_optional = true
|
|
warn_redundant_casts = true
|
|
warn_unused_ignores = true
|
|
warn_no_return = true
|
|
follow_imports = "normal"
|
|
ignore_missing_imports = true
|
|
strict_equality = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = "tests.*"
|
|
disallow_untyped_defs = false
|
|
|
|
[tool.pylint.messages_control]
|
|
max-line-length = 100
|
|
disable = [
|
|
"C0111", # missing-docstring
|
|
"C0103", # invalid-name
|
|
"R0903", # too-few-public-methods
|
|
"R0913", # too-many-arguments
|
|
]
|
|
|
|
[tool.hypothesis]
|
|
# Configuration for Hypothesis property-based testing
|
|
max_examples = 100
|
|
deadline = 5000 # 5 seconds per test case
|
|
derandomize = false
|
|
print_blob = true
|