1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 hatchling, 7 dask, 8 numpy, 9 python-dateutil, 10 spatial-image, 11 xarray, 12 xarray-dataclass, 13 zarr, 14 dask-image, 15 fsspec, 16 jsonschema, 17 nbmake, 18 pooch, 19 pytestCheckHook, 20 pytest-mypy, 21 urllib3, 22}: 23 24buildPythonPackage rec { 25 pname = "multiscale-spatial-image"; 26 version = "2.0.3"; 27 pyproject = true; 28 29 disabled = pythonOlder "3.8"; 30 31 src = fetchFromGitHub { 32 owner = "spatial-image"; 33 repo = "multiscale-spatial-image"; 34 tag = "v${version}"; 35 hash = "sha256-wKSzhlNXIXOFEK8+xfKF6zTFr0+mdFhhvjWiHAKphk0="; 36 }; 37 38 build-system = [ hatchling ]; 39 40 dependencies = [ 41 dask 42 numpy 43 python-dateutil 44 spatial-image 45 xarray 46 xarray-dataclass 47 zarr 48 ]; 49 50 optional-dependencies = { 51 dask-image = [ dask-image ]; 52 #itk = [ 53 # itk-filtering # not in nixpkgs yet 54 #]; 55 test = [ 56 dask-image 57 fsspec 58 #ipfsspec # not in nixpkgs 59 #itk-filtering # not in nixpkgs 60 jsonschema 61 nbmake 62 pooch 63 pytest-mypy 64 urllib3 65 ]; 66 }; 67 68 nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.test; 69 70 doCheck = false; # all test files try to download data 71 72 pythonImportsCheck = [ "multiscale_spatial_image" ]; 73 74 meta = { 75 description = "Generate a multiscale, chunked, multi-dimensional spatial image data structure that can serialized to OME-NGFF"; 76 homepage = "https://github.com/spatial-image/multiscale-spatial-image"; 77 changelog = "https://github.com/spatial-image/multiscale-spatial-image/releases/tag/v${version}"; 78 license = lib.licenses.asl20; 79 maintainers = with lib.maintainers; [ bcdarwin ]; 80 }; 81}