about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2023-04-23 15:02:47 +0200
committerYt <happysalada@proton.me>2023-04-23 09:46:24 -0400
commit24d6aa1a9003225dfdbed496704f6d363e272a09 (patch)
tree5db2fe4d5b597e47945d9ff92f52df6d30d3d24c
parent271d57f3fd0872381a37654a15b89421f7a2f604 (diff)
python310Packages.qdrant-client: adjust inputs
- enable tests
- add pythonImportsCheck
-rw-r--r--pkgs/development/python-modules/qdrant-client/default.nix67
1 files changed, 52 insertions, 15 deletions
diff --git a/pkgs/development/python-modules/qdrant-client/default.nix b/pkgs/development/python-modules/qdrant-client/default.nix
index 98bde376e0421..57e5ab8ee0197 100644
--- a/pkgs/development/python-modules/qdrant-client/default.nix
+++ b/pkgs/development/python-modules/qdrant-client/default.nix
@@ -1,34 +1,71 @@
-{ lib, buildPythonPackage, fetchPypi, python3Packages, numpy, httpx, grpcio, typing-extensions, grpcio-tools, pydantic, urllib3, h2 }:
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, grpcio
+, grpcio-tools
+, h2
+, httpx
+, numpy
+, pytestCheckHook
+, poetry-core
+, pydantic
+, pythonOlder
+, typing-extensions
+, urllib3
+}:
 
 buildPythonPackage rec {
   pname = "qdrant-client";
   version = "1.1.0";
+  format = "pyproject";
 
-  src = fetchPypi {
-    pname = "qdrant_client";
-    inherit version;
-    hash = "sha256-tiWPQXjYkUM77rgKYbQG4jdi9c/I2WTMq5y+9zLax/0=";
-  };
+  disabled = pythonOlder "3.7";
 
-  format = "pyproject";
+  src = fetchFromGitHub {
+    owner = "qdrant";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    hash = "sha256-rpNTV3VBTND39iW/kve0aG1KJzAIl1whmhH+e6RbOhw=";
+  };
 
-  nativeBuildInputs = with python3Packages; [
+  nativeBuildInputs = [
     poetry-core
   ];
 
+  propagatedBuildInputs = [
+    numpy
+    httpx
+    grpcio
+    typing-extensions
+    grpcio-tools
+    pydantic
+    urllib3
+    h2
+  ];
 
-  # postPatch = ''
-  #   substituteInPlace setup.cfg \
-  #     --replace "validators>=0.18.2,<0.20.0" "validators>=0.18.2,<0.21.0"
-  # '';
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
 
-  propagatedBuildInputs = [ numpy httpx grpcio typing-extensions grpcio-tools pydantic urllib3 h2 ];
+  pythonImportsCheck = [
+    "qdrant_client"
+  ];
 
-  doCheck = false;
+  disabledTests = [
+    # Tests require network access
+    "test_conditional_payload_update"
+    "test_locks"
+    "test_multiple_vectors"
+    "test_points_crud"
+    "test_qdrant_client_integration"
+    "test_quantization_config"
+    "test_record_upload"
+  ];
 
   meta = with lib; {
-    homepage = "https://github.com/qdrant/qdrant-client";
     description = "Python client for Qdrant vector search engine";
+    homepage = "https://github.com/qdrant/qdrant-client";
+    changelog = "https://github.com/qdrant/qdrant-client/releases/tag/v${version}";
     license = licenses.mit;
     maintainers = with maintainers; [ happysalada ];
   };