Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
222 lines (196 loc) 路 6.98 KB
/
Copy pathpyproject.toml
File metadata and controls
222 lines (196 loc) 路 6.98 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
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "vanna"
version = "2.0.1"
authors = [
{ name="Zain Hoda", email="zain@vanna.ai" },
]
description = "Generate SQL queries from natural language"
readme = "README.md"
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"pydantic>=2.0.0",
"click>=8.0.0",
"pandas",
"httpx>=0.28.0",
"PyYAML",
"plotly",
"tabulate",
"sqlparse",
"sqlalchemy",
"requests",
]
[project.scripts]
vanna = "vanna.servers.cli.server_runner:main"
[project.urls]
"Homepage" = "https://github.com/vanna-ai/vanna"
"Bug Tracker" = "https://github.com/vanna-ai/vanna/issues"
[project.optional-dependencies]
flask = ["flask>=2.0.0", "flask-cors>=4.0.0"]
fastapi = ["fastapi>=0.68.0", "uvicorn>=0.15.0"]
servers = ["vanna[flask,fastapi]"]
postgres = ["psycopg2-binary", "db-dtypes"]
mysql = ["PyMySQL"]
clickhouse = ["clickhouse_connect"]
bigquery = ["google-cloud-bigquery"]
snowflake = ["snowflake-connector-python"]
duckdb = ["duckdb"]
google = ["google-generativeai", "google-cloud-aiplatform"]
all = ["psycopg2-binary", "db-dtypes", "PyMySQL", "google-cloud-bigquery", "snowflake-connector-python", "duckdb", "openai", "qianfan", "mistralai>=1.0.0", "chromadb>=1.1.0", "anthropic", "zhipuai", "marqo", "google-generativeai", "google-cloud-aiplatform", "qdrant-client>=1.0.0", "fastembed", "ollama", "httpx", "opensearch-py", "opensearch-dsl", "transformers", "pinecone", "pymilvus[model]","weaviate-client", "azure-search-documents", "azure-identity", "azure-common", "faiss-cpu", "boto", "boto3", "botocore", "langchain_core", "langchain_postgres", "langchain-community", "langchain-huggingface", "xinference-client"]
test = ["pytest>=7.0.0", "pytest-asyncio>=0.21.0", "pytest-mock>=3.10.0", "pytest-cov>=4.0.0", "tox>=4.0.0"]
dev = ["pytest>=7.0.0", "pytest-asyncio>=0.21.0", "pytest-mock>=3.10.0", "pytest-cov>=4.0.0", "tox>=4.0.0", "mypy", "ruff", "pandas-stubs", "plotly-stubs", "types-PyYAML", "types-requests", "types-tabulate"]
chromadb = ["chromadb>=1.1.0"]
openai = ["openai"]
azureopenai = ["openai", "azure-identity"]
qianfan = ["qianfan"]
mistralai = ["mistralai>=1.0.0"]
anthropic = ["anthropic"]
gemini = ["google-genai"]
marqo = ["marqo"]
zhipuai = ["zhipuai"]
ollama = ["ollama", "httpx"]
qdrant = ["qdrant-client>=1.0.0", "fastembed"]
vllm = ["vllm"]
pinecone = ["pinecone", "fastembed"]
opensearch = ["opensearch-py", "opensearch-dsl", "langchain-community", "langchain-huggingface"]
hf = ["transformers"]
milvus = ["pymilvus[model]"]
bedrock = ["boto3", "botocore"]
weaviate = ["weaviate-client"]
azuresearch = ["azure-search-documents", "azure-identity", "azure-common", "fastembed"]
pgvector = ["langchain-postgres>=0.0.12"]
faiss-cpu = ["faiss-cpu"]
faiss-gpu = ["faiss-gpu"]
xinference-client = ["xinference-client"]
oracle = ["oracledb", "chromadb<1.0.0"]
hive = ["pyhive", "thrift"]
presto = ["pyhive", "thrift"]
mssql = ["pyodbc"]
[tool.flit.module]
name = "vanna"
path = "src/vanna"
[tool.flit.sdist]
exclude = [
"frontends/",
"tests/",
"notebooks/",
".github/",
"tox.ini",
]
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
"anthropic: marks tests requiring Anthropic API key",
"openai: marks tests requiring OpenAI API key",
"azureopenai: marks tests requiring Azure OpenAI API key",
"gemini: marks tests requiring Gemini API key",
"ollama: marks tests requiring local Ollama instance",
"legacy: marks tests for legacy adapter",
"slow: marks tests as slow running",
"postgres: marks tests requiring PostgreSQL",
"mysql: marks tests requiring MySQL",
]
filterwarnings = [
"ignore::DeprecationWarning",
]
[tool.ruff]
# Set the target Python version
target-version = "py311"
# Set line length to 88 (Black's default)
line-length = 88
# Enable auto-fixing
fix = false
# Exclude common directories
exclude = [
".git",
".tox",
".venv",
"venv",
"__pycache__",
"build",
"dist",
"*.egg-info",
]
[tool.ruff.lint]
# Enable specific rule categories
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
# "I", # isort (disabled - use `ruff check --fix` to auto-fix import sorting)
"N", # pep8-naming
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
]
# Ignore specific rules
ignore = [
# Formatting/style (handled by formatter or not critical)
"E501", # line too long (handled by formatter)
"E402", # module level import not at top of file
"E731", # lambda assignment
"E741", # ambiguous variable name
"W291", # trailing whitespace
"W293", # blank line with whitespace
# Naming conventions (legacy compatibility)
"N801", # invalid class name
"N802", # function name should be lowercase
"N803", # argument name should be lowercase
"N805", # invalid first argument name for method
"N806", # variable in function should be lowercase
"N818", # error suffix on exception name
"N999", # invalid module name
# Unused/redefined (often intentional)
"F401", # imported but unused
"F541", # f-string missing placeholders
"F811", # redefinition of unused name
"F841", # unused variable
# Bugbear rules (opinionated or intentional)
"B006", # mutable argument default (sometimes needed)
"B007", # unused loop control variable
"B008", # do not perform function calls in argument defaults
"B024", # abstract base class without abstract method
"B027", # empty method without abstract decorator
"B904", # raise without from inside except (intentional in legacy code)
"B905", # zip without explicit strict
# Comprehension/collection style
"C408", # unnecessary collection call
"C416", # unnecessary comprehension
# Simplification suggestions (all SIM rules - opinionated style)
"SIM102", # collapsible if
"SIM103", # needless bool
"SIM105", # suppressible exception
"SIM108", # if-else block instead of if-exp
"SIM110", # reimplemented builtin
"SIM114", # if with same arms
"SIM117", # multiple with statements
"SIM118", # in dict keys
"SIM401", # if-else block instead of dict get
"SIM910", # dict get with none default
]
# Allow fix for all enabled rules (when `--fix` is provided)
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Use double quotes for strings
quote-style = "double"
# Indent with spaces
indent-style = "space"
# Respect magic trailing commas
skip-magic-trailing-comma = false
# Automatically detect line endings
line-ending = "auto"