dashboards_server icon indicating copy to clipboard operation
dashboards_server copied to clipboard

WIP: Update to Jupyterlab 0.1.3

Open jhpedemonte opened this issue 9 years ago • 13 comments

Needed to properly build Jupyterlab 0.1.2

Tasks:

  • [x] Update our code to latest API changes in Jupyterlab (renderers, RenderMime, etc)
  • [x] Update to jupyter-js-services v0.17.0 (what is being used by Jupyterlab)
  • ~~[ ] Padding (in test_padding) seems to be off again.~~
  • [ ] Plotting libs broken
  • [ ] CodeMirror 5.18.0 breaks build.

jhpedemonte avatar Jul 28 '16 21:07 jhpedemonte

Making this WIP. They changed rendermime again. Yay!

jhpedemonte avatar Jul 28 '16 21:07 jhpedemonte

Everything is working with this patch except for matplotlib (test_layout & test_plotting_libs). Looks like messages trying to use matplotlib are being handled before register_target('matplotlib', ...) gets invoked.

jhpedemonte avatar Jul 28 '16 22:07 jhpedemonte

@blink1073 @jasongrout:

I'm getting Error: Object 'matplotlib' not found in registry when building against Jupyterlab 0.1.2 (everything works fine with v0.1.1). I never see call to register_target('matplotlib') before this error. Looks like perhaps a timing issue.

I notice that in src/notebook/output-area/widget.ts, the call to rendermime.render is not async. Could this be causing issue? Is the matplotlib JS not added to the DOM before handling incoming matplotlib comm messages?

jhpedemonte avatar Jul 28 '16 22:07 jhpedemonte

This is using %matplotlib notebook? I would not have expected that to work at all yet.

blink1073 avatar Jul 29 '16 01:07 blink1073

It's been working up until now. We did have to add some shim code to make it all work, though.

jhpedemonte avatar Jul 29 '16 02:07 jhpedemonte

I confess I haven't dealt much with the ipywidgets end of things. Jason has already left for week-long holiday and I am leaving tomorrow for a week as well. I'll see if I can figure something out this afternoon.

blink1073 avatar Jul 29 '16 14:07 blink1073

Also, we changed rendermime again in https://github.com/jupyter/jupyterlab/pull/560 (not released yet).

blink1073 avatar Jul 29 '16 15:07 blink1073

FYI @jasongrout, here's another example where we're not properly following semver, since this library depends on jupyterlab, we should be making minor releases, not patch releases.

blink1073 avatar Jul 29 '16 15:07 blink1073

OK. I think I'll just pin Jupyterlab to v0.1.1 for now, so we can continue working. And I'll continue investigation of v0.1.2+.

jhpedemonte avatar Jul 29 '16 16:07 jhpedemonte

Sounds good.

blink1073 avatar Jul 29 '16 16:07 blink1073

Got it working. Looks like the fixes in jupyter/jupyterlab#560 (specifically the commit Make rendering synchronous and cleanup) fixes the issues I was seeing. I updated this PR to work against v0.1.3 of Jupyterlab (not yet release).

jhpedemonte avatar Aug 02 '16 14:08 jhpedemonte

Great, glad you got it sorted. Hopefully we don't have to change this part of the code base too much anymore. ;)

blink1073 avatar Aug 02 '16 14:08 blink1073

Updated to use Jupyterlab 0.2.0. Ran into codemirror/CodeMirror#4190, which breaks our build. Got past it by temporarily building with CodeMirror 5.17.0.

Plotting libs are broken once again (yay!) but padding seems to be fine now.

jhpedemonte avatar Aug 22 '16 21:08 jhpedemonte