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

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

On 10/14/14, 7:15 PM, Thomas Kluyver wrote:
> Min & I discussed this over lunch today. We think that the way to get 
> the best of both worlds in form definition is to base the parameters 
> on the first cell, but supplement them with optional notebook 
> metadata. This will:
> - Make the easy cases easy: You can make a basic form from a notebook 
> without needing to fiddle with metadata.
> - Make the hard cases possible: The notebook metadata can be used to 
> provide extra information for all kinds of applications: display names 
> for fields, options for multiple-choice parameters, abbreviations for 
> command line arguments, and so forth.
> - Ensure that the notebook can be run without needing the form 
> interface. We feel this is important, because part of the attraction 
> of notebooks is that it's easy to run your code and see if you've made 
> a mistake, and you lose that if your code relies on parameters that 
> have to be set by machinery outside the notebook.

Yes, I totally agree on all three of these points.  "conda-launch" 
(you'll notice that is only the GH repo name: the actual Python module 
is called "ipyapp") aims to do exactly that, and provide full CLI-based 
or RESTful API for notebook invocation.

> I have just updated nbparameterise to do this. The example application 
> uses a display_name field from the metadata to display something nicer 
> than the variable name as the label for the form field. The API 
> exposes arbitrary metadata associated with the parameter, from 
> metadata.parameterise.<variable name>

Great.  I look forward to exploring that.


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

More information about the IPython-dev mailing list