1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8 setuptools-scm,
9
10 # dependencies
11 aiohttp,
12 dask,
13 distributed,
14 fsspec,
15 numpy,
16 requests,
17 scikit-image,
18 toolz,
19 zarr,
20
21 # tests
22 pytestCheckHook,
23}:
24
25buildPythonPackage rec {
26 pname = "ome-zarr";
27 version = "0.10.3";
28 pyproject = true;
29
30 src = fetchFromGitHub {
31 owner = "ome";
32 repo = "ome-zarr-py";
33 tag = "v${version}";
34 hash = "sha256-D17eNJYihVNzDoD0FNNMLP1rRvG6fTL97RrBqGgJSX0=";
35 };
36
37 build-system = [
38 setuptools
39 setuptools-scm
40 ];
41
42 dependencies = [
43 aiohttp
44 dask
45 distributed
46 fsspec
47 numpy
48 requests
49 scikit-image
50 toolz
51 zarr
52 ] ++ fsspec.optional-dependencies.s3;
53
54 nativeCheckInputs = [
55 pytestCheckHook
56 ];
57
58 disabledTests = [
59 # attempts to access network
60 "test_s3_info"
61 ];
62
63 pytestFlagsArray = [
64 # Fail with RecursionError
65 # https://github.com/ome/ome-zarr-py/issues/352
66 "--deselect=tests/test_cli.py::TestCli::test_astronaut_download"
67 "--deselect=tests/test_cli.py::TestCli::test_astronaut_info"
68 "--deselect=tests/test_cli.py::TestCli::test_coins_info"
69 "--deselect=tests/test_emitter.py::test_close"
70 "--deselect=tests/test_emitter.py::test_create_wrong_encoding"
71 "--deselect=tests/test_node.py::TestNode::test_image"
72 "--deselect=tests/test_node.py::TestNode::test_label"
73 "--deselect=tests/test_node.py::TestNode::test_labels"
74 "--deselect=tests/test_ome_zarr.py::TestOmeZarr::test_download"
75 "--deselect=tests/test_ome_zarr.py::TestOmeZarr::test_info"
76 "--deselect=tests/test_reader.py::TestReader::test_image"
77 "--deselect=tests/test_reader.py::TestReader::test_label"
78 "--deselect=tests/test_reader.py::TestReader::test_labels"
79 "--deselect=tests/test_starting_points.py::TestStartingPoints::test_label"
80 "--deselect=tests/test_starting_points.py::TestStartingPoints::test_labels"
81 "--deselect=tests/test_starting_points.py::TestStartingPoints::test_top_level"
82 ];
83
84 pythonImportsCheck = [
85 "ome_zarr"
86 "ome_zarr.cli"
87 "ome_zarr.csv"
88 "ome_zarr.data"
89 "ome_zarr.format"
90 "ome_zarr.io"
91 "ome_zarr.reader"
92 "ome_zarr.writer"
93 "ome_zarr.scale"
94 "ome_zarr.utils"
95 ];
96
97 meta = {
98 description = "Implementation of next-generation file format (NGFF) specifications for storing bioimaging data in the cloud";
99 homepage = "https://pypi.org/project/ome-zarr";
100 changelog = "https://github.com/ome/ome-zarr-py/blob/v${version}/CHANGELOG.md";
101 license = lib.licenses.bsd2;
102 maintainers = [ lib.maintainers.bcdarwin ];
103 mainProgram = "ome_zarr";
104 };
105}