Unverified Commit c06421ed authored by codgician's avatar codgician
Browse files

python3Packages.pymilvus: 2.6.6 -> 2.6.9

parent 993c2367
Loading
Loading
Loading
Loading
+44 −16
Original line number Diff line number Diff line
@@ -9,28 +9,39 @@
  setuptools-scm,

  # dependencies
  cachetools,
  grpcio,
  # milvus-lite, (unpackaged)
  orjson,
  pandas,
  protobuf,
  python-dotenv,
  ujson,

  # optional-dependencies
  azure-storage-blob,
  minio,
  pyarrow,
  requests,
  urllib3,

  # tests
  grpcio-testing,
  pytest-asyncio,
  pytest-benchmark,
  pytestCheckHook,
  scipy,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "pymilvus";
  version = "2.6.6";
  version = "2.6.9";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "milvus-io";
    repo = "pymilvus";
    tag = "v${version}";
    hash = "sha256-UVpsciVM6MUyTH6VxndQHUvd+lkZQKSyckiBHhzVRS0=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-2PDN642i+GZG4Uxs4aA5x/jC6vm2cx4RITVqKi3KvtY=";
  };

  build-system = [
@@ -48,41 +59,58 @@ buildPythonPackage rec {
  ];

  dependencies = [
    cachetools
    grpcio
    # milvus-lite
    orjson
    pandas
    protobuf
    python-dotenv
    setuptools
    ujson
  ];

  optional-dependencies = {
    bulk_writer = [
      azure-storage-blob
      minio
      pyarrow
      requests
      urllib3
    ];
  };

  nativeCheckInputs = [
    grpcio-testing
    pytest-asyncio
    pytest-benchmark
    pytestCheckHook
    # scikit-learn
  ];
    scipy
  ]
  ++ finalAttrs.passthru.optional-dependencies.bulk_writer;

  pythonImportsCheck = [ "pymilvus" ];

  disabledTests = [
    # Tries to read .git
    # tries to read .git
    "test_get_commit"

    # milvus-lite is not packaged
    "test_milvus_lite"
    # requires network access
    "test_deadline_exceeded_shows_connecting_state"
    # mock issue in sandbox
    "test_milvus_client_creates_unbound_alias"
  ];

  disabledTestPaths = [
    # pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on localhost:19530, illegal connection params or server unavailable)>
    "examples/test_bitmap_index.py"
    # requires running milvus server
    "examples/"
    # tries to write to nix store
    "tests/test_bulk_writer_stage.py"
  ];

  meta = {
    description = "Python SDK for Milvus";
    homepage = "https://github.com/milvus-io/pymilvus";
    changelog = "https://github.com/milvus-io/pymilvus/releases/tag/${src.tag}";
    changelog = "https://github.com/milvus-io/pymilvus/releases/tag/v${finalAttrs.version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ happysalada ];
  };
}
})