summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/quantulum3/default.nix
blob: 580b64bec41e6aee644338688afcc45ed04e0bfa (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  # build inputs
  inflect,
  num2words,
  numpy,
  scipy,
  scikit-learn,
  joblib,
  wikipedia,
  stemming,
  setuptools,
}:
let
  pname = "quantulum3";
  version = "0.9.2";
in
buildPythonPackage {
  inherit version pname;
  pyproject = true;

  # Pypi source package doesn't contain tests
  src = fetchFromGitHub {
    owner = "nielstron";
    repo = "quantulum3";
    rev = "9dafd76d3586aa5ea1b96164d86c73037e827294";
    hash = "sha256-fHztPeTbMp1aYsj+STYWzHgwdY0Q9078qXpXxtA8pPs=";
  };

  propagatedBuildInputs = [
    inflect
    num2words
    numpy
    scipy
    scikit-learn
    joblib
    wikipedia
    stemming
    setuptools
  ];

  pythonImportsCheck = [ "quantulum3" ];

  meta = {
    description = "Library for unit extraction - fork of quantulum for python3";
    mainProgram = "quantulum3-training";
    homepage = "https://github.com/nielstron/quantulum3";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ happysalada ];
  };
}