-
Notifications
You must be signed in to change notification settings - Fork 7k
Expand file tree
/
Copy pathpyproject.toml
More file actions
110 lines (97 loc) · 2.29 KB
/
pyproject.toml
File metadata and controls
110 lines (97 loc) · 2.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
[project]
name = "dative"
version = "0.1.0"
description = "Query data from database by natural language"
requires-python = "~=3.11.0"
dependencies = [
"aiobotocore>=2.24.2",
"aiosqlite>=0.21.0",
"asyncpg>=0.30.0",
"cryptography>=45.0.6",
"duckdb>=1.3.2",
"fastapi<1.0",
"fastexcel>=0.15.1",
"greenlet>=3.2.4",
"httpx[socks]>=0.28.1",
"json-repair>=0.50.1",
"langchain-core<1.0",
"langchain-openai<1.0",
"mysql-connector-python>=9.4.0",
"orjson>=3.11.2",
"pyarrow>=21.0.0",
"pydantic-settings>=2.10.1",
"python-dateutil>=2.9.0.post0",
"python-dotenv>=1.1.1",
"pytz>=2025.2",
"sqlglot[rs]==27.12.0",
"uvicorn[standard]<1.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.sdist]
only-include = ["src/"]
[tool.hatch.build.targets.wheel]
packages = ["src/"]
[tool.uv]
index-url = "https://pypi.tuna.tsinghua.edu.cn/simple"
extra-index-url = ["https://mirrors.aliyun.com/pypi/simple"]
[dependency-groups]
dev = [
"hatch>=1.14.1",
"ruff>=0.12.10",
"pytest-async>=0.1.1",
"pytest-asyncio>=0.26.0",
"pytest-cov>=6.3.0",
"pytest-mock>=3.14.0",
"pytest>=8.3.3",
"pytest-benchmark>=4.0.0",
"fastapi-cli>=0.0.8",
"mypy>=1.17.1",
"types-python-dateutil>=2.9.0.20250822",
"pyarrow-stubs>=20.0.0.20250825",
"asyncpg-stubs>=0.30.2",
"boto3-stubs>=1.40.25",
"types-aiobotocore[essential]>=2.24.2",
]
[tool.uv.sources]
# checklist
[tool.ruff]
line-length = 120
target-version = "py311"
preview = true
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # Pyflakes
"W", # Warning
"N", # PEP8 Naming
"I", # isort
"FAST", # FastAPI
]
# 禁用的规则
ignore = []
[tool.sqruff]
output_line_length = 120
max_line_length = 120
# 类型
[tool.mypy]
mypy_path = "./src"
exclude = ["tests/"]
# 单元测试
[tool.pytest.ini_options]
addopts = ["-rA", "--cov=dative"]
testpaths = ["tests/unit"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
python_files = ["*.py"]
# 代码覆盖率
[tool.coverage.run]
branch = true
parallel = true
omit = ["**/__init__.py"]
[tool.coverage.report]
# fail_under = 85
show_missing = true
sort = "cover"
exclude_lines = ["no cov", "if __name__ == .__main__.:"]