These are chat archives for ipython/ipython

19th
Nov 2014
Jason Grout
@jasongrout
Nov 19 2014 00:12
Perhaps a success and error callback function would be easier to do generally
Min RK
@minrk
Nov 19 2014 00:26
I think if linked traitlets cannot actually be linked (e.g. an exception can be raised due to an invalid value), then they shouldn't be linked in the first place, so I would be -1 on suppressing such errors.
Sylvain Corlay
@SylvainCorlay
Nov 19 2014 01:08
I have been using traitlet validation for checking bounds on numbers, length of strings or the dimensionality of an array.
I mean that traitlets may be linked, but not for all values...
Sylvain Corlay
@SylvainCorlay
Nov 19 2014 01:20
you see what I mean?
Sylvain Corlay
@SylvainCorlay
Nov 19 2014 16:41
Another useful addition to link is the possibility to add a comparison predicate between traitlets.
-> Numpy and Pandas trait types are such that == and != return arrays/dataframes.
Jason Grout
@jasongrout
Nov 19 2014 17:22
@minrk - it wouldn't be suppressing the errors, it would be catching them and doing something with them.
Sylvain Corlay
@SylvainCorlay
Nov 19 2014 17:31
the default callback for failure could just re-send the exception
Jason Grout
@jasongrout
Nov 19 2014 17:34
@jdfreder? I have some questions about the promises pr that was merged
Sylvain Corlay
@SylvainCorlay
Nov 19 2014 17:54
another way to resolve it is not to test for inequality in IPython.utils.traitlets.link or dlink
Jason Grout
@jasongrout
Nov 19 2014 17:56
so don't be smart, but just set things? I could see that happening.
Jonathan Frederic
@jdfreder
Nov 19 2014 17:59
@jasongrout shoot
also, if we find something, I can open a PR to fix it
I've just been scooting along on the persistence stuff
Jonathan Frederic
@jdfreder
Nov 19 2014 18:07
@jasongrout did you still want to get ipython/ipython#6675 rebased and merged before your talk this week? Or did you already give your talk?
Kyle Kelley
@rgbkrk
Nov 19 2014 18:10
@minrk Do you think tornado would accept adding get_json_body to RequestHandler?
Jason Grout
@jasongrout
Nov 19 2014 18:39
@jdfreder - I'm working on a PR
and my talk is this Saturday, I'll try to get #6675 before then.
Min RK
@minrk
Nov 19 2014 19:17
@rgbkrk I'm not sure. Requests has similar behavior, so maybe.
get_json_body has more magic than I think they would accept. I think they would want a raw loads that raises instead of returning None.
Jason Grout
@jasongrout
Nov 19 2014 19:23
@jdfreder: ipython/ipython#6988
Jonathan Frederic
@jdfreder
Nov 19 2014 19:24
thanks, looking
Jonathan Frederic
@jdfreder
Nov 19 2014 19:32
@jasongrout one comment inline
Jason Grout
@jasongrout
Nov 19 2014 19:43
doe
done
Jonathan Frederic
@jdfreder
Nov 19 2014 19:51
okay I pinged @takluyver for a second review, otherwise looks good to me (and it looks like it will pass Travis too)
Jason Grout
@jasongrout
Nov 19 2014 19:59
great; thanks
Sylvain Corlay
@SylvainCorlay
Nov 19 2014 20:10
just opened a pr removing the comparisons in traitlet links to make it work with numpy arrays (which overload the comparison operators)
Jonathan Frederic
@jdfreder
Nov 19 2014 20:13
@SylvainCorlay I'll take a look
Jonathan Frederic
@jdfreder
Nov 19 2014 20:32
I left a comment in the PR : )
Sylvain Corlay
@SylvainCorlay
Nov 19 2014 20:49
me too :) Is everyone fine with the Union traitlet type?
Kyle Kelley
@rgbkrk
Nov 19 2014 20:49
Totally
Jonathan Frederic
@jdfreder
Nov 19 2014 20:51
Yes
Sylvain Corlay
@SylvainCorlay
Nov 19 2014 20:56
then let' s just wait for someone to find the merge button.
I am still thinking of the merge-this-now.com domain name
Kyle Kelley
@rgbkrk
Nov 19 2014 20:57
lol
It's not my domain area on IPython
it would be weird if I merged
@jdfreder can jam it
Sylvain Corlay
@SylvainCorlay
Nov 19 2014 20:58
yeah, but you could help with the cross domain issue of merge-this-now.com -> github does not like iframes :)
Jonathan Frederic
@jdfreder
Nov 19 2014 20:58
@SylvainCorlay I can't find the merge button
;)
Kyle Kelley
@rgbkrk
Nov 19 2014 21:00
It's the one labeled "close"
:trollface:
Sylvain Corlay
@SylvainCorlay
Nov 19 2014 21:01
no kidding, the "close" button on PRs really looks like a "cancel" button for comments
Jonathan Frederic
@jdfreder
Nov 19 2014 21:02
@rgbkrk ahh you tricked me! flips table
jdfreder @jdfreder flips his table
Kyle Kelley
@rgbkrk
Nov 19 2014 21:02
@SylvainCorlay Yeah, I hate that. I've done it before and had to re-open
Sylvain Corlay
@SylvainCorlay
Nov 19 2014 21:05
thanks!
Kyle Kelley
@rgbkrk
Nov 19 2014 22:05
I think the text editor PR is good to start with, should merge in its free of bells and whistles fashion
Otherwise all my comments are going to be about future things we should probably think about doing
Jonathan Frederic
@jdfreder
Nov 19 2014 22:21
That's @takluyver 's PR ? I'll take a look
Jason Grout
@jasongrout
Nov 19 2014 23:40
@jdfreder: viewlists at ipython/ipython#6990
Jonathan Frederic
@jdfreder
Nov 19 2014 23:41
Thanks @jasongrout , looking
Jason Grout
@jasongrout
Nov 19 2014 23:41
awesome, thanks.