python312Packages.fnllm: 0.0.11 -> 0.0.12 (#364582)
[NixPkgs.git] / pkgs / development / python-modules / trectools / default.nix
blobe6e585397f42eb67919085c9e0fdf4f206b3c46d
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   beautifulsoup4,
6   pythonOlder,
7   pandas,
8   python,
9   numpy,
10   scikit-learn,
11   scipy,
12   lxml,
13   matplotlib,
14   sarge,
17 buildPythonPackage rec {
18   pname = "trectools";
19   version = "0.0.49";
20   format = "setuptools";
22   disabled = pythonOlder "3.6";
24   src = fetchFromGitHub {
25     owner = "joaopalotti";
26     repo = pname;
27     # https://github.com/joaopalotti/trectools/issues/41
28     rev = "5c1d56e9cf955f45b5a1780ee6a82744d31e7a79";
29     hash = "sha256-Lh6sK2rxEdCsOUKHn1jgm+rsn8FK1f2po0UuZfZajBA=";
30   };
32   postPatch = ''
33     substituteInPlace setup.py \
34       --replace "bs4 >= 0.0.0.1" "beautifulsoup4 >= 4.11.1"
35   '';
37   propagatedBuildInputs = [
38     pandas
39     numpy
40     scikit-learn
41     scipy
42     lxml
43     beautifulsoup4
44     matplotlib
45     sarge
46   ];
48   checkPhase = ''
49     cd unittests
50     ${python.interpreter} -m unittest runner
51   '';
53   pythonImportsCheck = [ "trectools" ];
55   meta = with lib; {
56     homepage = "https://github.com/joaopalotti/trectools";
57     description = "Library for assisting Information Retrieval (IR) practitioners with TREC-like campaigns";
58     license = licenses.bsdOriginal;
59     maintainers = with maintainers; [ MoritzBoehme ];
60   };