Skip to content

Commit

Permalink
Make Dask and Distributed optional dependencies
Browse files Browse the repository at this point in the history
Dask was de facto optional already (see the guarded import in
tsfresh/feature_extraction/data.py), but before this commit it was
installed by default.

Distributed is imported only to support Dask, when the classes
ClusterDaskDistribution or LocalDaskDistribution are used, so it is not
needed if Dask is not imported.

To install tsfresh with those dependencies, one can do:

    pip install -e ".[dask]"

This is needed, for example, to run the test suite. The documentation
has been updated accordingly.
  • Loading branch information
lifepillar committed Jan 26, 2024
1 parent e2dfc6f commit 154504a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/text/how_to_contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Install all the relevant python packages with
.. code::
cd /path/to/tsfresh
pip install -e ".[testing]"
pip install -e ".[dask,testing]"
pre-commit install
Expand Down
9 changes: 9 additions & 0 deletions docs/text/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ As the compiled tsfresh package is hosted on the Python Package Index (PyPI) you
pip install tsfresh
If you need to work with large time series data that may not fit in memory, install tsfresh with
`Dask <https://www.dask.org>`_:

.. code:: shell
pip install tsfresh[dask]
See also :ref:`large-data-label`.


Dive in
-------
Expand Down
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ install_requires =
patsy>=0.4.1
scikit-learn>=0.22.0
tqdm>=4.10.0
dask[dataframe]>=2.9.0
distributed>=2.11.0
stumpy>=1.7.2
cloudpickle

Expand All @@ -56,6 +54,9 @@ exclude =
tests*

[options.extras_require]
dask =
dask[dataframe]>=2.9.0
distributed>=2.11.0
matrixprofile =
matrixprofile>=1.1.10,<2.0.0

Expand Down

0 comments on commit 154504a

Please sign in to comment.