1{ lib
2, fetchPypi
3, buildPythonPackage
4, matplotlib
5, scipy
6, patsy
7, pandas
8, statsmodels
9, pytestCheckHook
10, geopandas
11, scikit-misc
12, adjusttext
13, mizani }:
14
15buildPythonPackage rec {
16 pname = "plotnine";
17 version = "0.9.0";
18
19 src = fetchPypi {
20 inherit pname version;
21 sha256 = "sha256-DompMBXzxx1oRKx6qfsNoJuQj199+n3V1opcoysuvOo=";
22 };
23
24 postPatch = ''
25 substituteInPlace pyproject.toml \
26 --replace " --cov=plotnine --cov-report=xml" ""
27 '';
28
29 buildInputs = [
30 matplotlib
31 mizani
32 pandas
33 patsy
34 scipy
35 statsmodels
36 ];
37
38 checkInputs = [
39 adjusttext
40 geopandas
41 pytestCheckHook
42 scikit-misc
43 ];
44
45 preCheck = ''
46 export HOME=$(mktemp -d)
47 '';
48
49 pythonImportsCheck = [
50 "plotnine"
51 ];
52
53 disabledTestPaths = [
54 # Assertion Errors
55 "tests/test_theme.py"
56 "tests/test_scale_internals.py"
57 "tests/test_scale_labelling.py"
58 "tests/test_position.py"
59 "tests/test_geom_text_label.py"
60 "tests/test_geom_smooth.py"
61 "tests/test_geom_segment.py"
62 "tests/test_geom_ribbon_area.py"
63 "tests/test_geom_map.py"
64 "tests/test_facets.py"
65 "tests/test_facet_labelling.py"
66 "tests/test_coords.py"
67 "tests/test_annotation_logticks.py"
68 ];
69
70 meta = with lib; {
71 description = "Grammar of graphics for python";
72 homepage = "https://plotnine.readthedocs.io/en/stable";
73 license = licenses.mit;
74 maintainers = with maintainers; [ onny ];
75 };
76}