summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/biothings-client/default.nix
blob: 884a9e458d7357e70fb7a4d41eea8798e03a6756 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  httpx,
  pytestCheckHook,
  pytest-asyncio,
}:
buildPythonPackage rec {
  pname = "biothings-client";
  version = "0.4.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "biothings";
    repo = "biothings_client.py";
    tag = "v${version}";
    hash = "sha256-uItIVoWbclF5Xkt7BxI/Q9sfKtrOJxYeJJmTd2NeGfo=";
  };

  build-system = [ setuptools ];
  dependencies = [ httpx ];
  pythonImportsCheck = [ "biothings_client" ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-asyncio
  ];

  enabledTestPaths = [
    # All other tests make network requests to exercise the API
    "tests/test_async.py::test_generate_async_settings"
    "tests/test_async.py::test_url_protocol"
    "tests/test_async.py::test_async_client_proxy_discovery"
    "tests/test_async_variant.py::test_format_hgvs"
    "tests/test_sync.py::test_generate_settings"
    "tests/test_sync.py::test_url_protocol"
    "tests/test_sync.py::test_client_proxy_discovery"
    "tests/test_variant.py::test_format_hgvs"
  ];

  meta = {
    changelog = "https://github.com/biothings/biothings_client.py/blob/${src.tag}/CHANGES.txt";
    description = "Wrapper to access Biothings.api-based backend services";
    homepage = "https://github.com/biothings/biothings_client.py";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ rayhem ];
  };
}