Skip to content

Async download and caching in op module #231

Description

@Mr-Milk

Description of feature

Thanks for developing such a nice package.

The download of a large resource in the op module can be a bit time consuming. I wonder if we could make the download asynchronously and return a future object instead.

Potential API design:

markers = dc.op.resource('MSigDB', as_future=True)  # Non-blocking
markers = markers.result()  # Get the result

For caching, since the database is from OmniPath and hosted by your team, the etag would be a graceful solution. This is also how huggingface handle file caching.

I'm happy to submit a PR for the async download part.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions