2022-07-18 16:21:45 +00:00
|
|
|
{ lib
|
2023-01-11 07:51:40 +00:00
|
|
|
, adjusttext
|
2022-07-18 16:21:45 +00:00
|
|
|
, buildPythonPackage
|
2023-01-11 07:51:40 +00:00
|
|
|
, fetchPypi
|
|
|
|
, geopandas
|
2022-07-18 16:21:45 +00:00
|
|
|
, matplotlib
|
2023-01-11 07:51:40 +00:00
|
|
|
, mizani
|
2022-07-18 16:21:45 +00:00
|
|
|
, pandas
|
2023-01-11 07:51:40 +00:00
|
|
|
, patsy
|
2022-07-18 16:21:45 +00:00
|
|
|
, pytestCheckHook
|
2023-01-11 07:51:40 +00:00
|
|
|
, pythonOlder
|
2022-07-18 16:21:45 +00:00
|
|
|
, scikit-misc
|
2023-01-11 07:51:40 +00:00
|
|
|
, scipy
|
|
|
|
, setuptools-scm
|
|
|
|
, statsmodels
|
|
|
|
}:
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "plotnine";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "0.10.1";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-2RKgS2ONz4IsUaZ4i4VmQjI0jVFfFR2zpkwAAZZvaEE=";
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace " --cov=plotnine --cov-report=xml" ""
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-07-18 16:21:45 +00:00
|
|
|
matplotlib
|
|
|
|
mizani
|
|
|
|
pandas
|
|
|
|
patsy
|
|
|
|
scipy
|
|
|
|
statsmodels
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-07-18 16:21:45 +00:00
|
|
|
adjusttext
|
|
|
|
geopandas
|
|
|
|
pytestCheckHook
|
|
|
|
scikit-misc
|
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
2023-01-11 07:51:40 +00:00
|
|
|
homepage = "https://plotnine.readthedocs.io/";
|
|
|
|
changelog = "https://github.com/has2k1/plotnine/releases/tag/v${version}";
|
2022-07-18 16:21:45 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ onny ];
|
|
|
|
};
|
|
|
|
}
|