1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 mock,
6 plotly,
7 requests,
8 retrying,
9 setuptools,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "chart-studio";
15 version = "1.1.0-unstable-2024-07-23";
16 pyproject = true;
17
18 # chart-studio was split from plotly
19 src = fetchFromGitHub {
20 owner = "plotly";
21 repo = "plotly.py";
22 # We use plotly's upstream version as it's the same repo, but chart studio has its own version number.
23 rev = "v5.23.0";
24 hash = "sha256-K1hEs00AGBCe2fgytyPNWqE5M0jU5ESTzynP55kc05Y=";
25 };
26
27 sourceRoot = "${src.name}/packages/python/chart-studio";
28
29 build-system = [ setuptools ];
30
31 dependencies = [
32 plotly
33 requests
34 retrying
35 ];
36
37 nativeCheckInputs = [
38 mock
39 pytestCheckHook
40 ];
41
42 preCheck = ''
43 export HOME=$(mktemp -d)
44 '';
45
46 # most tests talk to a network service, so only run ones that don't do that.
47 pytestFlagsArray = [
48 "chart_studio/tests/test_core"
49 "chart_studio/tests/test_plot_ly/test_api"
50 ];
51
52 meta = {
53 description = "Utilities for interfacing with Plotly's Chart Studio service";
54 homepage = "https://github.com/plotly/plotly.py/tree/master/packages/python/chart-studio";
55 license = with lib.licenses; [ mit ];
56 maintainers = [ ];
57 };
58}