[IPython-dev] [nbconvert] Reining in the number of constructor arguments

Brian Granger ellisonbg at gmail.com
Sat Dec 1 15:12:06 EST 2012

Thomas makes a very good point:

If the nbcovert code is getting complex enough that these issues are
coming up, then there is no question about what we should do.  We
should handle it exactly like we do everywhere else in the IPython
code base.  The top level converter classes should inherit from
Configurable and the command line programs should be implemented as
Applications.  All of the config file stuff and command line options
will then be handled automatically.  This approach allows the
converters to be configured in numerous ways:

* Command ilne
* Passing kwargs to the classes.
* Setting attributes
* Config files

Is there any reason we wouldn't do this?

On Sat, Dec 1, 2012 at 3:26 AM, Thomas Kluyver <takowl at gmail.com> wrote:
> On 1 December 2012 00:34, David Warde-Farley <d.warde.farley at gmail.com>
> wrote:
>> It seems like the right place for this code would be in a class method
>> attached to each
>> Converter class. Then nbconvert.py could iterate over the classes it
>> knows about and
>> call cls.cli_argument_parser(), and add that to the global one.
> Have a look at the Configurable/Application framework we use in the main
> IPython codebase - I think this should be flexible enough to use in
> nbconvert as well.
> Thomas
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu and ellisonbg at gmail.com

More information about the IPython-dev mailing list