-
Notifications
You must be signed in to change notification settings - Fork 19
/
pyproject.toml
174 lines (153 loc) · 5.11 KB
/
pyproject.toml
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
[project]
name = "pysail"
version = "0.2.0"
description = "Sail Python library"
authors = [
{ name = "LakeSail", email = "[email protected]" },
]
readme = "README.md"
license = { file = "LICENSE" }
# Spark 3.5 does not support Python 3.12 yet.
requires-python = ">=3.8,<3.12"
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.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Rust",
"Topic :: Scientific/Engineering",
]
[project.optional-dependencies]
spark = [
"pyspark[connect]>=3.5,<4.0",
"duckdb>=1.0,<2.0",
]
[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 be "detached",
# 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]
detached = true
path = ".venvs/default"
python = "3.11"
installer = "pip"
dependencies = [
"pyspark[connect]==3.5.1",
# We do not specify the extra dependencies for Ibis since we install PySpark explicitly.
"ibis-framework~=9.4",
"pyarrow-hotfix>=0.4,<1", # (required by Ibis PySpark)
"rich>=12.4.4,<14", # (required by Ibis PySpark)
"pytest~=8.3",
"duckdb~=1.1",
]
[tool.hatch.envs.default.overrides]
env.CI.installer = "uv"
[tool.hatch.envs.default.scripts]
install-pysail = "{env:HATCH_UV} pip install pysail --no-index -f target/wheels --force-reinstall"
[tool.hatch.envs.docs]
detached = true
path = ".venvs/docs"
python = "3.11"
installer = "pip"
dependencies = [
"sphinx~=8.0",
]
[tool.hatch.envs.docs.scripts]
install-pysail = "{env:HATCH_UV} pip install pysail --no-index -f target/wheels --force-reinstall"
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]
detached = true
path = ".venvs/test"
python = "3.11"
installer = "pip"
dependencies = [
# PySpark dependencies
# PySpark itself is not added here since we install our patched version.
"numpy~=1.15",
"scipy~=1.14",
"pandas==2.0.3",
"pyarrow==12.0.1",
"flask==3.0.2",
"matplotlib~=3.9",
"plotly~=4.8",
"scikit-learn~=1.1",
"mlflow~=2.14.2",
"memory-profiler==0.60.0",
"grpcio>=1.56,<1.57",
"grpcio-status>=1.56,<1.57",
"googleapis-common-protos==1.56.4",
# pytest and plugins
"pytest~=8.3",
"pytest-xdist~=3.6.1",
"pytest-timeout~=2.3.1",
"pytest-reportlog~=0.4.0",
# Ibis and its test dependencies
"ibis-framework~=9.4",
"pyarrow-hotfix>=0.4,<1",
"rich>=12.4.4,<14",
"filelock>=3.7.0,<4",
"hypothesis>=6.58.0,<7",
"packaging>=21.3,<25",
"requests>=2,<3",
"tomli>=2.0.1,<3",
"pytest-httpserver>=1.0.5,<2",
"pytest-mock>=3.6.1,<4",
"pytest-repeat>=0.9.1,<0.10",
"pytest-snapshot>=0.9.0,<1",
]
[tool.hatch.envs.test.env-vars]
PYTHONPATH = "{root}/scripts/spark-tests"
IBIS_TESTING_DATA_DIR = "{root}/opt/ibis-testing-data"
[tool.hatch.envs.test.scripts]
install-pyspark = "{env:HATCH_UV} pip install opt/spark/python/dist/pyspark-3.5.1.tar.gz"
install-pysail = "{env:HATCH_UV} pip install pysail --no-index -f target/wheels --force-reinstall"
[tool.hatch.envs.test.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"]
[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",
]