nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 stdenv,
6 requests,
7 numpy,
8 pandas,
9 scipy,
10 statsmodels,
11 patsy,
12 scikit-learn,
13 tqdm,
14 dask,
15 distributed,
16 stumpy,
17 cloudpickle,
18 pytestCheckHook,
19 pytest-cov-stub,
20 pytest-xdist,
21 mock,
22 matplotlib,
23 seaborn,
24 ipython,
25 notebook,
26 pandas-datareader,
27 setuptools,
28 pywavelets,
29}:
30
31buildPythonPackage rec {
32 pname = "tsfresh";
33 version = "0.21.1";
34 pyproject = true;
35
36 src = fetchFromGitHub {
37 owner = "blue-yonder";
38 repo = "tsfresh";
39 tag = "v${version}";
40 hash = "sha256-KwUI33t5KFcTUWdSDg81OPbNn5SYv4Gw/0dPjCB502w=";
41 };
42
43 patches = [
44 # The pyscaffold is not a build dependency but just a python project bootstrapping tool, so we do not need it
45 ./remove-pyscaffold.patch
46 ];
47
48 dependencies = [
49 setuptools
50 requests
51 numpy
52 pandas
53 scipy
54 statsmodels
55 patsy
56 scikit-learn
57 tqdm
58 dask
59 distributed
60 stumpy
61 cloudpickle
62 pywavelets
63 ]
64 ++ dask.optional-dependencies.dataframe;
65
66 # python-datareader is disabled on Python 3.12+ and is require only for checks.
67 doCheck = !pandas-datareader.disabled;
68
69 nativeCheckInputs = [
70 pytestCheckHook
71 pytest-cov-stub
72 pytest-xdist
73 mock
74 matplotlib
75 seaborn
76 ipython
77 notebook
78 pandas-datareader
79 ];
80
81 disabledTests = [
82 # touches network
83 "test_relevant_extraction"
84 "test_characteristics_downloaded_robot_execution_failures"
85 "test_index"
86 "test_binary_target_is_default"
87 "test_characteristics_downloaded_robot_execution_failures"
88 "test_extraction_runs_through"
89 "test_multilabel_target_on_request"
90 ]
91 ++ lib.optionals stdenv.hostPlatform.isDarwin [
92 # RuntimeError: Cluster failed to start: [Errno 1] Operation not permitted
93 # may require extra privileges on darwin
94 "test_local_dask_cluster_extraction_one_worker"
95 "test_local_dask_cluster_extraction_two_worker"
96 "test_dask_cluster_extraction_one_worker"
97 "test_dask_cluster_extraction_two_workers"
98 ];
99
100 pythonImportsCheck = [ "tsfresh" ];
101
102 meta = {
103 description = "Automatic extraction of relevant features from time series";
104 mainProgram = "run_tsfresh";
105 homepage = "https://github.com/blue-yonder/tsfresh";
106 changelog = "https://github.com/blue-yonder/tsfresh/blob/${src.tag}/CHANGES.rst";
107 license = lib.licenses.mit;
108 maintainers = [ ];
109 };
110}