summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pymilvus/default.nix
blob: 5d4eb0f66c2fe1ac1e2a9904693e49cdae6cc498 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  gitpython,
  setuptools,
  setuptools-scm,

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

  # tests
  grpcio-testing,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "pymilvus";
  version = "2.5.14";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "milvus-io";
    repo = "pymilvus";
    tag = "v${version}";
    hash = "sha256-h+HjDM+uhmcz7fKXE4RWtqD2+Evd9rqG3Zd5jsDyCNE=";
  };

  build-system = [
    gitpython
    setuptools
    setuptools-scm
  ];

  pythonRelaxDeps = [
    "grpcio"
  ];

  pythonRemoveDeps = [
    "milvus-lite"
  ];

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

  nativeCheckInputs = [
    grpcio-testing
    pytestCheckHook
    # scikit-learn
  ];

  pythonImportsCheck = [ "pymilvus" ];

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

    # milvus-lite is not packaged
    "test_milvus_lite"
  ];

  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"
  ];

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