[IPython-dev] Nbparameterise: simple forms for notebook input

Ian Stokes-Rees ijstokes at alumni.uwaterloo.ca
Wed Oct 15 10:23:52 EDT 2014

Thomas, out of order response:

On 10/10/14, 2:02 PM, Thomas Kluyver wrote:

> Looking through the description of conda-launch, I think what I want 
> to think about most is the different ways of describing the input 
> parameters. Conda-launch uses JSON metadata that is potentially more 
> flexible, but very distinct from the normal workflow of writing a 
> notebook. Nbparameterise currently looks for an initial "definitions 
> cell", which is less extensible, but very natural for the notebook 
> author. Part of me wants to generalise nbparameterise to handle all 
> possible ways of describing inputs, but another part of me wants to 
> hammer out a common way of doing this, so notebook authors don't have 
> to learn different things for different systems. I'll keep thinking 
> about it.

My idea is that the notebook should be stand-alone runable (i.e. "play" 
button in IPython Notebook), so the first cell contains "prototype" or 
"example" inputs for all the parameters.  This acts as "template based 
documentation" for what the parameters are, and also means it is 
possible to "run" a notebook without providing any inputs.

A feature I'd like to add is some piece of meta-data that can override 
this behavior to encode the "defaults" (or no defaults) into the 
meta-data, thus making the "first cell prototype" optional.

> Thanks Ian - conda-launch was one of a few projects that prompted me 
> to work on this. In particular, great though conda is, I don't think 
> creating forms and executing notebooks should be tied to a particular 
> packaging system.

It isn't.  Go ahead and "python setup.py install" it.  The only piece 
that will silently not work is the dependency specification part to 
create a conda environment to execute the notebook in.  The commands are 
called "conda-appserver" (to start a server that will 'serve' notebooks 
as HTML forms and expose the RESTful API, and then return the rendered 
result from 'running' them), and "conda-launch" which is the pure-CLI 
version.  Alias those to some other name if you don't like "conda" in 
the command name.  You don't need conda installed.

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

More information about the IPython-dev mailing list