forked from zhongyu09/openchatbi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
299 lines (281 loc) · 6.72 KB
/
Copy pathpyproject.toml
File metadata and controls
299 lines (281 loc) · 6.72 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
[project]
name = "openchatbi"
version = "1.0.0b1"
description = "OpenChatBI - Natural language business intelligence powered by LLMs for intuitive data analysis and SQL generation"
authors = [
{ name = "Yu Zhong", email = "zhongyu8@gmail.com" },
]
license = { text = "MIT" }
readme = "README.md"
keywords = [
"business intelligence",
"bi",
"analytics",
"llm",
"gpt",
"ai",
"machine learning",
"nlp",
"text2sql",
"agent",
"query data",
"talk to data",
"analyze data",
"data agent",
"database",
"langchain",
"langgraph",
"natural language",
"conversational ai",
"timeseries",
"forecasting",
"prediction"
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: End Users/Desktop",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Database",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Office/Business",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
"License :: OSI Approved :: MIT License",
]
requires-python = ">=3.11,<4.0"
dependencies = [
"requests>=2.31.0,<3.0.0",
"langgraph>=1.2.2",
"langchain>=1.3.2",
"langchain-openai>=1.1.0",
"langchain-anthropic>=1.4.4",
"langchain-community>=0.3.27,<1.0.0",
"langgraph-checkpoint-sqlite>=2.0.11",
"langchain-chroma>=0.2.5",
"langchain-mcp-adapters>=0.1.9,<0.2.0",
"deepagents>=0.6.7",
"langmem>=0.0.29",
"sqlalchemy>=2.0.41,<3.0.0",
"sqlalchemy-trino>=0.5.0",
"aiosqlite>=0.21.0",
"pyhive[presto]>=0.7.0",
"rank-bm25>=0.2.2,<1.0.0",
"python-levenshtein>=0.27.1",
"gradio>=5.43.1,<6.0.0",
"streamlit>=1.49.1,<2.0.0",
"RestrictedPython>=8.0,<9.0",
"docker>=7.0.0,<8.0.0",
"pandas>=2.2.0,<3.0.0",
"numpy>=2.3.0,<3.0.0",
"matplotlib>=3.10.6,<4.0.0",
"seaborn>=0.13.0,<1.0.0",
"plotly>=5.17.0,<6.0.0",
"json5>=0.10.0,<1.0.0",
"jieba>=0.42.1", # Note: jieba is not compatible with Python 3.12+
]
[project.urls]
Homepage = "https://github.com/zhongyu09/openchatbi"
Repository = "https://github.com/zhongyu09/openchatbi"
Documentation = "https://github.com/zhongyu09/openchatbi/tree/main"
"Bug Tracker" = "https://github.com/zhongyu09/openchatbi/issues"
[project.optional-dependencies]
mysql = [
"pymysql>=1.1.0,<2.0.0",
]
postgresql = [
"psycopg>=3.1.0,<4.0.0",
]
docs = [
"sphinx>=8.2.3,<9.0.0",
"sphinx-rtd-theme>=3.0.0,<4.0.0",
"sphinx-autodoc-typehints>=2.5.0,<3.0.0",
"myst_parser",
"autodoc-pydantic",
]
test = [
"pytest>=7.4.0,<9.0.0",
"pytest-mock>=3.14.0,<4.0.0",
"pytest-asyncio>=0.23.8,<1.0.0",
"pytest-sugar>=1.0.0,<2.0.0",
"pytest-cov>=6.0.0,<7.0.0",
"aioresponses>=0.7.7,<1.0.0",
"responses>=0.25.3,<1.0.0",
"langsmith[pytest]>=0.4.8,<1.0.0",
"openevals>=0.1.0,<1.0.0",
]
eval = [
"runledger>=0.1.1,<0.2.0",
"pyyaml>=6.0,<7.0",
]
observability = [
"langfuse>=3,<4",
"langsmith>=0.4.8,<1.0.0",
"prometheus-client>=0.20.0,<1.0.0",
"tiktoken>=0.7.0,<1.0.0",
"python-dotenv>=1.0.0,<2.0.0",
]
dev = [
"openchatbi[test,docs]",
"black>=24.10.0,<25.0.0",
"mypy>=1.13.0,<2.0.0",
"ruff>=0.8.0,<1.0.0",
"pre-commit>=4.0.1,<5.0.0",
"bandit>=1.8.6,<2.0.0",
"types-setuptools>=75.6.0.20241126",
"twine>=6.0.0,<7.0.0",
]
azure-openai = [
"langchain-openai>=1.1.0",
]
google-vertex-ai = [
"langchain-google-vertexai>=3.2.4",
]
bedrock = [
"langchain-aws>=1.6.1",
]
huggingface = [
"langchain-huggingface>=1.2.2",
]
deepseek = [
"langchain-deepseek>=1.1.0",
]
ollama = [
"langchain-ollama>=1.1.0",
]
[tool.uv]
managed = true
dev-dependencies = [
"openchatbi[dev]",
"types-pyyaml>=6.0.12.20260518",
"types-requests>=2.33.0.20260518",
]
[build-system]
requires = ["hatchling>=1.26.0"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["openchatbi"]
[tool.hatch.build.targets.sdist]
include = [
"/openchatbi",
"/tests",
"/README.md",
"/LICENSE",
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.black]
line-length = 120
target-version = ["py311"]
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
skip-string-normalization = false
skip-magic-trailing-comma = false
preview = false
[tool.ruff]
line-length = 120
target-version = "py311"
exclude = [
".git",
".mypy_cache",
".tox",
".venv",
"_build",
"buck-out",
"build",
"dist",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/**/*" = ["B011"]
[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
ignore_missing_imports = true
show_error_codes = true
disable_error_code = ["no-untyped-def", "no-untyped-call", "type-arg"]
[tool.pytest.ini_options]
minversion = "7.0"
addopts = [
"--strict-markers",
"--strict-config",
"--cov=openchatbi",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
]
testpaths = ["tests"]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Slow tests that may take several seconds",
"requires_db: Tests that require database connection",
"requires_llm: Tests that require LLM service",
"asyncio: Asynchronous tests"
]
filterwarnings = [
"error",
"ignore::UserWarning",
"ignore::DeprecationWarning",
"ignore::langchain_core._api.deprecation.LangChainPendingDeprecationWarning",
]
[tool.coverage.run]
source = ["openchatbi"]
omit = [
"*/tests/*",
"*/test_*.py",
"setup.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]