summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/hvplot/default.nix
blob: 3eef49a3ffc0030c8c7936400339123b84aed4cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  setuptools-scm,

  # dependencies
  bokeh,
  colorcet,
  holoviews,
  pandas,

  # tests
  pytestCheckHook,
  dask,
  xarray,
  bokeh-sampledata,
  parameterized,
  selenium,
  matplotlib,
  scipy,
  plotly,
}:

buildPythonPackage rec {
  pname = "hvplot";
  version = "0.11.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "holoviz";
    repo = "hvplot";
    tag = "v${version}";
    hash = "sha256-V1KJtv1FCGITHdgxRWq1LWEgmWOU0N0iW60Wk0O5gC8=";
  };

  build-system = [
    setuptools-scm
  ];

  dependencies = [
    bokeh
    colorcet
    holoviews
    pandas
  ];

  nativeCheckInputs = [
    pytestCheckHook
    dask
    xarray
    bokeh-sampledata
    parameterized
    selenium
    matplotlib
    scipy
    plotly
  ];

  disabledTests = [
    # Legacy dask-expr implementation is deprecated
    # NotImplementedError: The legacy implementation is no longer supported
    "test_dask_dataframe_patched"
    "test_dask_series_patched"
  ];

  disabledTestPaths = [
    # Legacy dask-expr implementation is deprecated
    # NotImplementedError: The legacy implementation is no longer supported
    "hvplot/tests/plotting/testcore.py"
    "hvplot/tests/testcharts.py"
    "hvplot/tests/testgeowithoutgv.py"

    # All of the following below require xarray.tutorial files that require
    # downloading files from the internet (not possible in the sandbox).
    "hvplot/tests/testgeo.py"
    "hvplot/tests/testinteractive.py"
    "hvplot/tests/testui.py"
    "hvplot/tests/testutil.py"
  ];

  # need to set MPLBACKEND=agg for headless matplotlib for darwin
  # https://github.com/matplotlib/matplotlib/issues/26292
  preCheck = ''
    export MPLBACKEND=agg
  '';

  pythonImportsCheck = [ "hvplot.pandas" ];

  meta = {
    description = "High-level plotting API for the PyData ecosystem built on HoloViews";
    homepage = "https://hvplot.pyviz.org";
    changelog = "https://github.com/holoviz/hvplot/releases/tag/${src.tag}";
    license = lib.licenses.bsd3;
    maintainers = [ ];
  };
}