These are chat archives for ipython/ipython

18th
Jun 2015
Sylvain Corlay
@SylvainCorlay
Jun 18 2015 00:03
now on pypi
Min RK
@minrk
Jun 18 2015 01:42
super cool
Sylvain Corlay
@SylvainCorlay
Jun 18 2015 01:49
I am improving the demo a bit.
hey, a call to IPython.display in a on_trait_change handler does not work. How can I rebind the output to some cell?
Sylvain Corlay
@SylvainCorlay
Jun 18 2015 02:28
nevermind
Jonathan Frederic
@jdfreder
Jun 18 2015 17:08
@cameronoelsen @rmorshea @svurens hey CalPoly devs! Here's a good public channel you should use when asking development questions. You should be heard by most of the other devs in this room, in addition to @ellisonbg and I.
Ryan Morshead
@rmorshea
Jun 18 2015 22:33
This message was deleted
Jonathan Frederic
@jdfreder
Jun 18 2015 22:47
@rmorshea did you figure out what you were asking?
My understanding is that the classes would remain
Ryan Morshead
@rmorshea
Jun 18 2015 22:48
so you don't think the formatters should TraitTypes?
Jonathan Frederic
@jdfreder
Jun 18 2015 22:48
and any attributes of them that may be useful to configure would become traitlets
Ryan Morshead
@rmorshea
Jun 18 2015 22:48
*should be
Jonathan Frederic
@jdfreder
Jun 18 2015 22:50
TraitTypes? No, I think you may be confused about something. I think those classes should inherit from configurable, and get passsed the global configuration object upon construction. Within the classes, traits should be used where they can.
For other classes, in which those classes can be specified, and Instance trait type should be used
i.e. If class AxisLabel has an attribute _text_formatter, which can contain a formatter class, it should become a trait named text_fromater of type Instance(of TextFormatter)
Where TextFormatter is a class that inherits from configurable
(those are just made up classes, I was trying to think of something relevant to your situation)
Ryan Morshead
@rmorshea
Jun 18 2015 23:01
Though, that's somewhat applicable, I don't think I've seen anything for which that example would be directly applicable. I'll try and find something to explain how they're doing things.
Jonathan Frederic
@jdfreder
Jun 18 2015 23:07
Well, I don't think you want to "restructure" anything, if possible.
Minor refactoring within the classes is OK though
Ryan Morshead
@rmorshea
Jun 18 2015 23:15
Ya, restructuring might be a bad word to use. However, am I wrong in thinking that TraitTypes should be used for more than just type checking. It seems like they would also be useful for doing the job of a formatter through their validate method.