1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 dask,
6 bokeh,
7 toolz,
8 datashape,
9 numba,
10 numpy,
11 pandas,
12 pillow,
13 xarray,
14 colorcet,
15 param,
16 pyct,
17 scipy,
18 pytestCheckHook,
19 pythonOlder,
20 nbsmoke,
21 fastparquet,
22 nbconvert,
23 pytest-xdist,
24 netcdf4,
25}:
26
27buildPythonPackage rec {
28 pname = "datashader";
29 version = "0.16.2";
30 format = "setuptools";
31
32 disabled = pythonOlder "3.7";
33
34 src = fetchPypi {
35 inherit pname version;
36 hash = "sha256-eJmXm0wa26a0/S6GyqP175TE5qsjTLtzBspr/iQ/xN8=";
37 };
38
39 propagatedBuildInputs = [
40 dask
41 bokeh
42 toolz
43 datashape
44 numba
45 numpy
46 pandas
47 pillow
48 xarray
49 colorcet
50 param
51 pyct
52 scipy
53 ] ++ dask.optional-dependencies.complete;
54
55 nativeCheckInputs = [
56 pytestCheckHook
57 pytest-xdist
58 nbsmoke
59 fastparquet
60 nbconvert
61 netcdf4
62 ];
63
64 # The complete extra is for usage with conda, which we
65 # don't care about
66 postPatch = ''
67 substituteInPlace setup.py \
68 --replace "dask[complete]" "dask" \
69 --replace "xarray >=0.9.6" "xarray"
70 '';
71
72 preCheck = ''
73 export HOME=$TMPDIR
74 '';
75
76 pytestFlagsArray = [ "datashader" ];
77
78 disabledTests = [
79 # Not compatible with current version of bokeh
80 # see: https://github.com/holoviz/datashader/issues/1031
81 "test_interactive_image_update"
82 # Latest dask broken array marshalling
83 # see: https://github.com/holoviz/datashader/issues/1032
84 "test_raster_quadmesh_autorange_reversed"
85 ];
86
87 disabledTestPaths = [
88 # 31/50 tests fail with TypeErrors
89 "datashader/tests/test_datatypes.py"
90 ];
91
92 pythonImportsCheck = [ "datashader" ];
93
94 meta = with lib; {
95 description = "Data visualization toolchain based on aggregating into a grid";
96 mainProgram = "datashader";
97 homepage = "https://datashader.org";
98 license = licenses.bsd3;
99 maintainers = [ ];
100 };
101}