Informative repr for streamz when ipywidgets is not installed
mrocklin opened this issue · 2 comments
Currently if the user does not have ipywidgets
installed then running something like the following in a notebook produces no output
import streamz.dataframe
df = streamz.dataframe.Random()
df.tail()
It might be nicer to include a message encouraging users to install ipywidgets in this case.
Good point. This should be easy to fix.
Do you happen to have a convenient mock/fixture for having a package in the env raise ImportError within a test?
I do not personally, no. One way to solve this would be to install ipywidgets in some CI runs but not in others or to have a minimal install run. Then one would have a test that checked that "install ipywidgets" in df.__ipywidget_repr__
(I forget the exact protocol there) if ipywidgets is not installed.
That may be too much work for this case though