Conversation
|
That's quite neat! |
| """A container for logs.""" | ||
|
|
||
| def _widget(self): | ||
| from ipywidgets import HTML |
There was a problem hiding this comment.
What happens if ipywidgets isn't installed?
Also, do we need ipywidgets here? Would implementing a _repr_html_ method work instead?
def _repr_html_(self):
return "<pre><code>... "I think that this has the advantage of also rendering nicely in static notebooks.
Perhaps that wouldn't work for the accordion though, so maybe this isn't worth it.
There was a problem hiding this comment.
What happens if ipywidgets isn't installed?
I don't think obj._widget is called if ipywidgets is not importable.
|
We might also consider this within the core dask/distributed project and the |
|
I think that this is great, and would be happy to see it merged. @jacobtomlinson given the less-than-active maintenance response on some of these repositories I encourage you to self-merge in the future after a suitable time. I typically say something like "Merging in 24 hours if there are no further comments" and then merge away the next day. |
|
@mrocklin - what do you think we should here? I personally think this can be merged as is. |
Same, I say go for it |
|
Also, FWIW, I personally prefer squash-and-merge merging if you're comfortable with that |
Add a couple of new log classes which extend
stranddictto add some ipywidgets. This is aimed to make viewing logs easier.Each log is a string which is rendered as a
<code>block in anHTMLwidget. Then all logs are a dictionary of the log strings wrapped in an accordion view.Before
After
Would appreciate some pointers on testing ipywidgets stuff.