-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
135 lines (122 loc) · 2.61 KB
/
pyproject.toml
File metadata and controls
135 lines (122 loc) · 2.61 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
[project]
name = "Box-Note-RAG"
version = "0.1.0"
description = "Box Note RAG"
authors = [{ name = "Heisenberg", email = "charliealex0101@gmail.com" }]
requires-python = ">=3.12"
dependencies = [
# --- 核心框架 ---
"langchain",
"langchain-core",
"langchain-community",
"langchain-ollama",
"langchain-experimental",
"langgraph",
"urllib3<2.0", # 避免 SSL 錯誤
# --- 向量資料庫與 RAG ---
"chromadb", # 輕量級向量資料庫
"langchain-chroma", # LangChain 與 Chroma 的銜接
"pypdf", # 處理 PDF
"markdown",
"unstructured", # 處理 Markdown, Docx 等多種格式
"tiktoken", # 計算 Token 數量
"rank-bm25>=0.2.2",
# --- 數據處理與工具 ---
"numpy",
"pandas",
"python-dotenv", # 管理 API Keys
"pydantic", # 數據模型驗證
"pydantic-settings", # 環境變數管理
"tavily-python", # AI 搜尋工具 (Fallback 用)
# --- 生產化與觀測 ---
"mlflow>=3.9.0",
"loguru",
"rich",
]
[project.optional-dependencies]
dev = [
"ipykernel",
"ruff>=0.12.7",
# --- 測試 ---
"pytest>=8.0",
"pytest-html>=4.0",
"pytest-sugar>=1.0",
"pytest-cov>=6.0",
"pytest-mock>=3.14",
"pytest-xdist>=3.5",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["app"] # src layout
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = [
"-v",
"--tb=short",
"--strict-markers",
"--html=docs/reports/test_report.html",
"--self-contained-html",
"--cov=app",
"--cov-report=term-missing",
"--cov-report=html:docs/reports/coverage_html"
]
markers = [
"unit: 單元測試 (不需外部服務)",
"integration: 整合測試 (需要 Ollama/Chroma)"
]
[tool.coverage.run]
source = ["app"]
omit = ["tests/*"]
[tool.ruff]
line-length = 120
indent-width = 4
target-version = "py312"
[tool.ruff.lint]
select = [
"E",
"W",
"F",
"I",
"B",
"C4",
"UP",
"PL",
"NPY",
"PD",
"TID",
"T",
]
preview = true
ignore = [
"E226",
"E227",
"E252",
"E402",
"B006",
"B008",
"B905",
"C901",
"W191",
"UP045",
"PLR0913",
"PLR0917",
"PLR0912",
"PLR0914",
"PLR0915",
"PLR2004",
"PLR6104",
"PD015",
"D100",
"D400",
"D409",
]
unfixable = [
"D",
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.uv.sources]
heisenberg-utils = { git = "https://github.com/CharlieAlex/heisenberg-utils.git", rev = "v0.1.9" }