about summary refs log tree commit diff
path: root/pkgs/development/python-modules/tsfresh/default.nix
blob: 42cd12eb9d00f6810eb7637f469b4fba1041f412 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, requests
, numpy
, pandas
, scipy
, statsmodels
, patsy
, scikit-learn
, tqdm
, dask
, distributed
, stumpy
, cloudpickle
, pytestCheckHook
, pytest-xdist
, mock
, matplotlib
, seaborn
, ipython
, notebook
, pandas-datareader
}:

buildPythonPackage rec {
  pname = "tsfresh";
  version = "0.20.2";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "blue-yonder";
    repo = "tsfresh";
    rev = "refs/tags/v${version}";
    hash = "sha256-UTra+RAQnrv61NQ86xGYrUVYiycUAWhN/45F6/0ZvPI=";
  };

  patches = [
    # The pyscaffold is not a build dependency but just a python project bootstrapping tool, so we do not need it
    ./remove-pyscaffold.patch
    ./remove-pytest-coverage-flags.patch
  ];

  propagatedBuildInputs = [
    requests
    numpy
    pandas
    scipy
    statsmodels
    patsy
    scikit-learn
    tqdm
    dask
    distributed
    stumpy
    cloudpickle
  ] ++ dask.optional-dependencies.dataframe;

  nativeCheckInputs = [
    pytestCheckHook
    pytest-xdist
    mock
    matplotlib
    seaborn
    ipython
    notebook
    pandas-datareader
  ];

  disabledTests = [
    # touches network
    "test_relevant_extraction"
    "test_characteristics_downloaded_robot_execution_failures"
    "test_index"
    "test_binary_target_is_default"
    "test_characteristics_downloaded_robot_execution_failures"
    "test_extraction_runs_through"
    "test_multilabel_target_on_request"
  ];

  pythonImportsCheck = [ "tsfresh" ];

  meta = with lib; {
    description = "Automatic extraction of relevant features from time series";
    mainProgram = "run_tsfresh";
    homepage = "https://github.com/blue-yonder/tsfresh";
    changelog = "https://github.com/blue-yonder/tsfresh/blob/${src.rev}/CHANGES.rst";
    license = licenses.mit;
    maintainers = with maintainers; [ mbalatsko ];
  };
}