-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
158 lines (144 loc) · 3.22 KB
/
pyproject.toml
File metadata and controls
158 lines (144 loc) · 3.22 KB
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
[project]
name = "agent-framework"
version = "1.0.0"
description = "基于 LangGraph 的多智能体框架,支持声明式配置、工作空间管理、三层验证机制和智能演化能力"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
authors = [{ name = "YSWX", email = "" }]
dependencies = [
# ===== 核心框架 =====
"pydantic>=2.0.0",
"pydantic-settings>=2.0.0",
"pyyaml>=6.0",
# ===== LangGraph / LangChain =====
"langgraph>=0.2.0",
"langchain-core>=0.3.0",
"langchain-openai>=0.3.0",
# ===== 异步支持 =====
"asyncio-throttle>=1.0.2",
"aiofiles>=23.2.1",
"aiohttp>=3.9.0",
# ===== HTTP 客户端 =====
"httpx>=0.25.0",
"requests>=2.31.0",
# ===== 数据库 =====
"sqlalchemy[asyncio]>=2.0.0",
"asyncpg>=0.29.0",
"alembic>=1.13.0",
# ===== 缓存 =====
"redis>=5.0.0",
# ===== 日志和监控 =====
"loguru>=0.7.0",
"structlog>=23.0.0",
# ===== 数据验证 =====
"jsonschema>=4.20.0",
# ===== Token 计数 =====
"tiktoken>=0.5.0",
# ===== 中文分词 =====
"jieba>=0.42.1",
# ===== LLM 客户端 =====
"openai>=1.0.0",
"anthropic>=0.18.0",
]
[project.optional-dependencies]
# 开发依赖
dev = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.1.0",
"pytest-mock>=3.12.0",
"black>=23.0.0",
"ruff>=0.1.9",
"isort>=5.12.0",
"mypy>=1.0.0",
]
# 测试依赖
test = [
"pytest>=7.4.0",
"pytest-asyncio>=0.23.0",
"pytest-cov>=4.1.0",
"pytest-mock>=3.12.0",
"pytest-timeout>=2.2.0",
"faker>=20.0.0",
]
# 云存储支持
oss = [
"oss2>=2.18.0",
"minio>=7.2.0",
]
# Web UI 依赖
web = [
"fastapi>=0.109.0",
"uvicorn>=0.27.0",
"websockets>=12.0",
"wsproto>=1.2.0",
"httptools>=0.6.0",
"watchfiles>=0.21.0",
"python-dotenv>=1.0.0",
"python-multipart>=0.0.6",
"python-socketio>=5.16.0",
"apscheduler>=3.10.0",
"PyJWT>=2.8.0",
"bcrypt>=4.0.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src"]
# uv 配置
[tool.uv]
index-url = "https://pypi.tuna.tsinghua.edu.cn/simple/"
[[tool.uv.index]]
url = "https://pypi.tuna.tsinghua.edu.cn/simple"
default = true
# pytest 配置
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
asyncio_mode = "auto"
addopts = [
"--strict-markers",
"-v",
"--tb=short",
]
markers = [
"slow: marks tests as slow",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
# Black 配置
[tool.black]
line-length = 88
target-version = ['py311']
include = '\.pyi?$'
extend-exclude = '''
/(
\.eggs
| \.git
| \.venv
| build
| dist
)/
'''
# Ruff 配置
[tool.ruff]
line-length = 88
target-version = "py311"
select = ["E", "F", "W", "I", "N", "UP", "B"]
ignore = ["E501"]
[tool.ruff.isort]
known-first-party = ["src"]
# MyPy 配置
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true