-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundler extension API #1579
Bundler extension API #1579
Conversation
@@ -0,0 +1,259 @@ | |||
# Copyright (c) Jupyter Development Team. |
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.
It might be nice to put this file inside notebook/bundler so it's all self contained.
* Change handler for consistency with nbconvert * Change bundler function API to take ContentManager models * Change CLI to work as jupyter bundler * Change UI to fit into existing template / JS structure (c) Copyright IBM Corp. 2016
Based on first review by @minrk * bundlerextension for consistency * Move CLI entry point into bundler package * Add bundler/__main__.py (c) Copyright IBM Corp. 2016
(c) Copyright IBM Corp. 2016
@minrk Do you think this is reasonable to target for 4.3 instead of 5.0? There's only new API, no backward incompatibility. It would help us move the dashboard bundlers away from their dependency on another extension (jupyter_cms) sooner rather than later. |
Cleanup more bundler vs bundlerextension refs (c) Copyright IBM Corp. 2016
(c) Copyright IBM Corp. 2016
(c) Copyright IBM Corp. 2016
It has no instance state. It should be a module that bundlers optionally import. (c) Copyright IBM Corp. 2016
(c) Copyright IBM Corp. 2016
(c) Copyright IBM Corp. 2016
(c) Copyright IBM Corp. 2016
(c) Copyright IBM Corp. 2016
It could be for 4.3, if we do that. We may be at the point of only doing bugfix backports for 4.x at this point, though. |
Include label and module name (if available) to help a user remember which Python module provides which bundler(s) (c) Copyright IBM Corp. 2016
In notebook.json config (c) Copyright IBM Corp. 2016
For the docs, I'm thinking of adding a new Does this sound reasonable? /cc @willingc |
Sounds good to me |
* Improve some docstrings too * Fix a busted extension link along the way (c) Copyright IBM Corp. 2016
* Add tarball_bundler example inline * Add tarball_bundler example to bundler doc too * Cross-ref from distributing doc to doc about writing extensions (c) Copyright IBM Corp. 2016
I've checked off everything I had planned on my list here. There's examples, tests, doc, and the implementation itself. |
@parente Looks good to me. Thanks! |
I think this is ready for a final review / merge. Adding @Carreau and @ellisonbg who commented on the original associated issue and cc'ed @fperez @jasongrout. |
It would be desirable to move this pull request towards merge soon. We have an exploitation of the cms (https://www.youtube.com/watch?v=xSRZgxAf9BQ) and a regular notebook core API would be what we would prefer. |
@parente I'll review this. A couple questions:
|
@gnestor Thanks for having a look!
This is definitely a good place to start. There's a tarball bundler in there too that you can try also.
jupyter/dashboards_bundlers#46 makes the dashboards bundlers extension compatible with this new API. If you're feeling brave, you might try testing that.It'll take a bit of doing, namely getting the dashboard extension installed, the bundler extension built with the PR installed, and the dashboard server running to see if the bundler properly packs and sends one of the example notebook-dashboards to the dashboard server properly. If that's too much overhead (and it probably is), don't sweat it. I did test it once already when creating that PR. If this merges in, I'll test it against notebook HEAD. |
Yep, the zip and tarball bundlers worked for me! It took about 20-30 seconds for the first zip to fulfill. Each subsequent one was instant, along with the tarball. |
@minrk How do you feel about merging this? |
@gnestor 👍 |
@parente Ya please do because it could be my environment... |
@gnestor I pulled master just now and ran:
Then I opened a notebook and triggered the bundler menu item. No issues. I next tried the following outside a conda env:
No issues again. |
@parente Ok good. Great work, this is an exciting addition! Any bundle as Gist bundlers yet? If not, that could be my first bundler contribution... |
For #1469