1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6
7 # build-system
8 hatch-vcs,
9 hatchling,
10
11 # dependencies
12 colorcet,
13 numpy,
14 pandas,
15 panel,
16 param,
17 pyviz-comms,
18
19 # tests
20 pytestCheckHook,
21 pytest-asyncio,
22 flaky,
23}:
24
25buildPythonPackage rec {
26 pname = "holoviews";
27 version = "1.21.0";
28 pyproject = true;
29
30 src = fetchFromGitHub {
31 owner = "holoviz";
32 repo = "holoviews";
33 tag = "v${version}";
34 hash = "sha256-JEGTfi4CaJaL/5AFtB92RV0DJvaIYVloukWKQSUFBZA=";
35 };
36
37 postPatch = ''
38 substituteInPlace pyproject.toml \
39 --replace '"ignore:No data was collected:coverage.exceptions.CoverageWarning",' ""
40 '';
41
42 build-system = [
43 hatch-vcs
44 hatchling
45 ];
46
47 dependencies = [
48 colorcet
49 numpy
50 pandas
51 panel
52 param
53 pyviz-comms
54 ];
55
56 nativeCheckInputs = [
57 pytestCheckHook
58 pytest-asyncio
59 flaky
60 ];
61
62 pytestFlags = [
63 "-Wignore::FutureWarning"
64 ];
65
66 disabledTests = [
67 # All the below fail due to some change in flaky API
68 "test_periodic_param_fn_non_blocking"
69 "test_callback_cleanup"
70 "test_poly_edit_callback"
71 "test_launch_server_with_complex_plot"
72 "test_launch_server_with_stream"
73 "test_launch_simple_server"
74 "test_server_dynamicmap_with_dims"
75 "test_server_dynamicmap_with_stream"
76 "test_server_dynamicmap_with_stream_dims"
77
78 # ModuleNotFoundError: No module named 'param'
79 "test_no_blocklist_imports"
80 ]
81 ++ lib.optionals stdenv.hostPlatform.isDarwin [
82 # Fails due to font rendering differences
83 "test_categorical_axis_fontsize_both"
84 ];
85
86 pythonImportsCheck = [ "holoviews" ];
87
88 meta = {
89 description = "Python data analysis and visualization seamless and simple";
90 changelog = "https://github.com/holoviz/holoviews/releases/tag/${src.tag}";
91 mainProgram = "holoviews";
92 homepage = "https://www.holoviews.org/";
93 license = lib.licenses.bsd3;
94 maintainers = [ ];
95 };
96}