about summary refs log tree commit diff
path: root/pkgs/development/python-modules/ancp-bids/default.nix
blob: 77978e6cd19c53545ede6f2414cb67a5c8080e45 (plain) (blame)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  pythonOlder,
  pytestCheckHook,
  setuptools,
  wheel,
  numpy,
  pandas,
}:

buildPythonPackage rec {
  pname = "ancp-bids";
  version = "0.2.4";
  format = "pyproject";
  disabled = pythonOlder "3.7";

  # `tests/data` dir missing from PyPI dist
  src = fetchFromGitHub {
    owner = "ANCPLabOldenburg";
    repo = pname;
    rev = "refs/tags/${version}";
    hash = "sha256-c6X1gCYAezgZQP6xfQPfKW8V35F1cnTdbryEp3sZ4jw=";
  };

  patches = [
    # https://github.com/ANCPLabOldenburg/ancp-bids/pull/78
    (fetchpatch {
      name = "unpin-wheel-build-dependency.patch";
      url = "https://github.com/ANCPLabOldenburg/ancp-bids/commit/6e7a0733002845aacb0152c5aacfb42054a9b65e.patch";
      hash = "sha256-WbQRwb8Wew46OJu+zo7n4qBtgtH/Lr6x3YHAyN9ko9M=";
    })
  ];

  nativeBuildInputs = [
    setuptools
    wheel
  ];

  nativeCheckInputs = [
    numpy
    pandas
    pytestCheckHook
  ];

  pythonImportsCheck = [ "ancpbids" ];

  pytestFlagsArray = [ "tests/auto" ];

  disabledTests = [ "test_fetch_dataset" ];

  meta = with lib; {
    homepage = "https://ancpbids.readthedocs.io";
    description = "Read/write/validate/query BIDS datasets";
    license = licenses.mit;
    maintainers = with maintainers; [ bcdarwin ];
  };
}