Initial commit
This commit is contained in:
+100
@@ -0,0 +1,100 @@
|
||||
[project]
|
||||
name = "a-share-research"
|
||||
version = "0.1.0"
|
||||
description = "A 股 Deep Research 私有投研平台"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.11,<3.12"
|
||||
authors = [
|
||||
{ name = "summer" }
|
||||
]
|
||||
license = { text = "Proprietary" }
|
||||
|
||||
# 注意:依赖按 Milestone 分阶段加入,避免一次性引入。
|
||||
# 当前已启用:M1 抓取层
|
||||
dependencies = [
|
||||
"pydantic>=2.7",
|
||||
"pyyaml>=6.0",
|
||||
"python-dotenv>=1.0",
|
||||
"loguru>=0.7",
|
||||
# ---- M1 抓取层 ----
|
||||
"crawl4ai>=0.6,<0.8",
|
||||
"tenacity>=9.0",
|
||||
"beautifulsoup4>=4.12",
|
||||
# ---- M2 正文提取 ----
|
||||
"gne>=0.3",
|
||||
"python-dateutil>=2.9",
|
||||
"lxml>=5.0",
|
||||
# ---- M4 LLM 投资事件抽取 ----
|
||||
"openai>=1.40",
|
||||
"httpx>=0.27",
|
||||
# ---- M5 Embedding(远程后端必装,本地后端走 optional)----
|
||||
"numpy>=1.26",
|
||||
# ---- M6 Qdrant 向量库 ----
|
||||
"qdrant-client>=1.10",
|
||||
# ---- M7 定时任务 ----
|
||||
"apscheduler>=3.10",
|
||||
# ---- M8 MCP 服务 ----
|
||||
"mcp>=1.0",
|
||||
"pypdf>=6.13.3",
|
||||
"markitdown[all]>=0.1.5",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
# 本地 BGE-M3 后端:首次下载约 2.3 GB,按需安装
|
||||
# uv sync --extra local-embedding
|
||||
local-embedding = [
|
||||
"sentence-transformers>=3.0",
|
||||
"torch>=2.2",
|
||||
]
|
||||
# 占位,后续 Milestone 按需启用
|
||||
# mcp = ["mcp>=1.0"]
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"pytest>=8.0",
|
||||
"pytest-asyncio>=0.23",
|
||||
"pytest-cov>=5.0",
|
||||
"ruff>=0.5",
|
||||
"mypy>=1.10",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = [
|
||||
"crawler",
|
||||
"extractor",
|
||||
"dedup",
|
||||
"llm",
|
||||
"embedding",
|
||||
"vectorstore",
|
||||
"scheduler",
|
||||
"mcp_server",
|
||||
"api",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
a-share = "a_share_cli.main:main"
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
target-version = "py311"
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["E", "F", "W", "I", "N", "UP", "B", "C4", "SIM"]
|
||||
ignore = ["E501"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
asyncio_mode = "auto"
|
||||
addopts = "-ra -q"
|
||||
markers = [
|
||||
"integration: 需要真实网络/浏览器的集成测试,默认跳过",
|
||||
]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.11"
|
||||
strict = false
|
||||
ignore_missing_imports = true
|
||||
Reference in New Issue
Block a user