forked from lakehq/sail
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
216 lines (190 loc) · 6.28 KB
/
pyproject.toml
File metadata and controls
216 lines (190 loc) · 6.28 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
[project]
name = "pysail"
version = "0.3.1"
description = "Sail Python library"
authors = [
{ name = "LakeSail", email = "hello@lakesail.com" },
]
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.9,<3.14"
dependencies = []
keywords = ["data", "big data", "sql", "spark", "pyspark", "arrow", "datafusion"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Rust",
"Topic :: Scientific/Engineering",
]
[project.optional-dependencies]
test = [
# The dependencies for testing the installed package.
"pyspark-client>=4.0,<5",
"duckdb>=1.0,<2",
"pytest>=8.4,<9",
]
mcp = [
"mcp>=1.0.0,<2",
]
[project.urls]
Homepage = "https://lakesail.com"
Documentation = "https://docs.lakesail.com/sail/latest/"
Repository = "https://github.com/lakehq/sail"
Issues = "https://github.com/lakehq/sail/issues"
[project.scripts]
sail = "pysail.cli:main"
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"
# All Hatch environments are configured to have `skip-install = true`,
# otherwise Hatch triggers a fresh build to install the project, which can be slow.
# To install the project as an editable package, run `hatch run [<env>:]maturin develop` instead.
# We use `uv` in CI for faster package installation, but we still use `pip` for local development,
# since the IDE may only support `pip`. Also, if we used `uv` for local development, the `pip` command
# would then be associated with the global Python installation in the command line. In this case,
# the developer may incorrectly run `pip` instead of `uv pip`, resulting in unintended modification
# to the global Python installation.
[tool.hatch.envs.default]
python = "3.11"
installer = "pip"
skip-install = true
dependencies = [
"pyspark[connect]==4.0.0",
"ibis-framework>=9.5,<10",
"pytest>=8.4,<9",
"duckdb>=1.1,<2",
"mcp>=1.0,<2",
"boto3>=1.38,<2",
]
path = ".venvs/default"
[tool.hatch.envs.default.overrides]
env.CI.installer = "uv"
[tool.hatch.envs.default.scripts]
# The scripts can be inherited by other environments.
install-pysail = "\"{env:HATCH_UV}\" pip install pysail --no-index -f target/wheels --force-reinstall"
[tool.hatch.envs.docs]
python = "3.11"
installer = "pip"
skip-install = true
dependencies = [
"sphinx>=8.0,<9",
]
path = ".venvs/docs"
[tool.hatch.envs.docs.extra-scripts]
build = "sphinx-build python/pysail/docs python/pysail/docs/_build -b json"
[tool.hatch.envs.docs.overrides]
env.CI.installer = "uv"
[tool.hatch.envs.test]
matrix-name-format = "{variable}-{value}"
python = "3.11"
installer = "pip"
skip-install = true
dependencies = [
"pytest>=8.4,<9",
"duckdb>=1.1,<2",
]
[[tool.hatch.envs.test.matrix]]
spark = ["3.5.5", "4.0.0"]
[tool.hatch.envs.test.overrides]
matrix.spark.path = [
{ value = ".venvs/test.spark-3.5.5", if = ["3.5.5"] },
{ value = ".venvs/test.spark-4.0.0", if = ["4.0.0"] },
]
matrix.spark.extra-dependencies = [
{ value = "pyspark[connect]==3.5.5", if = ["3.5.5"] },
{ value = "pyspark[connect]==4.0.0", if = ["4.0.0"] },
]
env.CI.installer = "uv"
[tool.hatch.envs.test-spark]
matrix-name-format = "{variable}-{value}"
python = "3.11"
installer = "pip"
skip-install = true
dependencies = [
"pytest>=8.4,<9",
"pytest-xdist>=3.7,<4",
"pytest-timeout>=2.4,<3",
"pytest-reportlog>=0.4,<0.5",
]
[[tool.hatch.envs.test-spark.matrix]]
spark = ["3.5.5", "4.0.0"]
[tool.hatch.envs.test-spark.extra-scripts]
install-pyspark = "\"{env:HATCH_UV}\" pip install --force-reinstall 'pyspark[connect] @ opt/spark/python/dist/pyspark-{matrix:spark}.tar.gz'"
[tool.hatch.envs.test-spark.overrides]
matrix.spark.path = [
{ value = ".venvs/test-spark.spark-3.5.5", if = ["3.5.5"] },
{ value = ".venvs/test-spark.spark-4.0.0", if = ["4.0.0"] },
]
env.CI.installer = "uv"
[tool.hatch.envs.test-ibis]
python = "3.11"
installer = "pip"
skip-install = true
dependencies = [
"pyspark[connect]==3.5.5",
"ibis-framework[pyspark]>=9.5,<10",
# The test dependencies are borrowed from `pyproject.toml` of the Ibis project.
# They need to be updated accordingly when we update the Ibis version.
"cloudpickle",
"filelock>=3.7.0,<4",
"fsspec<2024.9.1",
"hypothesis>=6.58.0,<7",
"packaging>=21.3,<25",
"pytest>=8.2.0,<9",
"pytest-benchmark>=3.4.1,<5",
"pytest-deadfixtures>=2.2.1,<3",
"pytest-clarity>=1.0.1,<2",
"pytest-cov>=3.0.0,<6",
"pytest-httpserver>=1.0.5,<2",
"pytest-mock>=3.6.1,<4",
"pytest-randomly>=3.10.1,<4",
"pytest-repeat>=0.9.1,<0.10",
"pytest-snapshot>=0.9.0,<1",
"pytest-timeout>=2.3.1,<3",
"pytest-xdist>=2.3.0,<4",
"requests>=2,<3",
"tomli>=2.0.1,<3",
# The following additional dependencies are needed in our test setup.
"pytest-reportlog>=0.4,<0.5",
]
path = ".venvs/test-ibis"
[tool.hatch.envs.test-ibis.overrides]
env.CI.installer = "uv"
[tool.hatch.build.targets.sdist]
packages = ["python/pysail"]
[tool.hatch.build.targets.wheel]
packages = ["python/pysail"]
[tool.ruff.lint.per-file-ignores]
"crates/**/*.py" = ["INP001"]
"python/pysail/docs/conf.py" = ["INP001"]
"python/pysail/examples/**/*.py" = ["T201"]
"python/pysail/tests/**/*.py" = ["S101"]
"scripts/**/*.py" = ["SLF001"]
[tool.pytest.ini_options]
testpaths = ["python"]
# Do not add configuration here to modify the test behavior.
# Instead, add the configuration using a hook in `conftest.py`.
# The `pyproject.toml` file is not part of the installed package,
# so the configuration here will not be available when testing the
# installed package via `pytest --pyargs pysail`.
[tool.maturin]
python-source = "python"
module-name = "pysail._native"
manifest-path = "crates/sail-python/Cargo.toml"
features = [
"pyo3/extension-module",
"pyo3/abi3-py38",
"pyo3/generate-import-lib",
]