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