Spaces:
Running
Running
File size: 3,179 Bytes
1e732dd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | [build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "mediguard-ai"
version = "2.0.0"
description = "Production medical biomarker analysis — agentic RAG + multi-agent workflow"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.11"
authors = [{ name = "MediGuard AI Team" }]
dependencies = [
# --- Core ---
"fastapi>=0.115.0",
"uvicorn[standard]>=0.30.0",
"pydantic>=2.9.0",
"pydantic-settings>=2.5.0",
# --- LLM / LangChain ---
"langchain>=0.3.0",
"langchain-community>=0.3.0",
"langgraph>=0.2.0",
# --- Vector / Search ---
"opensearch-py>=2.7.0",
"faiss-cpu>=1.8.0",
# --- Embeddings ---
"httpx>=0.27.0",
# --- Database ---
"sqlalchemy>=2.0.0",
"psycopg2-binary>=2.9.0",
"alembic>=1.13.0",
# --- Cache ---
"redis>=5.0.0",
# --- PDF ---
"pypdf>=4.0.0",
# --- Observability ---
"langfuse>=2.0.0",
# --- Utilities ---
"python-dotenv>=1.0.0",
"tenacity>=8.0.0",
]
[project.optional-dependencies]
docling = ["docling>=2.0.0"]
telegram = ["python-telegram-bot>=21.0", "httpx>=0.27.0"]
gradio = ["gradio>=5.0.0", "httpx>=0.27.0"]
airflow = ["apache-airflow>=2.9.0"]
google = ["langchain-google-genai>=2.0.0"]
groq = ["langchain-groq>=0.2.0"]
huggingface = ["sentence-transformers>=3.0.0"]
dev = [
"pytest>=8.0.0",
"pytest-asyncio>=0.23.0",
"pytest-cov>=5.0.0",
"ruff>=0.7.0",
"mypy>=1.12.0",
"pre-commit>=3.8.0",
"httpx>=0.27.0",
]
all = [
"mediguard-ai[docling,telegram,gradio,google,groq,huggingface,dev]",
]
[project.scripts]
mediguard = "src.main:app"
mediguard-telegram = "src.services.telegram.bot:MediGuardTelegramBot"
mediguard-gradio = "src.gradio_app:launch_gradio"
# --------------------------------------------------------------------------
# Ruff
# --------------------------------------------------------------------------
[tool.ruff]
target-version = "py311"
line-length = 120
fix = true
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"RUF", # ruff-specific
]
ignore = [
"E501", # line too long — handled by formatter
"B008", # do not perform function calls in argument defaults (Depends)
"SIM108", # ternary operator
]
[tool.ruff.lint.isort]
known-first-party = ["src"]
# --------------------------------------------------------------------------
# MyPy
# --------------------------------------------------------------------------
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false # gradually enable
ignore_missing_imports = true
# --------------------------------------------------------------------------
# Pytest
# --------------------------------------------------------------------------
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
addopts = "-v --tb=short -q"
filterwarnings = ["ignore::DeprecationWarning"]
|