biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / plotnine / default.nix
blobf94ac77898f3fa3e509ba5b1fe05c60e248cc9a3
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   geopandas,
6   matplotlib,
7   mizani,
8   pandas,
9   patsy,
10   pytestCheckHook,
11   pythonOlder,
12   scikit-misc,
13   scipy,
14   setuptools-scm,
15   statsmodels,
18 buildPythonPackage rec {
19   pname = "plotnine";
20   version = "0.13.6";
21   pyproject = true;
23   disabled = pythonOlder "3.9";
25   src = fetchFromGitHub {
26     owner = "has2k1";
27     repo = "plotnine";
28     rev = "refs/tags/v${version}";
29     hash = "sha256-/yxRYK3ZTrYj+l3TQhFllyICnJjCZPd4ebNurCLZAYg=";
30   };
32   postPatch = ''
33     substituteInPlace pyproject.toml \
34       --replace-fail " --cov=plotnine --cov-report=xml" ""
35   '';
37   build-system = [ setuptools-scm ];
39   pythonRelaxDeps = [ "mizani" ];
41   dependencies = [
42     matplotlib
43     mizani
44     pandas
45     patsy
46     scipy
47     statsmodels
48   ];
50   nativeCheckInputs = [
51     geopandas
52     pytestCheckHook
53     scikit-misc
54   ];
56   preCheck = ''
57     export HOME=$(mktemp -d)
58   '';
60   pythonImportsCheck = [ "plotnine" ];
62   disabledTests = [
63     # Tries to change locale. The issued warning causes this test to fail.
64     # UserWarning: Could not set locale to English/United States. Some date-related tests may fail
65     "test_no_after_scale_warning"
66   ];
68   disabledTestPaths = [
69     # Assertion Errors:
70     # Generated plot images do not exactly match the expected files.
71     # After manually checking, this is caused by extremely subtle differences in label placement.
72     "tests/test_aes.py"
73     "tests/test_annotation_logticks.py"
74     "tests/test_coords.py"
75     "tests/test_facet_labelling.py"
76     "tests/test_facets.py"
77     "tests/test_geom_bar_col_histogram.py"
78     "tests/test_geom_bin_2d.py"
79     "tests/test_geom_boxplot.py"
80     "tests/test_geom_count.py"
81     "tests/test_geom_density_2d.py"
82     "tests/test_geom_density.py"
83     "tests/test_geom_dotplot.py"
84     "tests/test_geom_freqpoly.py"
85     "tests/test_geom_map.py"
86     "tests/test_geom_path_line_step.py"
87     "tests/test_geom_point.py"
88     "tests/test_geom_raster.py"
89     "tests/test_geom_rect_tile.py"
90     "tests/test_geom_ribbon_area.py"
91     "tests/test_geom_sina.py"
92     "tests/test_geom_smooth.py"
93     "tests/test_geom_text_label.py"
94     "tests/test_geom_violin.py"
95     "tests/test_layout.py"
96     "tests/test_position.py"
97     "tests/test_qplot.py"
98     "tests/test_scale_internals.py"
99     "tests/test_scale_labelling.py"
100     "tests/test_stat_ecdf.py"
101     "tests/test_stat_function.py"
102     "tests/test_stat_summary.py"
103     "tests/test_theme.py"
105     # Linting / formatting: useless as it has nothing to do with the package functionning
106     # Disabling this prevents adding a dependency on 'ruff' and 'black'.
107     "tests/test_lint_and_format.py"
108   ];
110   meta = {
111     description = "Grammar of graphics for Python";
112     homepage = "https://plotnine.readthedocs.io/";
113     changelog = "https://github.com/has2k1/plotnine/releases/tag/v${version}";
114     license = lib.licenses.mit;
115     maintainers = with lib.maintainers; [ onny ];
116   };