Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Dask and Distributed optional dependencies #1061

Merged
merged 2 commits into from
Jan 28, 2024

Conversation

lifepillar
Copy link
Contributor

@lifepillar lifepillar commented Jan 26, 2024

Addresses #1060.

Dask was de facto optional already (see the guarded import in tsfresh/feature_extraction/data.py), but before this PR 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.

Copy link
Collaborator

@nils-braun nils-braun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Could you make sure the CI pipeline is using the new dask extra dependency as well?
You can also (as an alternative) just reference the dask extra dependency from the testing extra dependency.

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.
Copy link
Collaborator

@nils-braun nils-braun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lifepillar! I just changed the "tsfresh[dask]" to "%(dask)s" in the setup.cfg, because it is more general - but other than that LGTM!

@nils-braun nils-braun enabled auto-merge (squash) January 28, 2024 08:56
@codecov-commenter
Copy link

codecov-commenter commented Jan 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e2dfc6f) 93.43% compared to head (1e5cac7) 93.85%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1061      +/-   ##
==========================================
+ Coverage   93.43%   93.85%   +0.42%     
==========================================
  Files          20       20              
  Lines        1888     1888              
  Branches      372      372              
==========================================
+ Hits         1764     1772       +8     
+ Misses         85       78       -7     
+ Partials       39       38       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nils-braun nils-braun merged commit a45588d into blue-yonder:main Jan 28, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants