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