summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/deepsearch-toolkit/default.nix
blob: 451c878b44808b02f0d7a621fb275fa024dc044a (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
89
90
91
92
93
94
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  poetry-core,
  certifi,
  docling-core,
  platformdirs,
  pluggy,
  pydantic,
  pydantic-settings,
  python-dateutil,
  python-dotenv,
  requests,
  six,
  tabulate,
  tqdm,
  typer,
  urllib3,
  anyio,
  fastapi,
  uvicorn,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "deepsearch-toolkit";
  version = "2.0.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "DS4SD";
    repo = "deepsearch-toolkit";
    tag = "v${version}";
    hash = "sha256-nrz9pvyA5gPIaKt6CsJOB9cLy3sXiWW5e1Rk4vtNIY8=";
  };

  build-system = [
    poetry-core
  ];

  dependencies = [
    certifi
    docling-core
    platformdirs
    pluggy
    pydantic
    pydantic-settings
    python-dateutil
    python-dotenv
    requests
    six
    tabulate
    tqdm
    typer
    urllib3
  ];

  pythonRelaxDeps = [
    "certifi"
    "urllib3"
  ];

  optional-dependencies = rec {
    all = api;
    api = [
      anyio
      fastapi
      uvicorn
    ];
  };

  pythonImportsCheck = [
    "deepsearch"
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  disabledTests = [
    # Tests require the creation of a deepsearch profile
    "test_project_listing"
    "test_system_info"
  ];

  meta = {
    changelog = "https://github.com/DS4SD/deepsearch-toolkit/blob/${src.tag}/CHANGELOG.md";
    description = "Interact with the Deep Search platform for new knowledge explorations and discoveries";
    homepage = "https://github.com/DS4SD/deepsearch-toolkit";
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}