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