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