-
Notifications
You must be signed in to change notification settings - Fork 48
Conversation
Changes to Dockerfile.kernel and Makefile are definitely hacky and should be replaced. All necessary shims are currently in our |
805aa58
to
40ebe03
Compare
After latest changes and rebase to master, I'm now seeing this error on KG server (even with non-declwidgets notebook, like
|
Error is that python code is looking for |
Heh, so looks like other bits of code expect the From |
Need to open this against ipywidgets. /cc @jdfreder |
Have simple example at The full Walkthrough.ipynb from I tried to clean things up by automating cloning/building/installing of |
cellData.get_callbacks = function() { | ||
return that._get_callbacks(outputAreaModel); | ||
}; | ||
$cell.data('cell', cellData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not 100% sure if we need this block of code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a mimic of what the notebook provides today. Not sure decl widgets can do anything differently at the moment if it is to remain compatible with existing notebook.
With latest code:
|
20b5cdc
to
493e081
Compare
Added a couple of declwidgets examples. To use the taxi demo, you'll need to run:
This is because this demo requires some additional Polymer elements which aren't part of the base declwidgets installation. |
@@ -110,8 +130,10 @@ define(['jupyter-js-widgets'], function(Widgets) { | |||
* metadata: ??? | |||
*/ | |||
WidgetManager.prototype._create_comm = function(targetName, id, metadata) { | |||
// TODO Other Jupyter code seems to expect `metadata` to be passed in as `data`. Why? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the args are misaligned, can you open this upstream in ipywidgets?
After hacking around the
|
After a:
I got a message saying nothing to be done. Which is odd. Turns out the taxi demo is still in data (should be added to
Sure enough, there's no urth_components in there. What should be populating that? |
Updated patch with minor Makefile fixes to address @parente's build issues. |
make clean
make dev-install
make examples
make kill # so no old kernel gateway image is running!
make dev The server starts and most things work. I hit a few problems running the examples. Not sure if these are integration problems or decl widgets problems (cc @lbustelo). I did see that the Dockerfile.kernel is doing a pip install of the latest stable declarative widgets, but the Dockerfile.server is git cloning your branch. Mismatch between frontend and backend or is the backend (Python kernel-side) untouched? decl-widgets.ipynbWorks. decl-widgets-chart.ipynbExample 9 does not function. Get an error in the browser JS console when I pick from the drop downs.
decl-widgets-taxi-demo.ipynbAfter i pick a trip and click Load, the map / table did not show up in the next big blank area the first time I tried. I got this error in the console:
I refreshed and tried again, this time letting the page settle for a while before clicking. This time it worked. I think the first time, I picked something from the dropdown ahead of everything being fully initialized in the front and backend. The good old race condition of async frontend loads vs backend execution. The plot and other widgets further down the dashboard page do show up and work fine. test_layout_declarativewidgets.ipynbThe widgets appear. The dropdown widget shows choices, but doesn't allow me to select anything. No errors logged anywhere. |
This is also an error when running on jupyter.cloudet.xyz. I think @lbustelo said it was a "run all" issue, which should now be fixed on declwidgets master.
I think this may also be a "run all" problem.
Don't remember this one. Will check. |
Uploaded to jupyter.cloudet.xyz and the dropdown menu functions the same in the notebook as it does on our server: clicking items in dropdown menu does nothing. |
Ref jupyter#23 (c) Copyright IBM Corp. 2016
(c) Copyright IBM Corp. 2016
(c) Copyright IBM Corp. 2016
Also, don't build jquery into components. (c) Copyright IBM Corp. 2016
(c) Copyright IBM Corp. 2016
... instead of depending on local sibling dir (c) Copyright IBM Corp. 2016
On KG, we only need Python side of things, so no need to install declwidgets from source branch. (c) Copyright IBM Corp. 2016
... rather than depending on sibling git repo (c) Copyright IBM Corp. 2016
(c) Copyright IBM Corp. 2016
(c) Copyright IBM Corp. 2016
To make use of taxi demo, need to run `make examples` (c) Copyright IBM Corp. 2016
Move 'examples' folder to 'etc/notebooks' (c) Copyright IBM Corp. 2016
OK. I'm good with merging this as-is then. It's in the spirit of the original issue: simple demo to show the widgets working. You've gone above and beyond. 👍 |
9149155
to
a15ddca
Compare
[Issue 23] Support Declarative Widgets
Ref #23
Based on jupyter/declarativewidgets#157, which attempts to get Declarative Widgets running on new APIs. Had to make the following changes to that code:
elements/urth-core-bind/dom-bind-behavior.html
, changePolymer.DomApi
toPolymer.TreeApi
. This may have already been fixed in DeclWidgets master.nb-extension/js/widgets/DeclWidgetModel.js
, replace use ofnbextensions/widgets/widgets/js/manager
&nbextensions/widgets/widgets/js/widget
withjupyter-js-widgets
To build:
make build
-- 2nd container will failmake run-kernel-gateway-with-widgets
make dev
Status: Shows decl widgets but they don't function (error in console when clicking Invoke button).