-
Notifications
You must be signed in to change notification settings - Fork 38
Use dependency injection for Jupyter Notebook deps #251
Conversation
I pulled the Notebook-specific references into I'm also passing along the The shims need a bit more work while I try to figure out how to handle events, etc. |
Is this backward compat with the old init api or do we have to update the bundlers and declare their version compatibility. (Better if its backward compat.) |
No, not backwards compat, but I can make that work. |
If it's not crazy to make it work, 👍 to keep it backward compat. Will make cross extension compatibility so much easier to reason about. |
I'm fine with passing in It seems that those two kernel related issues (as well as some shimming after each execution request) should be handled outside of DeclWidgets, in the dashboard server scripts themselves. This means that the dashboard server will then needs to also setup the Plus, trying to get the other toolkits working will likewise require some shimming inside of the dashboard server scripts. |
I'm fine with collecting all the shims in the dashboard server. I feel like, as the application container, it's responsible for configuring the environment properly for the various toolkits to work properly. |
Commit c9ca0f2 removes a few |
b288c1c
to
ee31459
Compare
Consider that passing the kernel is not enough. In the notebook, the kernel might not be available it might be restated. Gino B.
|
Getting the following test failures with this patch, which I don't see on
I took a quick look at the test, but nothing sticks out to me as to why it would fail with my changes. Any ideas? |
@deedubbu @lbustelo any insight (or are you guys talking face to face with @jhpedemonte)? |
All I can say is that I tried it locally and I also see it fail. The problem is that the failing tests are a mystery to my how they ever worked. They look like there might be timing issues. |
I've given a quick test of this branch on the notebook server and seems that it all is working. I was able to restart a kernel and reexec cells and everything seems to be working fine. |
Should allow us to use init.js/DeclWidgetModel.js outside of Notebook env. Fix `IPython` object references. Newer `new_widget` API takes 3rd param. `init()` should be backwards compat with older API. Use getter for kernel instance -- helps with case where kernel is restarted and a new kernel instance used. Fix tests which weren't properly testing server state. Ref jupyter#141 Ref jupyter#196 (c) Copyright IBM Corp. 2016
3a142be
to
1085b21
Compare
Paired with Javier to fix issue that was causing unit test failures. We also improved the tests to make them more reliable in the process. Reviewed changes, ran tests and several notebooks. Looks good. Merging. |
Use dependency injection for Jupyter Notebook deps
Should allow us to use init.js/DeclWidgetModel.js outside of Notebook env.
Ref #141
Ref #196