From 6d2e664e8fbd1783c2fedaa2c717c91fa6dd5333 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Wed, 13 Jul 2022 17:35:08 +0200 Subject: [PATCH] python310Packages.plotnine: init at 0.9.0 --- .../python-modules/plotnine/default.nix | 72 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 74 insertions(+) create mode 100644 pkgs/development/python-modules/plotnine/default.nix diff --git a/pkgs/development/python-modules/plotnine/default.nix b/pkgs/development/python-modules/plotnine/default.nix new file mode 100644 index 000000000000..58df795cb3a1 --- /dev/null +++ b/pkgs/development/python-modules/plotnine/default.nix @@ -0,0 +1,72 @@ +{ lib +, fetchPypi +, buildPythonPackage +, matplotlib +, scipy +, patsy +, pandas +, statsmodels +, pytestCheckHook +, geopandas +, mizani }: + +buildPythonPackage rec { + pname = "plotnine"; + version = "0.9.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-DompMBXzxx1oRKx6qfsNoJuQj199+n3V1opcoysuvOo="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=plotnine --cov-report=xml" "" + ''; + + buildInputs = [ + matplotlib + mizani + pandas + patsy + scipy + statsmodels + ]; + + checkInputs = [ + geopandas + pytestCheckHook + ]; + + preCheck = '' + export HOME=$(mktemp -d) + ''; + + pythonImportsCheck = [ + "plotnine" + ]; + + disabledTestPaths = [ + # Assertion Errors + "tests/test_theme.py" + "tests/test_scale_internals.py" + "tests/test_scale_labelling.py" + "tests/test_position.py" + "tests/test_geom_text_label.py" + "tests/test_geom_smooth.py" + "tests/test_geom_segment.py" + "tests/test_geom_ribbon_area.py" + "tests/test_geom_map.py" + "tests/test_facets.py" + "tests/test_facet_labelling.py" + "tests/test_coords.py" + "tests/test_annotation_logticks.py" + ]; + + meta = with lib; { + description = "Grammar of graphics for python"; + homepage = "https://plotnine.readthedocs.io/en/stable"; + license = licenses.mit; + maintainers = with maintainers; [ onny ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c2bb1169e66f..37a003638e2e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6773,6 +6773,8 @@ in { plotly = callPackage ../development/python-modules/plotly { }; + plotnine = callPackage ../development/python-modules/plotnine { }; + pluggy = callPackage ../development/python-modules/pluggy { }; plugincode = callPackage ../development/python-modules/plugincode { };