Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (106 loc) · 3.54 KB
/
Copy pathpyproject.toml
File metadata and controls
120 lines (106 loc) · 3.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
[project]
name = "chunkmirage"
version = "0.1.0a1"
description = "Spoof chunked array formats (zarr, n5, neuroglancer precomputed) over HTTP with on-the-fly processing, caching, and pluggable ops."
readme = "README.md"
license = { file = "LICENSE" }
authors = [
{ name = "David Ackerman (@davidackerman)" },
{ name = "Yurii Zubov (@yuriyzubov)" },
]
requires-python = ">=3.11"
keywords = ["zarr", "n5", "neuroglancer", "tensorstore", "virtual", "chunked", "imaging"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Image Processing",
"Typing :: Typed",
]
dependencies = [
"numpy>=1.26",
"numcodecs>=0.12",
"tensorstore>=0.1.60",
"starlette>=0.37",
"uvicorn[standard]>=0.29",
"hypercorn[h2]>=0.17",
"pydantic>=2.6",
"typer>=0.12",
]
[project.optional-dependencies]
hdf5 = ["h5py>=3.10"]
# GeoTIFF / cloud-optimized GeoTIFF sources (tensorstore's tiff driver reads only uint8)
tiff = ["tifffile>=2024.1", "imagecodecs>=2024.1"]
ops = ["scipy>=1.12"]
# meshes computed on demand (marching cubes)
mesh = ["scikit-image>=0.22", "DracoPy>=1.4"]
mcp = ["mcp>=1.0"]
viewer = ["neuroglancer>=2.40"]
https = ["cryptography>=42"]
# register:// solves on a GPU when there is one (CPU otherwise). gpu is PyTorch's CUDA build,
# ~3 GB of wheels, so not in `all`; cpu is its CPU-only build (CI, laptops). Pick one.
gpu = ["torch>=2.6", "scipy>=1.12"]
cpu = ["torch>=2.6", "scipy>=1.12"]
all = ["chunkmirage[hdf5,tiff,ops,mesh,mcp,viewer,https]"]
[project.urls]
Homepage = "https://janeliascicomp.github.io/chunkmirage/"
Documentation = "https://janeliascicomp.github.io/chunkmirage/"
Source = "https://github.com/JaneliaSciComp/chunkmirage"
Issues = "https://github.com/JaneliaSciComp/chunkmirage/issues"
Changelog = "https://github.com/JaneliaSciComp/chunkmirage/blob/main/CHANGELOG.md"
[project.scripts]
chunkmirage = "chunkmirage.cli:app"
[project.entry-points."chunkmirage.ops"]
threshold = "chunkmirage.ops.pointwise:Threshold"
cast = "chunkmirage.ops.pointwise:Cast"
scale = "chunkmirage.ops.pointwise:Scale"
[dependency-groups]
docs = [
"mkdocs>=1.6,<2",
"mkdocs-material>=9.5",
"mkdocstrings[python]>=0.25",
]
dev = [
"pytest>=8",
"pytest-asyncio>=0.23",
"httpx>=0.27",
"ruff>=0.5",
"neuroglancer>=2.40",
]
[tool.uv]
conflicts = [[{ extra = "cpu" }, { extra = "gpu" }]]
# torch per extra. gpu: CUDA 12.8, which covers Turing (sm_75) through Blackwell and runs on
# any driver >= 525, unlike PyPI's default build, which may need a newer driver than a
# workstation has. cpu: the CPU-only build, a tenth of the size.
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", extra = "cpu" },
{ index = "pytorch-cu128", extra = "gpu" },
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/chunkmirage"]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B"]
ignore = ["B008", "B905", "E501"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]