# requirements.txt — 论文-研报工作流
# Generated: 2026-06-08
# Install: pip install -r requirements.txt
# Or use: pip install -e . (recommended)
#
# For extras groups:
#   pip install -e ".[dev]"       # Dev dependencies
#   pip install -e ".[econometrics]" # Econometrics extras
#   pip install -e ".[rag]"       # RAG extras
#   pip install -e ".[all]"        # All extras

# ── Data Processing ────────────────────────────────────────────────────────────
pandas>=2.0.0,<3.0
numpy>=1.26.0,<3.0
scikit-learn>=1.4.0,<2.0
scipy>=1.13.0,<2.0
statsmodels>=0.14.0,<1.0
networkx>=3.2.0,<4.0

# ── Visualization ─────────────────────────────────────────────────────────────
matplotlib>=3.8.0,<4.0
seaborn>=0.13.0,<1.0
plotly>=5.21.0,<7.0

# ── Document Processing ───────────────────────────────────────────────────────
pdfplumber>=0.11.0
python-docx>=1.1.0
python-pptx>=1.0.2
Pillow>=10.3.0

# ── Text & Format ─────────────────────────────────────────────────────────────
markdown>=3.4.0
requests>=2.31.0
beautifulsoup4>=4.12.0
lxml>=6.1.1

# ── Finance Data ─────────────────────────────────────────────────────────────
akshare>=1.18.63
yfinance>=0.2.0
fastmcp>=0.1.0
mcp>=1.0.0

# ── LLM / AI ─────────────────────────────────────────────────────────────────
openai>=1.0.0
anthropic>=0.30.0
httpx>=0.27.0
tiktoken>=0.7.0

# ── Econometrics ──────────────────────────────────────────────────────────────
linearmodels>=4.17,<8.0

# ── Environment / Config ─────────────────────────────────────────────────────
python-dotenv>=1.0.0
pyyaml>=6.0.0
pydantic>=2.0.0

# ── Database ──────────────────────────────────────────────────────────────────
duckdb>=0.9.0,<2.0

# ── Web Services ─────────────────────────────────────────────────────────────
fastapi>=0.115.0
uvicorn[standard]>=0.30.0
streamlit>=1.32.0
pypandoc>=1.17

# ── Excel ─────────────────────────────────────────────────────────────────────
openpyxl>=3.1.0

# ── Dev Dependencies ─────────────────────────────────────────────────────────
pytest>=7.4.0
pytest-asyncio>=0.23.0
pytest-cov>=4.1.0
ruff>=0.1.0
jupyter>=1.0.0
ipykernel>=6.28.0

# ── RAG Extras ────────────────────────────────────────────────────────────────
chromadb>=0.4.22
faiss-cpu>=1.7.4
sentence-transformers>=2.3.0
jieba>=0.42.0

# ── Deep Learning Extras ─────────────────────────────────────────────────────
# Optional: only needed for scripts/research_directions/deep_learning*.py
# torch>=2.12.0
# accelerate>=1.14.0

# ── Econometrics Extras ──────────────────────────────────────────────────────
pandas-datareader>=0.10.0
pandasql>=0.7.3
# NOTE: diff-in-diff2 is referenced in scripts/research_framework/modern_did.py
# but does NOT exist on PyPI as of 2026-07-04. The code gracefully raises
# EstimatorUnavailableError at runtime if the import fails, so we comment
# this out. The corresponding pyproject.toml entry has also been removed
# to keep the two files in sync (P0-5 audit fix).
#diff-in-diff2>=1.0.0

# ── Knowledge Graph Extras ────────────────────────────────────────────────────
neo4j>=6.2.0
pyvis>=0.3.0

# ── Sandbox Extras ────────────────────────────────────────────────────────────
e2b-code-interpreter>=2.0.0

# ── Browser Extras ────────────────────────────────────────────────────────────
playwright>=1.40.0

# ── Monitor Extras ────────────────────────────────────────────────────────────
apscheduler>=3.10.0
pip-audit
