about summary refs log tree commit diff
path: root/pkgs/development/python-modules/seqeval/default.nix
blob: f93021f38ef4e3256caa323d034dada8955e2bcb (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, numpy
, scikit-learn
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "seqeval";
  version = "1.2.2";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "chakki-works";
    repo = "seqeval";
    rev = "v${version}";
    sha256 = "0qv05gn54kc4wpmwnflmfqw4gwwb8lxqhkiihl0pvl7s2i7qzx2j";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "use_scm_version=True," "version='${version}'," \
      --replace "setup_requires=['setuptools_scm']," "setup_requires=[],"
  '';

  propagatedBuildInputs = [
    numpy
    scikit-learn
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  disabledTests = [
    # tests call perl script and get stuck in there
    "test_statistical_tests"
    "test_by_ground_truth"
  ];

  meta = with lib; {
    description = "A Python framework for sequence labeling evaluation";
    homepage = "https://github.com/chakki-works/seqeval";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}