From e5cd420e7384fa936e9786a02201ab400b4dcca3 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Thu, 13 Sep 2018 15:10:40 -0400 Subject: [PATCH 1/8] pythonPackages.distributed: refactor move to fetchPypi There is a bug when using git repo in that the package does not get a version (shows up as `0+unknown`). Using pypi fixes this issue allows allows for auto upgrades. --- .../python-modules/distributed/default.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/distributed/default.nix b/pkgs/development/python-modules/distributed/default.nix index 987b64439a5..694bc2ce4f9 100644 --- a/pkgs/development/python-modules/distributed/default.nix +++ b/pkgs/development/python-modules/distributed/default.nix @@ -1,6 +1,6 @@ { lib , buildPythonPackage -, fetchFromGitHub +, fetchPypi , pytest , pytest-repeat , pytest-faulthandler @@ -26,14 +26,12 @@ buildPythonPackage rec { pname = "distributed"; - version = "1.22.1"; + version = "1.23.1"; # get full repository need conftest.py to run tests - src = fetchFromGitHub { - owner = "dask"; - repo = pname; - rev = version; - sha256 = "0xvx55rhbhlyys3kjndihwq6y6260qzy9mr3miclh5qddaiw2d5z"; + src = fetchPypi { + inherit pname version; + sha256 = "9d4693442efe40e05e4304fe6d8174989c6eb4bad1afe70480c98263ef8e1cdb"; }; checkInputs = [ pytest pytest-repeat pytest-faulthandler pytest-timeout mock joblib ]; From 93cdaaa3d4f198420624495d64ba5b6af01c9e07 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Thu, 13 Sep 2018 15:12:21 -0400 Subject: [PATCH 2/8] pythonPackages.dask-ml: init at 0.10.0 --- .../python-modules/dask-ml/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/dask-ml/default.nix diff --git a/pkgs/development/python-modules/dask-ml/default.nix b/pkgs/development/python-modules/dask-ml/default.nix new file mode 100644 index 00000000000..0f53bcc225d --- /dev/null +++ b/pkgs/development/python-modules/dask-ml/default.nix @@ -0,0 +1,43 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, dask +, numpy, toolz # dask[array] +, numba +, pandas +, scikitlearn +, scipy +, dask-glm +, six +, multipledispatch +, packaging +, pytest +, xgboost +, tensorflow +, joblib +, distributed +}: + +buildPythonPackage rec { + version = "0.10.0"; + pname = "dask-ml"; + + src = fetchPypi { + inherit pname version; + sha256 = "4b6ca548c7282c1b6983e696e4bdfa0a2d7b51b168928b9322ea7a4b9a9f20f9"; + }; + + checkInputs = [ pytest xgboost tensorflow joblib distributed ]; + propagatedBuildInputs = [ dask numpy toolz numba pandas scikitlearn scipy dask-glm six multipledispatch packaging ]; + + # dask-ml has some heavy test requirements + # and requires some very new packages + doCheck = false; + + meta = with stdenv.lib; { + homepage = https://github.com/dask/dask-ml; + description = "Scalable Machine Learn with Dask"; + license = licenses.bsd3; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4375ab550fd..bedfe6d4a78 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1984,6 +1984,8 @@ in { dask = callPackage ../development/python-modules/dask { }; + dask-ml = callPackage ../development/python-modules/dask-ml { }; + datrie = callPackage ../development/python-modules/datrie { }; heapdict = callPackage ../development/python-modules/heapdict { }; From 32cb956fea81d1bfeb0c08f53dff8a445e4b9b6b Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Thu, 13 Sep 2018 15:12:51 -0400 Subject: [PATCH 3/8] pythonPackages.dask-glm: init at 0.1.0 --- .../python-modules/dask-glm/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/dask-glm/default.nix diff --git a/pkgs/development/python-modules/dask-glm/default.nix b/pkgs/development/python-modules/dask-glm/default.nix new file mode 100644 index 00000000000..13af6d9da8a --- /dev/null +++ b/pkgs/development/python-modules/dask-glm/default.nix @@ -0,0 +1,35 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, cloudpickle +, dask +, numpy, toolz # dask[array] +, multipledispatch +, scipy +, scikitlearn +, pytest +}: + +buildPythonPackage rec { + version = "0.1.0"; + pname = "dask-glm"; + + src = fetchPypi { + inherit pname version; + sha256 = "5a38d17538558fe6a3457cd67eed0a90a5dff51a9eaebb496efb68fc432ed89a"; + }; + + checkInputs = [ pytest ]; + propagatedBuildInputs = [ cloudpickle dask numpy toolz multipledispatch scipy scikitlearn ]; + + checkPhase = '' + py.test dask_glm + ''; + + meta = with stdenv.lib; { + homepage = http://github.com/dask/dask-glm/; + description = "Generalized Linear Models with Dask"; + license = licenses.bsd3; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bedfe6d4a78..4bf3114800a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1984,6 +1984,8 @@ in { dask = callPackage ../development/python-modules/dask { }; + dask-glm = callPackage ../development/python-modules/dask-glm { }; + dask-ml = callPackage ../development/python-modules/dask-ml { }; datrie = callPackage ../development/python-modules/datrie { }; From 41cd200b6400d95f94f61305493a88464c999135 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Thu, 13 Sep 2018 15:14:25 -0400 Subject: [PATCH 4/8] pythonPackages.dask-jobqueue: init at 0.4.0 --- .../python-modules/dask-jobqueue/default.nix | 33 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/python-modules/dask-jobqueue/default.nix diff --git a/pkgs/development/python-modules/dask-jobqueue/default.nix b/pkgs/development/python-modules/dask-jobqueue/default.nix new file mode 100644 index 00000000000..e6ac86660c1 --- /dev/null +++ b/pkgs/development/python-modules/dask-jobqueue/default.nix @@ -0,0 +1,33 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, dask +, distributed +, docrep +, pytest +}: + +buildPythonPackage rec { + version = "0.4.0"; + pname = "dask-jobqueue"; + + src = fetchPypi { + inherit pname version; + sha256 = "c73dae82b2a1d2a9f4ef17778f0de7a9237671a7fd3374aadd9d2bc07e92e848"; + }; + + checkInputs = [ pytest ]; + propagatedBuildInputs = [ dask distributed docrep ]; + + # do not run entire tests suite (requires slurm, sge, etc.) + checkPhase = '' + py.test dask_jobqueue/tests/test_jobqueue_core.py + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/dask/dask-jobqueue; + description = "Deploy Dask on job schedulers like PBS, SLURM, and SGE"; + license = licenses.bsd3; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4bf3114800a..4c6c82b06a6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1986,6 +1986,8 @@ in { dask-glm = callPackage ../development/python-modules/dask-glm { }; + dask-jobqueue = callPackage ../development/python-modules/dask-jobqueue { }; + dask-ml = callPackage ../development/python-modules/dask-ml { }; datrie = callPackage ../development/python-modules/datrie { }; From 1a67a15c6ff55c97cc27daaf00f51cccc0711799 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Thu, 13 Sep 2018 16:41:13 -0400 Subject: [PATCH 5/8] pythonPackages.pims: init at 0.4.1 --- .../python-modules/pims/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/pims/default.nix diff --git a/pkgs/development/python-modules/pims/default.nix b/pkgs/development/python-modules/pims/default.nix new file mode 100644 index 00000000000..4e45d5203e6 --- /dev/null +++ b/pkgs/development/python-modules/pims/default.nix @@ -0,0 +1,34 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, slicerator +, scikitimage +, six +, numpy +, tifffile +, pytest +, nose +}: + +buildPythonPackage rec { + version = "0.4.1"; + pname = "PIMS"; + + src = fetchPypi { + inherit pname version; + sha256 = "6a53a155e900b44e71127a1e1fccbfbaed7eec3c2b52497c40c23a05f334c9dd"; + }; + + checkInputs = [ nose ]; + propagatedBuildInputs = [ slicerator six numpy tifffile scikitimage ]; + + # not everything packaged with pypi release + doCheck = false; + + meta = with stdenv.lib; { + homepage = https://github.com/soft-matter/pims; + description = "Python Image Sequence: Load video and sequential images in many formats with a simple, consistent interface"; + license = licenses.bsdOriginal; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4c6c82b06a6..4a4211e7f59 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -386,6 +386,8 @@ in { phonopy = callPackage ../development/python-modules/phonopy { }; + pims = callPackage ../development/python-modules/pims { }; + plantuml = callPackage ../tools/misc/plantuml { }; pymysql = callPackage ../development/python-modules/pymysql { }; From ce4b7154ac5b91157243fe78eb4ff29a00705338 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Thu, 13 Sep 2018 16:41:34 -0400 Subject: [PATCH 6/8] pythonPackages.slicerator: init at 0.9.8 --- .../python-modules/slicerator/default.nix | 32 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/python-modules/slicerator/default.nix diff --git a/pkgs/development/python-modules/slicerator/default.nix b/pkgs/development/python-modules/slicerator/default.nix new file mode 100644 index 00000000000..6af7fafdddf --- /dev/null +++ b/pkgs/development/python-modules/slicerator/default.nix @@ -0,0 +1,32 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, python +, six +}: + +buildPythonPackage rec { + version = "0.9.8"; + pname = "slicerator"; + + src = fetchPypi { + inherit pname version; + sha256 = "b91dd76a415fd8872185cbd6fbf1922fe174359053d4694983fc719e4a0f5667"; + }; + + propagatedBuildInputs = [ six ]; + + checkPhase = '' + ${python.interpreter} run_tests.py + ''; + + # run_tests.py not packaged with pypi release + doCheck = false; + + meta = with stdenv.lib; { + homepage = http://github.com/soft-matter/slicerator; + description = "A lazy-loading, fancy-sliceable iterable"; + license = licenses.bsdOriginal; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4a4211e7f59..d32b42c1950 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -568,6 +568,8 @@ in { slackclient = callPackage ../development/python-modules/slackclient { }; + slicerator = callPackage ../development/python-modules/slicerator { }; + spglib = callPackage ../development/python-modules/spglib { }; statistics = callPackage ../development/python-modules/statistics { }; From 72bd196b895ae65c543c454d52fa034dd95b43e5 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Thu, 13 Sep 2018 16:41:58 -0400 Subject: [PATCH 7/8] pythonPackages.dask-image: init at 0.1.1 --- .../python-modules/dask-image/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/dask-image/default.nix diff --git a/pkgs/development/python-modules/dask-image/default.nix b/pkgs/development/python-modules/dask-image/default.nix new file mode 100644 index 00000000000..15a13b2ff71 --- /dev/null +++ b/pkgs/development/python-modules/dask-image/default.nix @@ -0,0 +1,30 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, dask +, numpy, toolz # dask[array] +, scipy +, pims +, pytest +, scikitimage +}: + +buildPythonPackage rec { + version = "0.1.1"; + pname = "dask-image"; + + src = fetchPypi { + inherit pname version; + sha256 = "e6294ac577a8fc0abec2b97a2c42d404f599feac61d6899bdf1bf2b7cfb0e015"; + }; + + checkInputs = [ pytest scikitimage ]; + propagatedBuildInputs = [ dask numpy toolz scipy pims ]; + + meta = with stdenv.lib; { + homepage = https://github.com/dask/dask-image; + description = "Distributed image processing"; + license = licenses.bsdOriginal; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d32b42c1950..2f14c295c8d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1990,6 +1990,8 @@ in { dask-glm = callPackage ../development/python-modules/dask-glm { }; + dask-image = callPackage ../development/python-modules/dask-image { }; + dask-jobqueue = callPackage ../development/python-modules/dask-jobqueue { }; dask-ml = callPackage ../development/python-modules/dask-ml { }; From bd6873774e6e9976b2631edbdcef51f387800068 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Thu, 13 Sep 2018 16:42:25 -0400 Subject: [PATCH 8/8] pythonPackages.dask-xgboost: init at 0.1.5 --- .../python-modules/dask-xgboost/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/dask-xgboost/default.nix diff --git a/pkgs/development/python-modules/dask-xgboost/default.nix b/pkgs/development/python-modules/dask-xgboost/default.nix new file mode 100644 index 00000000000..06b5e762852 --- /dev/null +++ b/pkgs/development/python-modules/dask-xgboost/default.nix @@ -0,0 +1,36 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, xgboost +, dask +, distributed +, pytest +, scikitlearn +, scipy +}: + +buildPythonPackage rec { + version = "0.1.5"; + pname = "dask-xgboost"; + + src = fetchPypi { + inherit pname version; + sha256 = "1860d06965fe68def1c83b9195130a92050fd4bc28bf2be689898a3a74ee1316"; + }; + + checkInputs = [ pytest scikitlearn ]; + propagatedBuildInputs = [ xgboost dask distributed ]; + + checkPhase = '' + py.test dask_xgboost/tests/test_core.py + ''; + + doCheck = false; + + meta = with stdenv.lib; { + homepage = https://github.com/dask/dask-xgboost; + description = "Interactions between Dask and XGBoost"; + license = licenses.bsd3; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2f14c295c8d..7139a0eb50e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1996,6 +1996,8 @@ in { dask-ml = callPackage ../development/python-modules/dask-ml { }; + dask-xgboost = callPackage ../development/python-modules/dask-xgboost { }; + datrie = callPackage ../development/python-modules/datrie { }; heapdict = callPackage ../development/python-modules/heapdict { };