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