-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
124 lines (113 loc) · 3.29 KB
/
pyproject.toml
File metadata and controls
124 lines (113 loc) · 3.29 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
[project]
name = "gecko-ai"
version = "0.3.1"
description = "Next-gen modular AI Agent framework — Less is More, Plugin First"
authors = [{ name = "Your Name", email = "zxm0813@gmail.com" }]
readme = "README.md"
requires-python = ">=3.12,<3.13"
license = { text = "Apache-2.0" }
keywords = ["ai-agent", "llm", "rag", "multi-agent", "workflow", "async"]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Application Frameworks",
]
# 核心依赖(移出 project,Rye 推荐写法)
dependencies = [
"pydantic>=2.9,<3.0",
"anyio>=4.11.0",
"typing-extensions>=4.12",
"pluggy>=1.5",
"networkx>=3.3,<4.0",
# 存储相关(生产默认包含,轻量)
"duckduckgo-search>=8.1.1",
"lancedb>=0.25.3",
"sqlmodel>=0.0.27",
"pyarrow>=22.0.0",
"jinja2>=3.1.6",
"tiktoken>=0.12.0",
"structlog>=25.5.0",
"pydantic-settings>=2.12.0",
"nest-asyncio>=1.6.0",
"opentelemetry-api>=1.38.0",
"opentelemetry-sdk>=1.39.0",
"opentelemetry-distro[otlp]>=0.59b0",
]
[project.optional-dependencies]
llm = ["litellm>=1.80.0"]
storage = [
"chromadb>=1.3.5",
"pymilvus>=2.6.3",
"qdrant-client>=1.16.0",
"asyncpg>=0.30.0",
"redis>=7.0.1",
]
otel = ["opentelemetry-api>=1.27.0"]
full = ["gecko-ai[llm,storage,otel]"]
dev = [
"pytest>=8.3",
"pytest-asyncio>=0.24",
"pytest-mock>=3.14",
"ruff>=0.6",
"mypy>=1.11",
"httpx>=0.27",
"hypothesis>=6.100",
]
[project.urls]
Homepage = "https://github.com/xuemzhan/gecko"
Repository = "https://github.com/xuemzhan/gecko"
Documentation = "https://gecko.ai"
Issues = "https://github.com/xuemzhan/gecko/issues"
[project.entry-points."gecko.models"]
[project.entry-points."gecko.tools"]
[project.entry-points."gecko.storage"]
# 构建系统(保持 hatchling)
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
# 关键修复:显式告诉 Hatchling 源码目录
[tool.hatch.build.targets.wheel]
packages = ["gecko"]
# Rye 专属配置(只出现一次!)
[tool.rye]
dev-dependencies = [
"gecko-ai[dev]",
"pytest-mock>=3.15.1",
"pytest-cov>=7.0.0",
"pytest-asyncio>=1.3.0",
"pytest>=9.0.1",
]
[tool.rye.scripts]
# 测试相关(核心修复)
test = "pytest" # rye run test → 运行所有测试
test-cov = "pytest --cov=gecko --cov-report=term-missing" # 带覆盖率
test-async = "pytest -m 'not slow'" # 只跑快速异步测试
lint = "ruff check ." # 代码质量
format = "ruff format ."
typecheck = "mypy gecko"
publish = "scripts.publish:main" # 发布(保留原有)
ci = { chain = ["lint", "typecheck", "test-cov"] } # 一键全量检查(CI 推荐)
# 测试配置
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
addopts = "-ra -q --strict-markers"
markers = [
"slow: marks tests as slow",
"integration: integration tests",
"e2e: end-to-end tests",
]
filterwarnings = [
"error",
"ignore::DeprecationWarning",
]
# 代码质量工具
[tool.ruff]
target-version = "py312"
line-length = 100
[tool.mypy]
python_version = "3.12"
strict = true