[project] name = "deepcritical" version = "0.1.0" description = "AI-Native Drug Repurposing Research Agent" readme = "README.md" requires-python = ">=3.11" dependencies = [ # Core "pydantic>=2.7", "pydantic-settings>=2.2", # For BaseSettings (config) "pydantic-ai>=0.0.16", # Agent framework # AI Providers "openai>=1.0.0", "anthropic>=0.18.0", # HTTP & Parsing "httpx>=0.27", # Async HTTP client (PubMed) "beautifulsoup4>=4.12", # HTML parsing "xmltodict>=0.13", # PubMed XML -> dict # UI "gradio>=5.0", # Chat interface # Utils "python-dotenv>=1.0", # .env loading "tenacity>=8.2", # Retry logic "structlog>=24.1", # Structured logging "requests>=2.32.5", # ClinicalTrials.gov (httpx blocked by WAF) ] [project.optional-dependencies] dev = [ # Testing "pytest>=8.0", "pytest-asyncio>=0.23", "pytest-sugar>=1.0", "pytest-cov>=5.0", "pytest-mock>=3.12", "respx>=0.21", # Mock httpx requests # Quality "ruff>=0.4.0", "mypy>=1.10", "pre-commit>=3.7", ] magentic = [ "agent-framework-core", ] embeddings = [ "chromadb>=0.4.0", "sentence-transformers>=2.2.0", ] modal = [ # Mario's Modal code execution + LlamaIndex RAG "modal>=0.63.0", "llama-index>=0.11.0", "llama-index-llms-openai", "llama-index-embeddings-openai", "llama-index-vector-stores-chroma", "chromadb>=0.4.0", ] [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = ["src"] # ============== RUFF CONFIG ============== [tool.ruff] line-length = 100 target-version = "py311" src = ["src", "tests"] [tool.ruff.lint] select = [ "E", # pycodestyle errors "F", # pyflakes "B", # flake8-bugbear "I", # isort "N", # pep8-naming "UP", # pyupgrade "PL", # pylint "RUF", # ruff-specific ] ignore = [ "PLR0913", # Too many arguments (agents need many params) "PLR0912", # Too many branches (complex orchestrator logic) "PLR0911", # Too many return statements (complex agent logic) "PLR2004", # Magic values (statistical constants like p-values) "PLW0603", # Global statement (singleton pattern for Modal) "PLC0415", # Lazy imports for optional dependencies "E402", # Module level import not at top (needed for pytest.importorskip) "RUF100", # Unused noqa (version differences between local/CI) ] [tool.ruff.lint.isort] known-first-party = ["src"] # ============== MYPY CONFIG ============== [tool.mypy] python_version = "3.11" strict = true ignore_missing_imports = true disallow_untyped_defs = true warn_return_any = true warn_unused_ignores = false # ============== PYTEST CONFIG ============== [tool.pytest.ini_options] testpaths = ["tests"] asyncio_mode = "auto" addopts = [ "-v", "--tb=short", "--strict-markers", ] markers = [ "unit: Unit tests (mocked)", "integration: Integration tests (real APIs)", "slow: Slow tests", ] # ============== COVERAGE CONFIG ============== [tool.coverage.run] source = ["src"] omit = ["*/__init__.py"] [tool.coverage.report] exclude_lines = [ "pragma: no cover", "if TYPE_CHECKING:", "raise NotImplementedError", ] # Note: agent-framework-core is optional and installed locally for magentic mode # CI skips tests that require it via pytest.importorskip