about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2019-07-29 16:59:52 -0700
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2019-07-30 13:00:01 +0200
commit35b622f0da6b3ce5224510250ad31035f7ec0400 (patch)
tree84db3f3cb95b8bc037ce674ebc577f68b5555295 /pkgs
parent02ecb596a350858888339145829b1411574e593a (diff)
downloadnixlib-35b622f0da6b3ce5224510250ad31035f7ec0400.tar
nixlib-35b622f0da6b3ce5224510250ad31035f7ec0400.tar.gz
nixlib-35b622f0da6b3ce5224510250ad31035f7ec0400.tar.bz2
nixlib-35b622f0da6b3ce5224510250ad31035f7ec0400.tar.lz
nixlib-35b622f0da6b3ce5224510250ad31035f7ec0400.tar.xz
nixlib-35b622f0da6b3ce5224510250ad31035f7ec0400.tar.zst
nixlib-35b622f0da6b3ce5224510250ad31035f7ec0400.zip
python2Packages.imbalanced-learn: freeze at 0.4.3
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/imbalanced-learn/0.4.nix29
-rw-r--r--pkgs/top-level/python-packages.nix6
2 files changed, 34 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/imbalanced-learn/0.4.nix b/pkgs/development/python-modules/imbalanced-learn/0.4.nix
new file mode 100644
index 000000000000..e7d2c2f37148
--- /dev/null
+++ b/pkgs/development/python-modules/imbalanced-learn/0.4.nix
@@ -0,0 +1,29 @@
+{ stdenv, buildPythonPackage, fetchPypi, scikitlearn, pandas, nose, pytest }:
+
+buildPythonPackage rec {
+  pname = "imbalanced-learn";
+  version = "0.4.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "5bd9e86e40ce4001a57426541d7c79b18143cbd181e3330c1a3e5c5c43287083";
+  };
+
+  propagatedBuildInputs = [ scikitlearn ];
+  checkInputs = [ nose pytest pandas ];
+  checkPhase = ''
+    export HOME=$PWD
+    # skip some tests that fail because of minimal rounding errors
+    # or large dependencies
+    py.test imblearn -k 'not classification \
+                         and not _generator \
+                         and not _forest \
+                         and not wrong_memory'
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Library offering a number of re-sampling techniques commonly used in datasets showing strong between-class imbalance";
+    homepage = https://github.com/scikit-learn-contrib/imbalanced-learn;
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index f3e774b91e36..be6a291b7c70 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -2353,7 +2353,11 @@ in {
 
   image-match = callPackage ../development/python-modules/image-match { };
 
-  imbalanced-learn = callPackage ../development/python-modules/imbalanced-learn { };
+  imbalanced-learn =
+    if isPy27 then
+      callPackage ../development/python-modules/imbalanced-learn/0.4.nix { }
+    else
+      callPackage ../development/python-modules/imbalanced-learn { };
 
   immutables = callPackage ../development/python-modules/immutables {};