nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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 rangehttpserver,
16 requests,
17 scikit-image,
18 toolz,
19 zarr,
20
21 # tests
22 ome-zarr-models,
23 pytestCheckHook,
24}:
25
26buildPythonPackage (finalAttrs: {
27 pname = "ome-zarr";
28 version = "0.13.0";
29 pyproject = true;
30
31 src = fetchFromGitHub {
32 owner = "ome";
33 repo = "ome-zarr-py";
34 tag = "v${finalAttrs.version}";
35 hash = "sha256-bRksh6ZKqF6cL6XnWBsQRb4gRVxH/vutKtep6SyFo48=";
36 };
37
38 build-system = [
39 setuptools
40 setuptools-scm
41 ];
42
43 pythonRelaxDeps = [
44 "dask"
45 ];
46 dependencies = [
47 aiohttp
48 dask
49 fsspec
50 numpy
51 rangehttpserver
52 requests
53 scikit-image
54 toolz
55 zarr
56 ]
57 ++ fsspec.optional-dependencies.s3;
58
59 nativeCheckInputs = [
60 ome-zarr-models
61 pytestCheckHook
62 ];
63
64 disabledTests = [
65 # attempts to access network
66 "test_s3_info"
67
68 # AssertionError: assert {'blocksize':... 'blosc', ...} == {'blocksize':... 'blosc', ...}
69 # comp {'id': 'blosc', 'cname': 'lz4', 'clevel': 5, 'shuffle': 1, 'blocksize': 0}
70 "test_default_compression"
71 "test_write_image_compressed"
72 ];
73
74 disabledTestPaths = [
75 # Fail with RecursionError
76 # https://github.com/ome/ome-zarr-py/issues/352
77 "tests/test_cli.py::TestCli::test_astronaut_download"
78 "tests/test_cli.py::TestCli::test_astronaut_info"
79 "tests/test_cli.py::TestCli::test_coins_info"
80 "tests/test_emitter.py::test_close"
81 "tests/test_emitter.py::test_create_wrong_encoding"
82 "tests/test_node.py::TestNode::test_image"
83 "tests/test_node.py::TestNode::test_label"
84 "tests/test_node.py::TestNode::test_labels"
85 "tests/test_ome_zarr.py::TestOmeZarr::test_download"
86 "tests/test_ome_zarr.py::TestOmeZarr::test_info"
87 "tests/test_reader.py::TestReader::test_image"
88 "tests/test_reader.py::TestReader::test_label"
89 "tests/test_reader.py::TestReader::test_labels"
90 "tests/test_starting_points.py::TestStartingPoints::test_label"
91 "tests/test_starting_points.py::TestStartingPoints::test_labels"
92 "tests/test_starting_points.py::TestStartingPoints::test_top_level"
93
94 # tries to access network:
95 "ome_zarr/io.py"
96 ];
97
98 pythonImportsCheck = [
99 "ome_zarr"
100 "ome_zarr.cli"
101 "ome_zarr.csv"
102 "ome_zarr.data"
103 "ome_zarr.format"
104 "ome_zarr.io"
105 "ome_zarr.reader"
106 "ome_zarr.writer"
107 "ome_zarr.scale"
108 "ome_zarr.utils"
109 ];
110
111 meta = {
112 description = "Implementation of next-generation file format (NGFF) specifications for storing bioimaging data in the cloud";
113 homepage = "https://pypi.org/project/ome-zarr";
114 changelog = "https://github.com/ome/ome-zarr-py/blob/${finalAttrs.src.tag}/CHANGELOG.md";
115 license = lib.licenses.bsd2;
116 maintainers = [ lib.maintainers.bcdarwin ];
117 mainProgram = "ome_zarr";
118 };
119})