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