about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/tsfresh
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/tsfresh')
-rw-r--r--nixpkgs/pkgs/development/python-modules/tsfresh/default.nix93
-rw-r--r--nixpkgs/pkgs/development/python-modules/tsfresh/remove-pyscaffold.patch14
-rw-r--r--nixpkgs/pkgs/development/python-modules/tsfresh/remove-pytest-coverage-flags.patch15
3 files changed, 122 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/tsfresh/default.nix b/nixpkgs/pkgs/development/python-modules/tsfresh/default.nix
new file mode 100644
index 000000000000..36a93a540051
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/tsfresh/default.nix
@@ -0,0 +1,93 @@
+{ 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.1";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "blue-yonder";
+    repo = "tsfresh";
+    rev = "v${version}";
+    hash = "sha256-JmdP/6aTnuYsBRiRq9zZng3xNYhOdr9V8bp1trAv508=";
+  };
+
+  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";
+    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 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/python-modules/tsfresh/remove-pyscaffold.patch b/nixpkgs/pkgs/development/python-modules/tsfresh/remove-pyscaffold.patch
new file mode 100644
index 000000000000..b77f35cca704
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/tsfresh/remove-pyscaffold.patch
@@ -0,0 +1,14 @@
+diff --git a/setup.cfg b/setup.cfg
+index e29e54e..75c3210 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -29,9 +29,6 @@ classifier =
+ 
+ [options]
+ packages = find:
+-# DON'T CHANGE THE FOLLOWING LINE! IT WILL BE UPDATED BY PYSCAFFOLD!
+-setup_requires =
+-   pyscaffold>=3.3a0,<4
+ # Add here dependencies of your project (semicolon/line-separated), e.g.
+ install_requires =
+     requests>=2.9.1
diff --git a/nixpkgs/pkgs/development/python-modules/tsfresh/remove-pytest-coverage-flags.patch b/nixpkgs/pkgs/development/python-modules/tsfresh/remove-pytest-coverage-flags.patch
new file mode 100644
index 000000000000..86b29606a6e3
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/tsfresh/remove-pytest-coverage-flags.patch
@@ -0,0 +1,15 @@
+diff --git a/setup.cfg b/setup.cfg
+index e29e54e..fe8892f 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -99,10 +99,6 @@ extras = True
+ # e.g. --cov-report html (or xml) for html/xml output or --junitxml junit.xml
+ # in order to write a coverage file that can be read by Jenkins.
+ junit_family = xunit2
+-addopts =
+-    --cov tsfresh --cov-report term-missing
+-    --verbose
+-    #-n auto
+ testpaths = tests
+ filterwarnings =
+