summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/tbats/default.nix
blob: b1f71c1a0a66c1c4bb8da5c4aee493c760d96922 (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
54
55
56
57
{
  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 ];

  enabledTestPaths = [
    # 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
  dilsabledTestPaths = [
    # Test execution is too long > 15 min
    "test/tbats/TBATS_test.py::TestTBATS::test_fit_predict_trigonometric_seasonal"
  ];

  pythonImportsCheck = [ "tbats" ];

  meta = {
    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 = lib.licenses.mit;
    maintainers = [ ];
  };
}