-
-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathpyproject.toml
More file actions
214 lines (202 loc) · 7.27 KB
/
Copy pathpyproject.toml
File metadata and controls
214 lines (202 loc) · 7.27 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
[build-system]
requires = [
"scikit-build-core>=0.11.0",
"cython>=3",
"numpy>=2.1",
]
build-backend = "scikit_build_core.build"
[project]
name = "blosc2"
description = "A fast & compressed ndarray library with a flexible compute engine."
readme = {file = "README.rst", content-type = "text/x-rst"}
authors = [{name = "Blosc Development Team", email = "blosc@blosc.org"}]
maintainers = [{ name = "Blosc Development Team", email = "blosc@blosc.org"}]
license = "BSD-3-Clause"
license-files = ["LICENSE.txt"]
classifiers = [
"Development Status :: 6 - Mature",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
"Operating System :: Microsoft :: Windows",
"Operating System :: Unix",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
requires-python = ">=3.11"
# Follow guidelines from https://scientific-python.org/specs/spec-0000/
dependencies = [
"numpy>=1.26",
"ndindex",
"msgpack",
"numexpr>=2.14.1; platform_machine != 'wasm32'",
"pydantic",
"httpx[http2]",
"rich",
"threadpoolctl; platform_machine != 'wasm32'",
]
version = "4.14.2.dev0"
[project.entry-points."array_api"]
blosc2 = "blosc2"
[project.urls]
homepage = "https://github.com/Blosc/python-blosc2"
documentation = "https://www.blosc.org/python-blosc2/python-blosc2.html"
[project.optional-dependencies]
parquet = ["pyarrow"]
zarr = ["zarr>=3.0.9"]
hdf5 = ["h5py", "hdf5plugin"]
# The b2view terminal viewer (the `b2view` script) is opt-in: most users want
# blosc2 only as a compression library, and the TUI stack has no use under
# wasm32 (no TTY). Install with `pip install "blosc2[tui]"`. This also pulls
# textual-plotext for the in-terminal braille plot (the 'p' key).
tui = ["textual", "textual-plotext"]
# Adds the high-res 'h' view on top of [tui], rendering a real matplotlib image
# (kitty/iTerm2/sixel, or half-cells elsewhere) — matplotlib is the heavy part.
hires = ["blosc2[tui]", "textual-image", "matplotlib"]
# Read/write single-file containers through any fsspec URL (https://, s3://,
# gs://, zip://, memory://...). HTTP support is included; the other protocol
# backends (s3fs, gcsfs, adlfs...) are the caller's install:
# `pip install "blosc2[fsspec]" s3fs`.
fsspec = ["fsspec[http]"]
[project.scripts]
parquet-to-blosc2 = "blosc2.cli.parquet_to_blosc2:main"
b2nd-to-zarr = "blosc2.cli.b2nd_to_zarr:main"
blosc2-to-zarr = "blosc2.cli.b2nd_to_zarr:main"
b2view = "blosc2.b2view.cli:main"
[dependency-groups]
dev = [
"dask",
"h5py",
"hdf5plugin",
"jupyterlab",
"matplotlib",
"pandas",
"plotly",
"moto[server]",
"pre-commit",
"pyarrow",
"ruff",
"s3fs",
"xarray",
"zarr",
]
test = [
"pytest",
# tests/test_fsspec.py importorskips fsspec, so without this the whole fsspec
# feature silently skips in CI. memory:// covers the protocol-generic paths,
# and is also the configuration most users installing [fsspec] are in.
"fsspec; platform_machine != 'wasm32'",
# Exercise Parquet import and lazy remote-table tests in native CI jobs.
"pyarrow; platform_machine != 'wasm32'",
# Exercise the optional remote array sources instead of silently skipping
# tests/test_zarr_source.py and tests/test_hdf5_source.py.
"zarr>=3.0.9; platform_machine != 'wasm32'",
"h5py; platform_machine != 'wasm32'",
# Exercise interoperability against files and indexes written by PyTables itself.
"tables; platform_machine != 'wasm32'",
# tests/test_hdf5_source.py exercises the optional Blosc2 HDF5 filter through
# it; without the plugin those paths skip instead of running in the default job.
"hdf5plugin; platform_machine != 'wasm32'",
# tests/test_fsspec_s3.py needs a real S3 endpoint (moto, served locally, so
# still offline) and a real *async* backend (s3fs). memory:// is neither, and
# cannot see the class of bug that lives there: awaiting an async filesystem's
# own coroutine fails on s3fs and passes silently on memory://. Runs in ~3 s.
"moto[server]; platform_machine != 'wasm32'",
"s3fs; platform_machine != 'wasm32'",
# pytest.ini defaults to `-n auto`; where xdist is absent (wasm32, or a
# bare `pip install pytest`) the root conftest.py degrades it to a serial run
"pytest-xdist; platform_machine != 'wasm32'",
# for the b2view Pilot tests (run with `-m tui`; textual is otherwise opt-in)
"pytest-asyncio",
"textual; platform_machine != 'wasm32'",
"textual-plotext; platform_machine != 'wasm32'",
"psutil; platform_machine != 'wasm32'",
# torch is optional because it is quite large (but will still be used if found)
# "torch; platform_machine != 'wasm32'",
]
doc = [
"sphinx>=8",
"pydata-sphinx-theme",
"numpydoc",
"myst-parser",
"sphinx-paramlinks",
"sphinx-reredirects",
"nbsphinx",
"ipykernel",
"sphinx-design",
"furo",
"numba",
]
[tool.cibuildwheel]
build-verbosity = 1
# Skip unsupported python versions as well as 32-bit platforms, which are not supported anymore.
skip = "*-manylinux_i686 cp*-win32 *_ppc64le *_s390x *musllinux*"
test-requires = "pytest"
#test-command = "pytest {project}/tests" # default command
# Use a simpler command here, and let the workflow .yml file to set the command
test-command = "python -c \"import blosc2; blosc2.print_versions()\""
# Manylinux 2014 will be the default for x86_64 and aarch64
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
[tool.scikit-build]
# Build a single Stable ABI (abi3) wheel covering CPython 3.11+ instead of one
# wheel per minor version. CMakeLists.txt turns the SKBUILD_SABI_* variables
# this produces into USE_SABI on each extension target.
#
# On free-threaded interpreters scikit-build-core ignores this and falls back to
# a version-specific wheel, because abi3t (PEP 803) is a distinct ABI that
# starts at 3.15 and that Cython cannot emit yet. So cp314t/cp315t keep
# building as normal cp3XXt wheels with no extra configuration.
wheel.py-api = "cp311"
[tool.scikit-build.sdist]
exclude = ["bench*", ".github*"]
[tool.ruff]
line-length = 109
extend-exclude = ["bench"]
[tool.ruff.lint]
# Pin the rule set explicitly rather than extending ruff's defaults: those
# defaults grow between releases (0.16 added BLE, PYI, PIE, TRY, S, PL*, ...,
# which surfaced ~300 pre-existing findings overnight), so `extend-select`
# quietly changes what CI enforces on a ruff upgrade. The first four entries
# are what ruff's default `select` used to be.
select = [
"E4",
"E7",
"E9",
"F",
"B",
"C4",
"C90",
"I",
"NPY",
"PT",
"RET",
"RUF",
"SIM",
"TC",
"UP",
"C901"] # enable complexity rule
ignore = [
"B028",
"PT011",
"RET505",
"RET508",
"RUF001",
"RUF002",
"RUF003",
"RUF005",
"RUF015",
"RUF059",
"SIM108",
"SIM117",
]
[tool.ruff.lint.extend-per-file-ignores]
"tests/**" = ["F841", "C901"]
[tool.ruff.lint.mccabe]
# Raise complexity from the default 10 to 14
max-complexity = 14