-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
145 lines (130 loc) · 3.32 KB
/
Copy pathpyproject.toml
File metadata and controls
145 lines (130 loc) · 3.32 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "novel-cli"
version = "1.1.0"
description = "A CLI agent based on packages."
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"agent-client-protocol==0.8.0",
"aiofiles>=24.0,<26.0",
"aiohttp==3.13.3",
"typer==0.21.1",
"kosong[contrib]==0.53.0",
"novel_eval[contrib]==0.1.0",
# novel-eval 依赖
"pyyaml>=6.0",
"httpx>=0.27",
"jinja2>=3.1",
"tqdm>=4.66",
# loguru stays >=0.6.0 because notify-py (via batrachian-toad) caps it at <=0.6.0 on 3.14+.
"loguru>=0.6.0,<0.8",
"prompt-toolkit==3.0.52",
"pillow==12.1.0",
"pyyaml==6.0.3",
"rich==14.2.0",
"ripgrepy==2.2.0",
"streamingjson==0.0.5",
"trafilatura==2.0.0",
# lxml is used by trafilatura/htmldate/justext; keep pinned for binary wheels.
"lxml==6.0.2",
"tenacity==9.1.2",
"fastmcp==2.12.5",
"pydantic==2.12.5",
"httpx[socks]==0.28.1",
"pykaos==0.9.0",
"batrachian-toad==0.5.23; python_version >= \"3.14\"",
"tomlkit==0.14.0",
"jinja2==3.1.6",
"pyobjc-framework-cocoa>=12.1 ; sys_platform == 'darwin'",
"fastapi>=0.115.0",
"uvicorn[standard]>=0.32.0",
"scalar-fastapi>=1.5.0",
"websockets>=14.0",
"keyring>=25.7.0",
"setproctitle>=1.3.0",
"pymilvus>=2.6.12",
"neo4j>=5.0.0",
"asyncpg>=0.29.0",
"pypinyin>=0.55.0",
]
# 开发依赖(uv pip install --group dev)
[dependency-groups]
dev = [
"pyinstaller==6.18.0",
"inline-snapshot[black]>=0.31.1",
"pyright>=1.1.407",
"ty>=0.0.9",
"pytest>=9.0.2",
"pytest-asyncio>=1.3.0",
"ruff>=0.14.10",
]
# 定义"哪些目录是子项目"
[tool.uv.workspace]
members = [
"packages/kosong",
"packages/kaos",
"packages/novel_eval",
]
# 告诉 uv "这个依赖名 → 用 workspace 里的本地源码"
[tool.uv.sources]
kosong = { workspace = true }
pykaos = { workspace = true }
novel-eval = { workspace = true }
novel-cli = { workspace = true }
# CLI 入口点
[project.scripts]
novel-cli = "novel_cli.__main__:main"
# Ruff 格式化配置
[tool.ruff]
line-length = 100
# Ruff 代码检查规则集
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # Pyflakes
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"I", # isort
]
# 按文件路径豁免特定规则
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["E501"]
"tests_e2e/**/*.py" = ["E501"]
"src/novel_cli/web/api/**/*.py" = ["B008"] # FastAPI Depends() is standard usage
# Pyright 静态类型检查配置
[tool.pyright]
typeCheckingMode = "standard"
pythonVersion = "3.14"
include = [
"src/**/*.py",
"tests/**/*.py",
"tests_ai/scripts/**/*.py",
"tests_e2e/**/*.py",
]
strict = ["src/novel_cli/**/*.py"]
# Ty 类型检查器配置(Astral 出品,与 Ruff 同生态)
[tool.ty.environment]
python-version = "3.14"
[tool.ty.src]
include = [
"src/**/*.py",
"tests/**/*.py",
"tests_ai/scripts/**/*.py",
"tests_e2e/**/*.py",
]
# Typos 拼写检查器配置
[tool.typos.files]
extend-exclude = ["pyinstaller.py"]
# 允许的"拼写错误"白名单(这些词不是 typo)
[tool.typos.default.extend-words]
datas = "datas"
Seeked = "Seeked"
seeked = "seeked"
iterm = "iterm"
# Pytest 配置
[tool.pytest.ini_options]
asyncio_mode = "auto"