python312Packages.dash-renderer: remove (#369714)
[NixPkgs.git] / pkgs / development / python-modules / imbalanced-learn / default.nix
blob09ebc40b7abb62f6192785f49fcf45a315aa5c05
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   pythonOlder,
6   setuptools,
7   joblib,
8   keras,
9   numpy,
10   pandas,
11   scikit-learn,
12   scipy,
13   tensorflow,
14   threadpoolctl,
15   pytestCheckHook,
18 buildPythonPackage rec {
19   pname = "imbalanced-learn";
20   version = "0.12.4";
21   pyproject = true;
23   disabled = pythonOlder "3.8";
25   src = fetchPypi {
26     inherit pname version;
27     hash = "sha256-gVO6OF0pawfZfgkBomJKhsBrSMlML5LaOlNUgnaXt6M=";
28   };
30   nativeBuildInputs = [ setuptools ];
32   propagatedBuildInputs = [
33     joblib
34     numpy
35     scikit-learn
36     scipy
37     threadpoolctl
38   ];
40   optional-dependencies = {
41     optional = [
42       keras
43       pandas
44       tensorflow
45     ];
46   };
48   pythonImportsCheck = [ "imblearn" ];
50   nativeCheckInputs = [
51     pytestCheckHook
52     pandas
53   ];
55   preCheck = ''
56     export HOME=$TMPDIR
57   '';
59   disabledTestPaths = [
60     # require tensorflow and keras, but we don't want to
61     # add them to nativeCheckInputs just for this tests
62     "imblearn/keras/_generator.py"
63   ];
65   meta = with lib; {
66     description = "Library offering a number of re-sampling techniques commonly used in datasets showing strong between-class imbalance";
67     homepage = "https://github.com/scikit-learn-contrib/imbalanced-learn";
68     changelog = "https://github.com/scikit-learn-contrib/imbalanced-learn/releases/tag/${version}";
69     license = licenses.mit;
70     maintainers = [ maintainers.rmcgibbo ];
71   };