Commit 24d6aa1a authored by Fabian Affolter's avatar Fabian Affolter Committed by Yt
Browse files

python310Packages.qdrant-client: adjust inputs

- enable tests
- add pythonImportsCheck
parent 271d57f3
Loading
Loading
Loading
Loading
+52 −15
Original line number Diff line number Diff line
{ 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 ];
  };