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 bokeh an optional install requirement #7363

Open
gabicca opened this issue Nov 30, 2022 · 4 comments
Open

Make bokeh an optional install requirement #7363

gabicca opened this issue Nov 30, 2022 · 4 comments
Labels
dependencies Pull requests that update a dependency file good second issue Clearly described, educational, but less trivial than "good first issue".

Comments

@gabicca
Copy link

gabicca commented Nov 30, 2022

At the moment distributed does not include bokeh in its requirements at all. But it contains features that break without it. I'd like to ask that you include bokeh as optional requirement in your package, so that users can easily install everything they need.

Since distributed uses setup.py, you can do this by adding it to extras_require (https://extras-require.readthedocs.io/en/latest/).

@gjoseph92
Copy link
Collaborator

Seems reasonable to me to move the diagnostics extra from dask to distributed. I'm wondering if historically, the idea was "you should install distributed through dask, not on its own"—maybe @jrbourbeau would know?

@gjoseph92 gjoseph92 added good second issue Clearly described, educational, but less trivial than "good first issue". dependencies Pull requests that update a dependency file labels Dec 1, 2022
@gjoseph92
Copy link
Collaborator

@jrbourbeau any more thoughts here? This still seems like a pain point #7512

@fjetter
Copy link
Member

fjetter commented Feb 9, 2023

I'm wondering if historically, the idea was "you should install distributed through dask, not on its own"—maybe @jrbourbeau would know?

I would argue this is still the case. There is typically no point in installing distributed as a standalone since it will inevitably install dask as well.

distributed itself currently does not have any extra requirements and I'm not eager to run into any pinning issues because dask and distributed definitions drift.

@gabicca you can install what you want by simply installing dask[distributed, diagnostics]. Would this work for you?

@gabicca
Copy link
Author

gabicca commented Feb 9, 2023

Hi @fjetter ,

I still disagree with this approach. It feels backwards. You're right, dask will be installed if you install distributed, because it's in distributed's requirements. But you can't specify if you want any optional requirements installed like that, because distributed doesn't have the right settings to give it optionals.

You say: "There is typically no point in installing distributed as a standalone since it will inevitably install dask as well." This doesn't really make sense. If you need distributed, then you should just install distributed and not specify dask as your dependency, since distributed will install it anyway. But now, if I want distributed with diagnostics (since really, that's a distributed feature and not, or not just, a dask feature), you can't just make it your dependency, because now you explicitly have to add dask[diagnostics] as well, sintead of just adding distributed[diagnostics] and not worry about dask anymore.

Sorry for the convoluted message, hopefully what I'm trying to say here gets across.

At the moment the only way we could solve this is add dask[diagnostics] into the requirements and we have distributed as a separate requirement. Yes, we could replace with dask[distributed, diagnostics] but that won't make much of a difference still.

Again, the main problem here, is that the [diagnostics] bit in dask is actually required by distributed; but you can't ask distributed itself to install all its diagnostics packages.

gjoseph92 added a commit to gjoseph92/sneks that referenced this issue Mar 9, 2023
dask/distributed#7363 would be nice here; pedantically, it's improper packaging practice to not have the extra directly in `distributed`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file good second issue Clearly described, educational, but less trivial than "good first issue".
Projects
None yet
Development

No branches or pull requests

3 participants