-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
111 lines (100 loc) · 3.05 KB
/
Copy pathpyproject.toml
File metadata and controls
111 lines (100 loc) · 3.05 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
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
# 注意:本项目目前不作为 Python 包发布(仅供学习)。
# 此 pyproject.toml 主要用于统一 lint / format / type-check 配置。
# 若未来要打包,请补充 [project] 段并把 examples/ 包成 langchain_study。
[project]
name = "agent-study"
version = "0.5.0"
description = "LangChain 学习项目:从 0 到 1 掌握 Model I/O、Chain、Memory、Retrieval、Agent、LangServe"
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE" }
authors = [
{ name = "Dajucoder", url = "https://github.com/Dajucoder" },
]
keywords = ["langchain", "llm", "rag", "agent", "langserve", "learning"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Education",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.urls]
Homepage = "https://github.com/Dajucoder/Agent_study"
Issues = "https://github.com/Dajucoder/Agent_study/issues"
Changelog = "https://github.com/Dajucoder/Agent_study/blob/main/CHANGELOG.md"
Security = "https://github.com/Dajucoder/Agent_study/security/policy"
# ---- 工具配置 ----
[tool.ruff]
line-length = 100
target-version = "py310"
extend-exclude = [
".venv",
"data",
"notebooks",
"build",
"dist",
]
[tool.ruff.lint]
# 选用的规则集(精简起步)
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade
"SIM", # flake8-simplify
"RUF", # ruff-specific
]
ignore = [
"E501", # 行长度由 line-length 控制
"B008", # 函数调用中带默认值的参数(如 Path 路径)
"SIM108", # 有时三元比 if/else 更清晰
"RUF012", # 可变类属性,class 内可变默认
]
[tool.ruff.lint.per-file-ignores]
# 演示脚本中允许 print、未使用变量等
"examples/*.py" = ["T201", "F401"]
"notebooks/*.ipynb" = ["ALL"]
"tests/*.py" = ["B011"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["tests"]
addopts = [
"-ra",
"--strict-markers",
"--strict-config",
]
filterwarnings = [
"ignore::DeprecationWarning:langchain_community.*",
"ignore::DeprecationWarning:langchain_core.*",
]
[tool.coverage.run]
branch = true
# 仅测量可离线单测的共享库 _common;演示脚本(01~09)依赖真实 LLM,不计入覆盖。
source = ["examples/_common"]
omit = [
"tests/*",
]
[tool.coverage.report]
fail_under = 85
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]