vanvalenlab / deepcell-tf

Deep Learning Library for Single Cell Analysis
https://deepcell.readthedocs.io
Other
402 stars 90 forks source link

Fix scikit-image dependency specification #675

Closed rossbar closed 11 months ago

rossbar commented 11 months ago

What

There have been several deprecations and expirations of deprecations in scikit-image as of v0.18 that have affected the codebase. We caught most of these usages in vanvalenlab/deepcell-toolbox#131. Unfortunately, due to internal usage of functools.wraps, the stacklevel of some of the calls containing deprecated kwargs had changed, which prevented the DeprecationWarnings from being visible within deepcell-tf itself. This leads to all-out failures if scikit-image v0.21 is installed.

This PR fixes the situation by:

Additional context

This should fix the situation for those who are just installing deepcell. Things get more complicated if e.g. a user has installed deepcell-toolbox separately. There will likely need to be changes along the lines of `vanvalenlab/deepcell-toolbox#136 as well for better coverage of different installation orders, etc.

Why

Without the lower-bound pin, it is possible to install deepcell with a non-functional environment (i.e. if scikit-image is installed as a transitive dependency by some other package in the environment).