summary refs log tree commit diff
path: root/pkgs/development/python-modules/pmdarima/default.nix
blob: 17bde3ddf3c764b67812858334ec3a7b50697a6d (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
61
62
63
64
{ lib
, buildPythonPackage
, fetchFromGitHub
, cython
, joblib
, numpy
, pandas
, scikit-learn
, scipy
, statsmodels
, urllib3
, pythonOlder
, python
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "pmdarima";
  version = "2.0.3";
  format = "setuptools";

  disable = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "alkaline-ml";
    repo = "pmdarima";
    rev = "v${version}";
    hash = "sha256-uX4iZZ2deYqVWnqVZT6J0Djf2pXo7ug4MsOsPkKjvSU=";
  };

  nativeBuildInputs = [ cython ];

  propagatedBuildInputs = [
    joblib
    numpy
    pandas
    scikit-learn
    scipy
    statsmodels
    urllib3
  ];

  # Make sure we're running the tests for the actually installed
  # package, so that cython's compiled files are available.
  preCheck = ''
    cd $out/lib/${python.libPrefix}/site-packages
  '';

  nativeCheckInputs = [ pytestCheckHook ];
  disabledTests= [
    # touches internet
    "test_load_from_web"
  ];

  pythonImportsCheck = [ "pmdarima" ];

  meta = with lib; {
    description = "A statistical library designed to fill the void in Python's time series analysis capabilities, including the equivalent of R's auto.arima function";
    homepage = "https://github.com/alkaline-ml/pmdarima";
    changelog = "https://github.com/alkaline-ml/pmdarima/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ mbalatsko ];
  };
}