1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, cython
5, joblib
6, numpy
7, pandas
8, scikit-learn
9, scipy
10, statsmodels
11, urllib3
12, pythonOlder
13, python
14, pytestCheckHook
15}:
16
17buildPythonPackage rec {
18 pname = "pmdarima";
19 version = "2.0.4";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "alkaline-ml";
26 repo = "pmdarima";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-LHwPgQRB/vP3hBM8nqafoCrN3ZSRIMWLzqTqDOETOEc=";
29 };
30
31 nativeBuildInputs = [ cython ];
32
33 propagatedBuildInputs = [
34 joblib
35 numpy
36 pandas
37 scikit-learn
38 scipy
39 statsmodels
40 urllib3
41 ];
42
43 # Make sure we're running the tests for the actually installed
44 # package, so that cython's compiled files are available.
45 preCheck = ''
46 cd $out/lib/${python.libPrefix}/site-packages
47 '';
48
49 nativeCheckInputs = [ pytestCheckHook ];
50 disabledTests= [
51 # touches internet
52 "test_load_from_web"
53 ];
54
55 pythonImportsCheck = [ "pmdarima" ];
56
57 meta = with lib; {
58 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";
59 homepage = "https://github.com/alkaline-ml/pmdarima";
60 changelog = "https://github.com/alkaline-ml/pmdarima/releases/tag/v${version}";
61 license = licenses.mit;
62 maintainers = with maintainers; [ mbalatsko ];
63 };
64}