summary refs log tree commit diff
path: root/pkgs/development/python-modules/dask-glm/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/dask-glm/default.nix')
-rw-r--r--pkgs/development/python-modules/dask-glm/default.nix54
1 files changed, 42 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/dask-glm/default.nix b/pkgs/development/python-modules/dask-glm/default.nix
index 9072a691c20..bd9b468064d 100644
--- a/pkgs/development/python-modules/dask-glm/default.nix
+++ b/pkgs/development/python-modules/dask-glm/default.nix
@@ -1,33 +1,63 @@
 { lib
 , buildPythonPackage
-, fetchPypi
 , cloudpickle
 , dask
-, numpy, toolz # dask[array]
+, distributed
+, fetchPypi
 , multipledispatch
-, setuptools-scm
-, scipy
-, scikit-learn
 , pytestCheckHook
+, pythonOlder
+, scikit-learn
+, scipy
+, setuptools-scm
+, sparse
 }:
 
 buildPythonPackage rec {
-  version = "0.2.0";
   pname = "dask-glm";
+  version = "0.2.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "58b86cebf04fe5b9e58092e1c467e32e60d01e11b71fdc628baaa9fc6d1adee5";
+    hash = "sha256-WLhs6/BP5bnlgJLhxGfjLmDQHhG3H9xii6qp/G0a3uU=";
   };
 
-  nativeBuildInputs = [ setuptools-scm ];
-  checkInputs = [ pytestCheckHook ];
-  propagatedBuildInputs = [ cloudpickle dask numpy toolz multipledispatch scipy scikit-learn ];
+  nativeBuildInputs = [
+    setuptools-scm
+  ];
+
+  propagatedBuildInputs = [
+    cloudpickle
+    distributed
+    multipledispatch
+    scikit-learn
+    scipy
+    sparse
+  ] ++ dask.optional-dependencies.array;
+
+  checkInputs = [
+    sparse
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "dask_glm"
+  ];
+
+  disabledTestPaths = [
+    # Circular dependency with dask-ml
+    "dask_glm/tests/test_estimators.py"
+    # Test tries to imort an obsolete method
+    "dask_glm/tests/test_utils.py"
+  ];
 
   meta = with lib; {
-    homepage = "https://github.com/dask/dask-glm/";
     description = "Generalized Linear Models with Dask";
+    homepage = "https://github.com/dask/dask-glm/";
     license = licenses.bsd3;
-    maintainers = [ maintainers.costrouc ];
+    maintainers = with maintainers; [ costrouc ];
   };
 }