-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpyproject.toml
More file actions
196 lines (185 loc) · 4.54 KB
/
pyproject.toml
File metadata and controls
196 lines (185 loc) · 4.54 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
[project]
name = "sidemantic"
version = "0.9.5"
description = "Universal semantic layer - import from Cube, dbt, LookML, Hex, and more"
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.11"
dependencies = [
"antlr4-python3-runtime>=4.13.2",
"sqlglot==27.12.0",
"pyyaml>=6.0",
"pydantic>=2.0.0",
"jinja2>=3.1.0",
"duckdb>=1.0.0",
"typer>=0.9.0",
]
[project.scripts]
sidemantic = "sidemantic.cli:app"
[project.optional-dependencies]
dev = [
"pytest>=8.0.0",
"pytest-cov>=5.0.0",
"ruff>=0.6.0",
"pandas>=2.2,<3",
"numpy>=1.26,<3",
"fastapi>=0.115.0",
"httpx>=0.28.0",
"pyarrow>=14.0.0",
"uvicorn>=0.34.0",
"fakesnow>=0.9.0", # For Snowflake integration tests
"lkml>=1.3.7",
"inflect>=7.0.0",
"antlr4-python3-runtime>=4.13.2",
]
workbench = [
"textual[syntax]>=1.0.0",
"plotext>=5.3.2",
"textual-plotext>=1.0.1",
]
mcp = [
"mcp[cli]>=1.25.0,<2",
]
apps = [
"mcp[cli]>=1.25.0,<2",
]
charts = [
"altair>=5.0.0",
"vl-convert-python>=1.0.0",
]
serve = [
"riffq>=0.1.0",
"pyarrow>=14.0.0",
]
api = [
"fastapi>=0.115.0",
"pyarrow>=14.0.0",
"uvicorn>=0.34.0",
]
postgres = [
"psycopg[binary]>=3.0.0",
"pyarrow>=14.0.0", # For Arrow support
]
bigquery = [
"google-cloud-bigquery>=3.0.0",
"pyarrow>=14.0.0", # For Arrow support
]
snowflake = [
"snowflake-connector-python>=3.0.0",
"pyarrow>=14.0.0", # For Arrow support
]
clickhouse = [
"clickhouse-connect>=0.6.0",
"pyarrow>=14.0.0", # For Arrow support
]
databricks = [
"databricks-sql-connector>=2.0.0",
"pyarrow>=14.0.0", # For Arrow support
]
spark = [
"PyHive>=0.7.0",
"thrift>=0.16.0",
"thrift_sasl>=0.4.3",
"pure-sasl>=0.6.2", # Pure Python SASL for PyHive (no C deps)
"pyarrow>=14.0.0", # For Arrow support
]
adbc = [
"adbc-driver-manager>=1.0.0",
"pyarrow>=14.0.0", # For Arrow support
]
lsp = [
"lsprotocol>=2025.0.0",
"pygls>=2.0.0",
]
lookml = [
"lkml>=1.3.7",
]
malloy = [
"antlr4-python3-runtime>=4.13.2",
]
metricflow = [
"inflect>=7.0.0",
]
widget = [
"anywidget>=0.9.0",
"pyarrow>=14.0.0",
]
# Convenience bundles
all-databases = [
"sidemantic[postgres,bigquery,snowflake,clickhouse,databricks,spark,adbc]",
]
full = [
"sidemantic[workbench,mcp,apps,charts,lsp,lookml,malloy,metricflow,widget,api]",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.sdist]
exclude = [
"/.claude",
"/docs",
"/tests",
"/examples/__pycache__",
"/examples/cube",
"/examples/hex",
"/examples/lookml",
"/examples/metricflow",
"/examples/omni",
"/examples/rill",
"/examples/sidemantic",
"/examples/sql",
"/examples/superset",
"*.pkg",
"test_*.py",
"uv.lock",
]
# README.md is included via readme field in [project]
# examples/multi_format_demo is kept for demo mode
[tool.hatch.build.targets.wheel]
packages = ["sidemantic"]
[tool.hatch.build.targets.wheel.force-include]
"examples/multi_format_demo/cube" = "sidemantic/examples/multi_format_demo/cube"
"examples/multi_format_demo/hex" = "sidemantic/examples/multi_format_demo/hex"
"examples/multi_format_demo/lookml" = "sidemantic/examples/multi_format_demo/lookml"
"examples/multi_format_demo/demo_data.py" = "sidemantic/examples/multi_format_demo/demo_data.py"
"sidemantic/widget/static/widget.js" = "sidemantic/widget/static/widget.js"
"sidemantic/widget/static/widget.css" = "sidemantic/widget/static/widget.css"
[tool.ruff]
line-length = 120
target-version = "py311"
force-exclude = true
exclude = [
"sidemantic/adapters/malloy_grammar", # ANTLR-generated files
"sidemantic/adapters/holistics_grammar", # ANTLR-generated files
]
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP"]
ignore = ["E501", "N807"] # N807: dunder methods like __init__ are supposed to have __
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
markers = [
"integration: marks tests as integration tests requiring external services (deselect with '-m \"not integration\"')",
]
addopts = "-m 'not integration'" # Skip integration tests by default
[tool.uv]
prerelease = "if-necessary"
[dependency-groups]
dev = [
"antlr4-python3-runtime>=4.13.2",
"fastapi>=0.115.0",
"httpx>=0.28.0",
"inflect>=7.0.0",
"jupyterlab>=4.5.1",
"lkml>=1.3.7",
"lsprotocol>=2025.0.0",
"marimo==0.16.5",
"numpy>=1.26,<3",
"pandas>=2.2,<3",
"polars>=1.36.1",
"pyarrow>=14.0.0",
"pygls>=2.0.0",
"pytest>=8.4.2",
"ruff>=0.14.0",
"uvicorn>=0.34.0",
]