about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/tbats/default.nix
blob: 8976fef859d3432669887910e13d05c84a023af9 (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, numpy
, pmdarima
, scikit-learn
, scipy
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "tbats";
  version = "1.1.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "intive-DataScience";
    repo = "tbats";
    rev = version;
    hash = "sha256-f6QqDq/ffbnFBZRAT6KQRlqvZZSE+Pff2/o+htVabZI=";
  };

  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [
    numpy
    pmdarima
    scikit-learn
    scipy
  ];

  nativeCheckInputs = [ pytestCheckHook ];
  pytestFlagsArray = [
    # test_R folder is just for comparison of results with R lib
    # we need only test folder
    "test/"

    # several tests has same name, so we use --deselect instead of disableTests

    # Test execution is too long > 15 min
    "--deselect=test/tbats/TBATS_test.py::TestTBATS::test_fit_predict_trigonometric_seasonal"
  ];

  pythonImportsCheck = [ "tbats" ];

  meta = with lib; {
    description = "BATS and TBATS forecasting methods";
    homepage = "https://github.com/intive-DataScience/tbats";
    changelog = "https://github.com/intive-DataScience/tbats/releases/tag/${src.rev}";
    license = licenses.mit;
    maintainers = with maintainers; [ mbalatsko ];
  };
}