summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/aiosomecomfort/default.nix16
-rw-r--r--pkgs/development/python-modules/deap/default.nix24
-rw-r--r--pkgs/development/python-modules/glueviz/default.nix4
-rw-r--r--pkgs/development/python-modules/httpx-auth/default.nix55
-rw-r--r--pkgs/development/python-modules/jupyterlab-git/default.nix28
-rw-r--r--pkgs/development/python-modules/mdtraj/default.nix102
-rw-r--r--pkgs/development/python-modules/openllm-client/default.nix15
-rw-r--r--pkgs/development/python-modules/openllm-core/default.nix19
-rw-r--r--pkgs/development/python-modules/openllm/default.nix69
-rw-r--r--pkgs/development/python-modules/xkcdpass/default.nix13
10 files changed, 251 insertions, 94 deletions
diff --git a/pkgs/development/python-modules/aiosomecomfort/default.nix b/pkgs/development/python-modules/aiosomecomfort/default.nix
index e993813081a85..5775aece8060b 100644
--- a/pkgs/development/python-modules/aiosomecomfort/default.nix
+++ b/pkgs/development/python-modules/aiosomecomfort/default.nix
@@ -1,15 +1,16 @@
 { lib
+, aiohttp
 , buildPythonPackage
 , fetchFromGitHub
-, aiohttp
 , prettytable
 , pythonOlder
+, setuptools
 }:
 
 buildPythonPackage rec {
   pname = "aiosomecomfort";
-  version = "0.0.17";
-  format = "setuptools";
+  version = "0.0.22";
+  pyproject = true;
 
   disabled = pythonOlder "3.7";
 
@@ -17,9 +18,13 @@ buildPythonPackage rec {
     owner = "mkmer";
     repo = "AIOSomecomfort";
     rev = "refs/tags/${version}";
-    hash = "sha256-HJbLsl1NHZxfH17mIi0T6h5ZSfKaw4VYbNgN6vmN7l4=";
+    hash = "sha256-d4pyt9+sBPNo/PL05HQ4sjyjubMtTZI9WUGRU1B/dH0=";
   };
 
+  nativeBuildInputs = [
+    setuptools
+  ];
+
   propagatedBuildInputs = [
     aiohttp
     prettytable
@@ -29,7 +34,8 @@ buildPythonPackage rec {
     "aiosomecomfort"
   ];
 
-  doCheck = false; # tests only run on windows, due to WindowsSelectorEventLoopPolicy
+  # Tests only run on Windows, due to WindowsSelectorEventLoopPolicy
+  doCheck = false;
 
   meta = {
     description = "AsyicIO client for US models of Honeywell Thermostats";
diff --git a/pkgs/development/python-modules/deap/default.nix b/pkgs/development/python-modules/deap/default.nix
index 4f0d493c0f80c..ad69642a4f7bb 100644
--- a/pkgs/development/python-modules/deap/default.nix
+++ b/pkgs/development/python-modules/deap/default.nix
@@ -1,4 +1,10 @@
-{ lib, buildPythonPackage, fetchPypi, numpy, matplotlib, nose }:
+{ lib
+, buildPythonPackage
+, fetchPypi
+, matplotlib
+, numpy
+, pytestCheckHook
+}:
 
 buildPythonPackage rec {
   pname = "deap";
@@ -9,19 +15,13 @@ buildPythonPackage rec {
     hash = "sha256-zAHemJLfp9G8mAPasoiS/q0XfwGCyB20c2CiQOrXeP8=";
   };
 
-  propagatedBuildInputs = [ numpy matplotlib ];
-
-  nativeCheckInputs = [ nose ];
-  checkPhase = ''
-    nosetests --verbosity=3
-  '';
+  propagatedBuildInputs = [ matplotlib numpy ];
+  nativeCheckInputs = [ pytestCheckHook ];
 
   meta = with lib; {
-    description = "DEAP is a novel evolutionary computation framework for rapid prototyping and testing of ideas.";
+    description = "A novel evolutionary computation framework for rapid prototyping and testing of ideas";
     homepage = "https://github.com/DEAP/deap";
-    license = licenses.lgpl3;
-    maintainers = with maintainers; [ psyanticy ];
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ getpsyched psyanticy ];
   };
-
 }
-
diff --git a/pkgs/development/python-modules/glueviz/default.nix b/pkgs/development/python-modules/glueviz/default.nix
index c6fb2859b413c..2d0e927c1acc4 100644
--- a/pkgs/development/python-modules/glueviz/default.nix
+++ b/pkgs/development/python-modules/glueviz/default.nix
@@ -29,7 +29,7 @@
 
 buildPythonPackage rec {
   pname = "glueviz";
-  version = "1.14.1";
+  version = "1.16.0";
 
   disabled = pythonOlder "3.7";
 
@@ -37,7 +37,7 @@ buildPythonPackage rec {
     owner = "glue-viz";
     repo = "glue";
     rev = "refs/tags/v${version}";
-    sha256 = "sha256-pHUcvyDziE7l0foEz7cygMuAwggnIWzsQy9SFZCDkXA=";
+    sha256 = "sha256-jjDa0DxB5AJm+x8P7FiH2kqhhc/bbzjzvdC9INs69Ro=";
   };
 
   buildInputs = [ pyqt-builder ];
diff --git a/pkgs/development/python-modules/httpx-auth/default.nix b/pkgs/development/python-modules/httpx-auth/default.nix
new file mode 100644
index 0000000000000..5c099d91d436f
--- /dev/null
+++ b/pkgs/development/python-modules/httpx-auth/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+, setuptools
+, setuptools-scm
+, wheel
+, httpx
+, pyjwt
+, pytest-httpx
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "httpx-auth";
+  version = "0.18.0";
+  pyproject = true;
+
+  disabled = pythonOlder "3.9";
+
+  src = fetchFromGitHub {
+    owner = "Colin-b";
+    repo = "httpx_auth";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-kK31jpS9Ax5kNkvUSbWWIC6CKdZKVJ28kLS0iuntWqg=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+    setuptools-scm
+    wheel
+  ];
+
+  propagatedBuildInputs = [
+    httpx
+  ];
+
+  nativeCheckInputs = [
+    pyjwt
+    pytest-httpx
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [ "httpx_auth" ];
+
+  __darwinAllowLocalNetworking = true;
+
+  meta = with lib; {
+    description = "Authentication classes to be used with httpx";
+    homepage = "https://github.com/Colin-b/httpx_auth";
+    changelog = "https://github.com/Colin-b/httpx_auth/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ natsukium ];
+  };
+}
diff --git a/pkgs/development/python-modules/jupyterlab-git/default.nix b/pkgs/development/python-modules/jupyterlab-git/default.nix
index 7c0522c754016..fc534f9e67f61 100644
--- a/pkgs/development/python-modules/jupyterlab-git/default.nix
+++ b/pkgs/development/python-modules/jupyterlab-git/default.nix
@@ -1,34 +1,41 @@
 { lib
-, stdenv
 , buildPythonPackage
 , fetchPypi
 , git
 , jupyter-server
-, jupyter-packaging
+, hatch-jupyter-builder
+, hatch-nodejs-version
+, hatchling
 , jupyterlab
 , nbdime
 , nbformat
 , pexpect
 , pytest-asyncio
+, pytest-jupyter
 , pytest-tornasync
 , pytestCheckHook
 , pythonOlder
+, traitlets
 }:
 
 buildPythonPackage rec {
   pname = "jupyterlab-git";
-  version = "0.42.0";
+  version = "0.50.0rc0";
+  pyproject = true;
 
-  disabled = pythonOlder "3.6";
+  disabled = pythonOlder "3.8";
 
   src = fetchPypi {
     pname = "jupyterlab_git";
     inherit version;
-    hash = "sha256-GFnox6KnwKWFqsUWY0QYzMShXlH9KFSY3rRJA4RAiCk=";
+    hash = "sha256-euo8j7jt6oUJfZMF3VnbuM4uhibv+eijiXPO4UwZCiU=";
   };
 
   nativeBuildInputs = [
-    jupyter-packaging
+    hatch-jupyter-builder
+    hatch-nodejs-version
+    hatchling
+    jupyterlab
   ];
 
   propagatedBuildInputs = [
@@ -37,17 +44,20 @@ buildPythonPackage rec {
     git
     nbformat
     pexpect
+    traitlets
   ];
 
   nativeCheckInputs = [
     jupyterlab
     pytest-asyncio
+    pytest-jupyter
     pytest-tornasync
     pytestCheckHook
   ];
 
-  # All Tests on darwin fail or are skipped due to sandbox
-  doCheck = !stdenv.isDarwin;
+  preCheck = ''
+    export HOME=$TMPDIR
+  '';
 
   disabledTestPaths = [
     "jupyterlab_git/tests/test_handlers.py"
@@ -67,6 +77,8 @@ buildPythonPackage rec {
     "jupyterlab_git"
   ];
 
+  __darwinAllowLocalNetworking = true;
+
   meta = with lib; {
     description = "Jupyter lab extension for version control with Git";
     homepage = "https://github.com/jupyterlab/jupyterlab-git";
diff --git a/pkgs/development/python-modules/mdtraj/default.nix b/pkgs/development/python-modules/mdtraj/default.nix
new file mode 100644
index 0000000000000..ad20cdbf06711
--- /dev/null
+++ b/pkgs/development/python-modules/mdtraj/default.nix
@@ -0,0 +1,102 @@
+{ lib
+, stdenv
+, buildPythonPackage
+, fetchFromGitHub
+, fetchpatch
+, llvmPackages
+, zlib
+, cython
+, oldest-supported-numpy
+, setuptools
+, wheel
+, astunparse
+, numpy
+, pyparsing
+, scipy
+, gsd
+, networkx
+, pandas
+, pytest-xdist
+, pytestCheckHook
+, tables
+}:
+
+buildPythonPackage rec {
+  pname = "mdtraj";
+  version = "1.9.9";
+  pyproject = true;
+
+  src = fetchFromGitHub {
+    owner = "mdtraj";
+    repo = "mdtraj";
+    rev = "refs/tags/${version}";
+    hash = "sha256-2Jg6DyVJlRBLD/6hMtcsrAdxKF5RkpUuhAQm/lqVGeE=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "gsd_3-compatibility.patch";
+      url = "https://github.com/mdtraj/mdtraj/commit/81209d00817ab07cfc4668bf5ec88088d16904c0.patch";
+      hash = "sha256-ttNmij7csxF0Z5wPPwhGumRX055W2IgFjRAe6nI6GNY=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    cython
+    oldest-supported-numpy
+    setuptools
+    wheel
+  ];
+
+  buildInputs = [
+    zlib
+  ] ++ lib.optionals stdenv.cc.isClang [
+    llvmPackages.openmp
+  ];
+
+  propagatedBuildInputs = [
+    astunparse
+    numpy
+    pyparsing
+    scipy
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-incompatible-function-pointer-types";
+
+  nativeCheckInputs = [
+    gsd
+    networkx
+    pandas
+    pytest-xdist
+    pytestCheckHook
+    tables
+  ];
+
+  preCheck = ''
+    cd tests
+    export PATH=$out/bin:$PATH
+  '';
+
+  disabledTests = [
+    # require network access
+    "test_pdb_from_url"
+    "test_1vii_url_and_gz"
+
+    # fail due to data race
+    "test_read_atomindices_1"
+    "test_read_atomindices_2"
+
+    # flaky test
+    "test_distances_t"
+  ];
+
+  pythonImportsCheck = [ "mdtraj" ];
+
+  meta = with lib; {
+    description = "An open library for the analysis of molecular dynamics trajectories";
+    homepage = "https://github.com/mdtraj/mdtraj";
+    changelog = "https://github.com/mdtraj/mdtraj/releases/tag/${src.rev}";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ natsukium ];
+  };
+}
diff --git a/pkgs/development/python-modules/openllm-client/default.nix b/pkgs/development/python-modules/openllm-client/default.nix
index 2dd395bab677f..ce77953f12df7 100644
--- a/pkgs/development/python-modules/openllm-client/default.nix
+++ b/pkgs/development/python-modules/openllm-client/default.nix
@@ -5,11 +5,11 @@
 , hatch-fancy-pypi-readme
 , hatch-vcs
 , hatchling
-, attrs
-, cattrs
+, anyio
+, distro
 , httpx
+, httpx-auth
 , openllm-core
-, orjson
 , soundfile
 , transformers
 }:
@@ -30,16 +30,19 @@ buildPythonPackage rec {
   ];
 
   propagatedBuildInputs = [
-    attrs
-    cattrs
+    anyio
+    distro
     httpx
-    orjson
+    openllm-core
   ];
 
   passthru.optional-dependencies = {
     grpc = [
       bentoml
     ] ++ bentoml.optional-dependencies.grpc;
+    auth = [
+      httpx-auth
+    ];
     agents = [
       transformers
       # diffusers
diff --git a/pkgs/development/python-modules/openllm-core/default.nix b/pkgs/development/python-modules/openllm-core/default.nix
index 75b755740d041..ab39bf6c11b91 100644
--- a/pkgs/development/python-modules/openllm-core/default.nix
+++ b/pkgs/development/python-modules/openllm-core/default.nix
@@ -4,10 +4,12 @@
 , pythonOlder
 , accelerate
 , attrs
-, bentoml
 , bitsandbytes
+, bentoml
 , cattrs
+, click-option-group
 , datasets
+, deepmerge
 , hatch-fancy-pypi-readme
 , hatch-vcs
 , hatchling
@@ -15,14 +17,13 @@
 , mypy-extensions
 , orjson
 , peft
-, ray
 , transformers
 , typing-extensions
 }:
 
 buildPythonPackage rec {
   pname = "openllm-core";
-  version = "0.3.9";
+  version = "0.4.22";
   pyproject = true;
 
   disabled = pythonOlder "3.8";
@@ -31,7 +32,7 @@ buildPythonPackage rec {
     owner = "bentoml";
     repo = "OpenLLM";
     rev = "refs/tags/v${version}";
-    hash = "sha256-M/ckvaHTdKFg7xfUgFxu7pRBrS6TGw0m2U3L88b2DKU=";
+    hash = "sha256-Hgwc4rneY0d7KZHuBIWRpndLksts5DTvaYuwZOO4sdI=";
   };
 
   sourceRoot = "source/openllm-core";
@@ -44,8 +45,10 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [
     attrs
-    bentoml
     cattrs
+    # not listed in pyproject.toml, but required at runtime
+    click-option-group
+    deepmerge
     inflection
     mypy-extensions
     orjson
@@ -54,9 +57,11 @@ buildPythonPackage rec {
 
   passthru.optional-dependencies = {
     vllm = [
-      ray
       # vllm
     ];
+    bentoml = [
+      bentoml
+    ];
     fine-tune = [
       accelerate
       bitsandbytes
@@ -67,7 +72,7 @@ buildPythonPackage rec {
     ] ++ transformers.optional-dependencies.torch
       ++ transformers.optional-dependencies.tokenizers
       ++ transformers.optional-dependencies.accelerate;
-    full = with passthru.optional-dependencies; ( vllm ++ fine-tune );
+    full = with passthru.optional-dependencies; ( vllm ++ bentoml ++ fine-tune );
   };
 
   # there is no tests
diff --git a/pkgs/development/python-modules/openllm/default.nix b/pkgs/development/python-modules/openllm/default.nix
index b9f3d2b6fa3b5..b1cad320a11d3 100644
--- a/pkgs/development/python-modules/openllm/default.nix
+++ b/pkgs/development/python-modules/openllm/default.nix
@@ -9,20 +9,18 @@
 , accelerate
 , bentoml
 , bitsandbytes
+, build
 , click
+, ctranslate2
 , datasets
 , docker
 , einops
-, fairscale
-, flax
 , ghapi
+, huggingface-hub
 , hypothesis
 , ipython
-, jax
-, jaxlib
 , jupyter
 , jupytext
-, keras
 , nbformat
 , notebook
 , openai
@@ -34,14 +32,12 @@
 , pytest-randomly
 , pytest-rerunfailures
 , pytest-xdist
-, ray
 , safetensors
 , scipy
 , sentencepiece
 , soundfile
 , syrupy
 , tabulate
-, tensorflow
 , tiktoken
 , transformers
 , openai-triton
@@ -73,12 +69,16 @@ buildPythonPackage rec {
     accelerate
     bentoml
     bitsandbytes
+    build
     click
+    einops
     ghapi
     openllm-client
     openllm-core
     optimum
     safetensors
+    scipy
+    sentencepiece
     tabulate
     transformers
   ] ++ bentoml.optional-dependencies.io
@@ -92,62 +92,43 @@ buildPythonPackage rec {
       soundfile
       transformers
     ] ++ transformers.optional-dependencies.agents;
+    awq = [
+      # autoawq
+    ];
     baichuan = [
       # cpm-kernels
-      sentencepiece
     ];
     chatglm = [
       # cpm-kernels
-      sentencepiece
+    ];
+    ctranslate = [
+      ctranslate2
     ];
     falcon = [
-      einops
       xformers
     ];
     fine-tune = [
-      accelerate
-      bitsandbytes
       datasets
+      huggingface-hub
       peft
       # trl
     ];
-    flan-t5 = [
-      flax
-      jax
-      jaxlib
-      keras
-      tensorflow
-    ];
     ggml = [
       # ctransformers
     ];
     gptq = [
       # auto-gptq
-      optimum
     ]; # ++ autogptq.optional-dependencies.triton;
     grpc = [
-      openllm-client
-    ] ++ openllm-client.optional-dependencies.grpc;
-    llama = [
-      fairscale
-      sentencepiece
-      scipy
-    ];
+      bentoml
+    ] ++ bentoml.optional-dependencies.grpc;
     mpt = [
-      einops
       openai-triton
     ];
     openai = [
       openai
       tiktoken
-    ] ++ openai.optional-dependencies.embeddings;
-    opt = [
-      flax
-      jax
-      jaxlib
-      keras
-      tensorflow
-    ];
+    ] ++ openai.optional-dependencies.datalib;
     playground = [
       ipython
       jupyter
@@ -159,11 +140,10 @@ buildPythonPackage rec {
       bitsandbytes
     ];
     vllm = [
-      ray
       # vllm
     ];
     full = with passthru.optional-dependencies; (
-      agents ++ baichuan ++ chatglm ++ falcon ++ fine-tune ++ flan-t5 ++ ggml ++ gptq ++ llama ++ mpt ++ openai ++ opt ++ playground ++ starcoder ++ vllm
+      agents ++ awq ++ baichuan ++ chatglm ++ ctranslate ++ falcon ++ fine-tune ++ ggml ++ gptq ++ mpt ++ openai ++ playground ++ starcoder ++ vllm
     );
     all = passthru.optional-dependencies.full;
   };
@@ -187,12 +167,15 @@ buildPythonPackage rec {
     export CI=1
   '';
 
+  disabledTestPaths = [
+    # require network access
+    "tests/models"
+  ];
+
   disabledTests = [
-    # these tests access to huggingface.co
-    "test_opt_125m"
-    "test_opt_125m"
-    "test_flan_t5"
-    "test_flan_t5"
+    # incompatible with recent TypedDict
+    # https://github.com/bentoml/OpenLLM/blob/f3fd32d596253ae34c68e2e9655f19f40e05f666/openllm-python/tests/configuration_test.py#L18-L21
+    "test_missing_default"
   ];
 
   pythonImportsCheck = [ "openllm" ];
diff --git a/pkgs/development/python-modules/xkcdpass/default.nix b/pkgs/development/python-modules/xkcdpass/default.nix
index 5b253d3260a89..d4a04317ad800 100644
--- a/pkgs/development/python-modules/xkcdpass/default.nix
+++ b/pkgs/development/python-modules/xkcdpass/default.nix
@@ -1,7 +1,6 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, fetchpatch
 , installShellFiles
 , pytestCheckHook
 , pythonAtLeast
@@ -10,24 +9,16 @@
 
 buildPythonPackage rec {
   pname = "xkcdpass";
-  version = "1.19.5";
+  version = "1.19.6";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-zEgC3tTQ6kwDovHPHRTvYndWVF79DpnAX454VDZiedE=";
+    hash = "sha256-zrdR4KuORCGIoRTZDednT9JDV/seWQRa3aPal8gxdTE=";
   };
 
-  patches = [
-    (fetchpatch {
-      name = "fix-non-deterministic-test.patch";
-      url = "https://github.com/redacted/XKCD-password-generator/commit/72d174a82822af1934c94de1b66fd956230142f5.patch";
-      hash = "sha256-GES40GHM0+Zx8bRceCy9/fOHJVlWZ7TCLfzhZczjfTE=";
-    })
-  ];
-
   nativeBuildInputs = [
     installShellFiles
   ];