[IPython-dev] custom web notebook cells

Matthias BUSSONNIER bussonniermatthias at gmail.com
Fri Dec 14 08:43:21 EST 2012


Le 14 déc. 2012 à 14:13, Nicholas Bollweg a écrit :

> hi everybody! longtime user, first time poster.
> 
> I've been kicking around a lot of ideas of things to do with ipython notebook: while the bulk of stuff is clientside, to get there, i think i need to do custom cells, which is a little more than ellisonbg's "jsonhandlers" branch does. further, as the specific capabilities exposed will require some pretty big depndencies (pdf generation, numpy, etc.) I am thinking about doing everything as python modules that are installed into the environment, rather than as purely drop-in javascript assets.
> 
> i've started the work on github here:
> https://github.com/bollwyvl/ipython/tree/custom_cells
> 
> and a strawman cell provider here (does not contain working code, though it does load!):
> https://github.com/bollwyvl/ipython/tree/blockly
> 
> any insight is welcome!

I'm curious of what kind of cell you wish to create…

> 
> To get my stuff in, i have used the setuptools iter_entry_points method I am familiar with... and defined a new entry_point, ipnotebook. plugins provide their list of assets and where one might find their static paths. can anyone comment on how this is (potentially) different from The IPython Way? The extensions stuff in the doc didn't look like they would be useful, so i gave up on trying to use that.
> 
> the structure of working with cells in master is pretty rigid right now, with the enumerated list of cells type in the code explicitly in the front end in several places, js and html. my initial work (in a addition to inadvertently recreating some of ellisonbg's work on the tornado app) has been to refactor all of those cases of adding buttons or whatever into something that looks at a window.IPython-scope plugin registry.... this is defined in cell.js right now, but maybe should be someplace else.

I had a quick look, but it looks nice (and documented Javascript people !!! ).
I think it is already worth a PR agains IPython. 

> after i did discover ellisonbg's stuff, i saw the most recent work was on dependencies... during my stuff, i will look into frontend and backend asset managers: require.js

Yes, we were thinking of require.js, but none of us did get the time to really look at it. 
Also something we tend to forgot is that Fernando Explicitely asked that we found a way to test the javascript before starting any major change in javascript…
which could be really helpful to test for regression if we move this way.

> and webassets come to mind. this would have the pleasant benefit of clearing up some of the mathjax complications, and would make plugin development a lot more robust, if not simpler... also, if a user installed the kitchen sink of plugins, which started adding a lot of javascript assets, ideally a user should not see significant notebook slowdown until they were actually using new features.

For the rest I think Brian will be the best to answer on what are his project for that.

> looking forward to working on this over the holidays, and would love to have some fun things to show come 2013!

Sure, lot's of awesome things, already huge number of PR unreviewed that are waiting to be refined to be merged.


> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20121214/af55fe21/attachment.html>


More information about the IPython-dev mailing list