Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
122 lines (115 loc) · 5.23 KB
/
Copy pathpyproject.toml
File metadata and controls
122 lines (115 loc) · 5.23 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
# The refkv distribution: the Python package src/refkv, with its bindings to the Rust core (the
# crate ../rust/refkv-python, over ../rust/refkv-ir) compiled into it as the module
# refkv._core, so refkv always runs the core of its own commit. Building it needs a Rust
# toolchain. The repository's root pyproject.toml is a uv workspace over this package, with the
# environment of the conformance harnesses, the fixture generators and the benchmarks.
[build-system]
requires = ["maturin>=1.9.2,<2"]
build-backend = "maturin"
[project]
name = "refkv"
# from the bindings' Cargo.toml, whose committed version is a placeholder: tools/version.py
# writes the one `git describe` gives, for a build (RELEASING.md)
dynamic = ["version"]
description = "refkv: a reference value type for key-value stores, its ZIP binding (vzip archives), and zarrifying image files and stores without copying them"
# the PyPI page; it links to the repository's files by URL
readme = "README.md"
authors = [
{ name = "Davis Vann Bennett", email = "davis.v.bennett@gmail.com" }
]
requires-python = ">=3.12"
# copies of the repository's (tests/test_package.py checks they are identical)
license = "MIT OR Apache-2.0"
license-files = ["LICENSE-MIT", "LICENSE-APACHE"]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Programming Language :: Rust",
"Topic :: Scientific/Engineering",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
]
# The base install reads and writes vzip archives, local and over http(s) (with refkv's
# own HTTP client), holds a ReferenceStore and zarrifies image files and stores,
# without Zarr (numpy: refkv.shards), through the Rust core this package builds and
# ships as the module refkv._core (below); the extras add the rest (src/refkv/_extras.py).
dependencies = [
"google-crc32c>=1.9.0",
"numpy>=2.5.3",
]
[project.urls]
Repository = "https://github.com/d-v-b/refkv"
Documentation = "https://github.com/d-v-b/refkv/tree/main/docs"
Issues = "https://github.com/d-v-b/refkv/issues"
[project.scripts]
# `refkv zarrify <file or store> <out.vzip>` (refkv/__main__.py)
refkv = "refkv.__main__:main"
# The codecs refkv's archives name that zarr-python and imagecodecs-zarr do not provide
# (src/refkv/zarr/codecs/), which zarr loads by name when it opens an array that names one, without
# `import refkv.zarr`. A base install, without zarr, never loads them; a codec whose decoder needs
# another extra (refkv.tiff_lzw: images, refkv.stream: media) names it when a chunk is decoded.
[project.entry-points."zarr.codecs"]
"refkv.fits_tiles" = "refkv.zarr.codecs.fits_tiles:FitsTilesCodec"
"refkv.stream" = "refkv.zarr.codecs.stream:StreamCodec"
"refkv.tiff_lzw" = "refkv.zarr.codecs.tiff_lzw:LzwCodec"
n5_default = "refkv.zarr.codecs.n5_default:N5DefaultCodec"
[project.optional-dependencies]
# refkv.zarr: a reference store as a read-only zarr store, for zarr and xarray, and the codecs
# of archives of zarrified image files and stores (the entry points above)
zarr = [
"zarr>=3.4.0",
]
# the image codecs: imagecodecs-zarr's JPEG, JPEG 2000 and JPEG XR codecs and its delta codec
# (a TIFF's horizontal predictor), which refkv's archives name, and imagecodecs' LZW decoder,
# which refkv.tiff_lzw calls
images = [
"refkv[zarr]",
"imagecodecs>=2026.8.16",
"imagecodecs-zarr>=2026.8.16",
]
# the decoders of the refkv.stream codec, which reads zarrified MP3, FLAC and MP4 files:
# ffmpeg's, through PyAV
media = [
"refkv[zarr]",
"av>=15.0",
]
# obstore's stores, such as S3Store, to pass as registry= for s3://, gs:// and az:// sources
# (refkv takes any obspec store, and does not import obstore itself)
obstore = [
"obstore>=0.11.1",
]
# ReferenceStore.from_virtualizarr, refkv.convert and refkv.shards, which build Zarr
# metadata. refkv does not import xarray: it calls the methods of the datasets
# VirtualiZarr builds. VirtualiZarr's registries hold obstore stores, so this has the
# obstore extra too
virtualizarr = [
"refkv[zarr,obstore]",
"virtualizarr>=2.7.3",
]
[tool.maturin]
# the bindings, a Rust crate beside the core's; this directory holds only Python
manifest-path = "../rust/refkv-python/Cargo.toml"
module-name = "refkv._core"
python-source = "src"
# the module's earlier name, which a checkout built before it moved may still hold
exclude = ["src/refkv/_ir*"]
# The sdist keeps maturin's default generator, which takes `cargo package`'s file lists of
# the bindings' crate and of the core (its path dependency), both outside this directory, so
# the sdist builds on its own. The "git" generator archives this directory alone, and leaves
# both out.
[tool.uv]
# rebuild the bindings when they, the core's Rust sources or its source models change
# (`uv sync`, `uv run`)
cache-keys = [
{ file = "pyproject.toml" },
{ file = "../rust/refkv-python/Cargo.toml" },
{ file = "../rust/refkv-python/Cargo.lock" },
{ file = "../rust/refkv-python/build.rs" },
{ file = "../rust/refkv-python/src/**/*.rs" },
{ file = "../rust/refkv-ir/Cargo.toml" },
{ file = "../rust/refkv-ir/src/**/*.rs" },
{ file = "../rust/refkv-ir/schema/*.json" },
{ file = "../rust/refkv-ir/build.rs" },
{ file = "../rust/refkv-ir/profiles/*.json" },
]