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

Streamline Dask Imports #871

Open
aGuyLearning opened this issue Feb 26, 2025 · 0 comments
Open

Streamline Dask Imports #871

aGuyLearning opened this issue Feb 26, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@aGuyLearning
Copy link
Collaborator

Description of feature

As of now we are duplicating the following:


if TYPE_CHECKING:
    from collections.abc import Collection

    from anndata import AnnData

try:
    import dask.array as da

    DASK_AVAILABLE = True
except ImportError:
    DASK_AVAILABLE = False

We should look into handeling this in a central location similar to the solution scanpy found.
Meaning we have a _compat.py file containing this logic and importing dask from there. So just one line. We could then throw an error, if a user tries to import dask

@aGuyLearning aGuyLearning added the enhancement New feature or request label Feb 26, 2025
@aGuyLearning aGuyLearning self-assigned this Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant