These are chat archives for ipython/ipython

20th
Mar 2015
Matthias Bussonnier
@Carreau
Mar 20 2015 00:39
Seem fine to me.
K.-Michael Aye
@michaelaye
Mar 20 2015 01:31
I was wondering if the packaging teams like anaconda could help with reducing the disruption from the repo splitting by creating new meta-packages?
Thomas Kluyver
@takluyver
Mar 20 2015 01:40
I expect they will. There shouldn't be too much disruption for people just using released versions of IPython.
we will also have some backwards compatibility shims, and probably a jupyter metapackage
the main disruption will be for people developing or running from master
K.-Michael Aye
@michaelaye
Mar 20 2015 01:41
well, that’s the thing, I’m not a dev but I love using master. ;)
Thomas Kluyver
@takluyver
Mar 20 2015 01:53
well, the good news is that, if you like, you'll be able to use master of just the notebook, say, while sticking with stable versions of other components. The bad news is that if you want to use master of all the things, it's probably going to get harder.
Matthias Bussonnier
@Carreau
Mar 20 2015 01:54
@michaelaye if you use master, you are a dev :-)
Thomas Kluyver
@takluyver
Mar 20 2015 01:54
Also, we're probably going to require some JS dev tools, like bower and lessc, for people running the notebook from master
K.-Michael Aye
@michaelaye
Mar 20 2015 01:55
@Carreau OMG, what have I done. :smile:
Matthias Bussonnier
@Carreau
Mar 20 2015 01:56
I mean it's continuous right ?
You git clone you pip symlink,
then you pull.. there is a bug. you dive in the source, make a change commit push, make a PR. an Bim, you are a contrubutor.
Then you wake up in the morning and realized you were sleep-coding.
Ok, headign Home
K.-Michael Aye
@michaelaye
Mar 20 2015 02:51
i only report bugs, but at least that dilligently. ;)
Min RK
@minrk
Mar 20 2015 13:44
@takluyver sorry I dropped off right after I asked. Thanks for sending the email. I'll sort out 3.x. All I've been doing so far is git push origin master:3.x to keep it in sync. That'll stop now that 4.0 PRs are merged.
Nicholas Bollweg
@bollwyvl
Mar 20 2015 13:48
i see nbviewer was redployed, but because it doesn't use ipython/ipython docker, it's still 15 days back from master
would love to see #8066 up there!
Min RK
@minrk
Mar 20 2015 13:51
@bollwyvl do you know why it doesn't inherit from ipython/ipython:3.x?
Nicholas Bollweg
@bollwyvl
Mar 20 2015 13:55
Um
No
i discussed it with @rgbkrk at some point
Min RK
@minrk
Mar 20 2015 13:58
ok. I imagine there was a reason. Maybe it was before Kyle created the 3.x tag on the docker builds?
Nicholas Bollweg
@bollwyvl
Mar 20 2015 13:58
could be. let me review how different the files are... can't be much!
Min RK
@minrk
Mar 20 2015 13:59
Great, thanks!
Nicholas Bollweg
@bollwyvl
Mar 20 2015 14:04
looks like ipython/Dockerfile just has a little bit more build environment, as well as python3, which we've talked about moving to anyway
Min RK
@minrk
Mar 20 2015 14:06
If it's a bit of extra stuff, it might be worthwhile to depend on it, to ensure that updates are properly sync'd
Nicholas Bollweg
@bollwyvl
Mar 20 2015 14:13
yes. trying it out now.
also, i see ipython has the tests as a RUN, which i think is very nice... but i don't see that very often in other dockerfiles
what would be the disadvantage to having that in nbviewer, i wonder?
ah, it depends pretty heavily on github, other URLs in the tests... and the tests fail for 40x reasons fairly often and unpredictably
Damian Avila
@damianavila
Mar 20 2015 14:30
@bollwyvl love to see the slides live :wink:
Nicholas Bollweg
@bollwyvl
Mar 20 2015 14:31
yeah, we should get some top-shelf decks on the front page
Damian Avila
@damianavila
Mar 20 2015 14:36
yes... that would be awesome... also maybe an email to the mailing list...
Nicholas Bollweg
@bollwyvl
Mar 20 2015 14:41
please do the honors, slides-father :)
@minrk @rgbkrk here's a pull to use ipython/ipython:3.x as the nbviewer baseline: jupyter/nbviewer#430
Min RK
@minrk
Mar 20 2015 15:28
Great, thanks @bollwyvl. I'll let @rgbkrk merge, since he's more likely to remember the current reasoning.
Sylvain Corlay
@SylvainCorlay
Mar 20 2015 15:32
It is merge frenzy :))
Kyle Kelley
@rgbkrk
Mar 20 2015 16:00
Nice, thanks @bollwyvl
Been with sick family so my week has been fairly blase on the work and OSS front.
Nicholas Bollweg
@bollwyvl
Mar 20 2015 16:03
yeah, luckily just i have been sick... family's hanging tough
so i see that the image is up on dockerhub... https://registry.hub.docker.com/u/ipython/nbviewer/builds_history/94511/
will that automagically deploy?
Kyle Kelley
@rgbkrk
Mar 20 2015 16:05
...no
Nicholas Bollweg
@bollwyvl
Mar 20 2015 16:05
cool, just wondering
Kyle Kelley
@rgbkrk
Mar 20 2015 16:05
In fact, I can't reach the site right now because of my new laptop
Nicholas Bollweg
@bollwyvl
Mar 20 2015 16:05
a very productive laptop!
Kyle Kelley
@rgbkrk
Mar 20 2015 16:05
It will automagically deploy when CoreOS moves the unit files around
...or if @minrk does it
I do have some autodock stuff that handles the dockerhub webhook but haven't integrated it in with our nbviewer setup
I put that on the backburner while CoreOS was making drastic changes to etcd and other components
Nicholas Bollweg
@bollwyvl
Mar 20 2015 16:07
need to learn some core. seems scary cool.
Jason Grout
@jasongrout
Mar 20 2015 17:32
@Carreau - I loved your "expert" video you posted yesterday
Matthias Bussonnier
@Carreau
Mar 20 2015 17:52
We need you to draw 7 red lines.
Some with Green ink, some with transparent ink.
Jason Grout
@jasongrout
Mar 20 2015 17:54
7 perpendicular lines (as a math guy, that was even better for me)
I guess he could have said: "I'll be working in R^7"
Matthias Bussonnier
@Carreau
Mar 20 2015 18:05
:-)
What about a bird ?
Jason Grout
@jasongrout
Mar 20 2015 18:56
@jdfreder?
Jonathan Frederic
@jdfreder
Mar 20 2015 18:56
That's me
Jason Grout
@jasongrout
Mar 20 2015 18:56
Is there a way to get better debugging information from the iptest js/widgets? For example, I'm trying to track down failures like this one: https://travis-ci.org/ipython/ipython/jobs/55215947#L252
sorry, that one does have some other debugging output below. This one is more puzzling: https://travis-ci.org/ipython/ipython/jobs/55215947#L492
I guess a key is that it says "did not evaluate to something truthy in 10000ms".
So I should look for python errors that would have prevented a widget message from coming back to js.
What would be helpful, for example, is:
Jonathan Frederic
@jdfreder
Mar 20 2015 18:59
That's weird, the xdomain issue
First, I would start testing locally
Jason Grout
@jasongrout
Mar 20 2015 18:59
  1. python code to replicate the issue.
Jonathan Frederic
@jdfreder
Mar 20 2015 18:59
Second,
Jason Grout
@jasongrout
Mar 20 2015 19:00
or 2. if there is any way of getting the log of python output, that would be great.
Jonathan Frederic
@jdfreder
Mar 20 2015 19:00
Yes, definitely keep your eye open for Python errors
Yes there is
Jason Grout
@jasongrout
Mar 20 2015 19:01
I'm saying it would be really useful if, when there was a problem, it also printed out the python code that had been sent to the kernel
so I could check it locally.
Jonathan Frederic
@jdfreder
Mar 20 2015 19:01
Yeah
So there's a casper.interact = function() { function I wrote for just this type of debugging
Jason Grout
@jasongrout
Mar 20 2015 19:01
and if there were any python errors, they are logged as well.
Jonathan Frederic
@jdfreder
Mar 20 2015 19:02
When you run the tests locally, using that method will cause casper to halt and allow you to poke around the JS
Jason Grout
@jasongrout
Mar 20 2015 19:02
oh, how do I use that?
that sounds really useful
Jonathan Frederic
@jdfreder
Mar 20 2015 19:03
casper.notebook_test(function () {
//...
    this.then(function () {
//...
        this.interact();
    });
});
IIRC
Obviously you need to run the tests locally to use it
Jason Grout
@jasongrout
Mar 20 2015 19:04
Right, I have to modify the tests.
Jonathan Frederic
@jdfreder
Mar 20 2015 19:04
because Travis is read-only.
Jason Grout
@jasongrout
Mar 20 2015 19:04
so this.interact() is equivalent to import pdb; pdb.set_trace()
Jonathan Frederic
@jdfreder
Mar 20 2015 19:05
Yeah, it's a simple thing:
casper.interact = function() {
    // Start an interactive Javascript console.
    var system = require('system');
    system.stdout.writeLine('JS interactive console.');
    system.stdout.writeLine('Type `exit` to quit.');

    function read_line() {
        system.stdout.writeLine('JS: ');
        var line = system.stdin.readLine();
        return line;
    }

    var input = read_line();
    while (input.trim() != 'exit') {
        var output = this.evaluate(function(code) {
            return String(eval(code));
        }, {code: input});
        system.stdout.writeLine('\nOut: ' + output);
        input = read_line();
    }
};
ipython/html/tests/util.js
I was pulling my hair out debugging :horse: issues.
I needed some way to poke around.
When we change testing frameworks, I'm really excited to try to make all of this easier and less painful.
Oh
And about the Python question you asked
You can run the tests against a local server
which may help even more
Jonathan Frederic
@jdfreder
Mar 20 2015 19:10
See this ipython/ipython#6751
Jason Grout
@jasongrout
Mar 20 2015 19:44
oh, awesome. Yes, that will help a lot
Jonathan Frederic
@jdfreder
Mar 20 2015 20:49
Anyone remember the commandline syntax for setting a config=True list traitlet? The obvious --HubAuth.graders=['jon'] doesn't work...
Jessica B. Hamrick
@jhamrick
Mar 20 2015 20:50
I think this works (maybe):
—HubAuth.graders=‘[“jon”]’
Or maybe with the quotes the other way around
Min RK
@minrk
Mar 20 2015 21:01
I'm so sorry about list-traitlets as CLI args.
Matthias Bussonnier
@Carreau
Mar 20 2015 21:02
could we special case args that have commas.
like --foo=bar,qux,jub -> list
Min RK
@minrk
Mar 20 2015 21:02
Then how do you handle an actual string with a comma?
Matthias Bussonnier
@Carreau
Mar 20 2015 21:03
Well, you know the traitlet is a list right ?
Min RK
@minrk
Mar 20 2015 21:03
No
Or, rather, not when argparse is converting CLI args to a config object
Matthias Bussonnier
@Carreau
Mar 20 2015 21:04
Hum. I have to relook at Lazy config.
Min RK
@minrk
Mar 20 2015 21:04
It's not related to the Lazy stuff
Matthias Bussonnier
@Carreau
Mar 20 2015 21:04
I though the default value was keept until hittint the instance itself.
could we use lazy for that ?
Min RK
@minrk
Mar 20 2015 21:06
I don't think so
Matthias Bussonnier
@Carreau
Mar 20 2015 21:06
:-(
Min RK
@minrk
Mar 20 2015 21:07
It's not impossible.
I think I see two ways to do it
  1. aliases, flags require access to the traits they target, which means for these, we could tell argparse about lists, etc.
Jonathan Frederic
@jdfreder
Mar 20 2015 21:07
Thanks @jhamrick that was it. Auth is working :) I'll push changes in a new commit to that existing PR.
Matthias Bussonnier
@Carreau
Mar 20 2015 21:09
for non-flag we could try to import the class and inspect the type of the attribute also.
it does not Need to be aliases.
Min RK
@minrk
Mar 20 2015 21:09
But we only have the class name
Matthias Bussonnier
@Carreau
Mar 20 2015 21:09
Oh, yes, not the package.
True.
Min RK
@minrk
Mar 20 2015 21:09
  1. (that's going to render as 1., but it's a 2.) record that the arg came from a CLI, and define a from_string or from_cli method to call for such things.
Matthias Bussonnier
@Carreau
Mar 20 2015 21:10
Hum.
I'm leaning for 1.
Min RK
@minrk
Mar 20 2015 21:10
We could skip recording that it's a CLI, and just say that "config values can be strings, and if it's not a string traitlet, do some transform"
It's basically moving the literal_eval logic to the Configurable class (or Traits themselves)
Which is perhaps better anyway
Matthias Bussonnier
@Carreau
Mar 20 2015 21:12
I think it woudl be good to have a cache of availlable config values (like --help-all does) to also for example warn if capitalisation is wrong.
(discussed with @jhamrick the other day)
Min RK
@minrk
Mar 20 2015 21:12
yeah, that's very tricky, since --help-all cannot be a complete list
the config object could contain config about extensions that IPython doesn't know about
We can (and should) warn about Class.misspled_trait, but it's harder to know that CLAss.trait is wrong.
Min RK
@minrk
Mar 20 2015 21:25
The advantage of 1. is you get nice argparse handling, but the advantage of 2. is you get something vaguely sensible for things that don't have aliases (which is currently every list trait, since we don't have a single alias for one)
Min RK
@minrk
Mar 20 2015 21:47
How's, this?
minrk[17:41]~/dev/ip/mine (argparse-aliases) $ ip -x a b c d
test list: ['a', 'b', 'c', 'd']
Matthias Bussonnier
@Carreau
Mar 20 2015 21:48
how does that conlict with
Min RK
@minrk
Mar 20 2015 21:48
If we tell argparse about the Application class list, it should be able to handle basic lists of strings just fine, but only for aliases
Matthias Bussonnier
@Carreau
Mar 20 2015 21:49
ip --list a b c mynotebook
Min RK
@minrk
Mar 20 2015 21:49
The way argparse defines multiple-args as separated by spaces, that's ambiguous.
You would have to do ip mynotebook --list a b c or ip --list a b c -- mynotebook
Matthias Bussonnier
@Carreau
Mar 20 2015 21:50
hum...
Min RK
@minrk
Mar 20 2015 21:50
or ip --list a b c --another-flag mynotebook
Matthias Bussonnier
@Carreau
Mar 20 2015 21:51
you can still make a PR to see what people are thinking about it.
Min RK
@minrk
Mar 20 2015 21:51
I actually have to run to meet people for dinner.
Matthias Bussonnier
@Carreau
Mar 20 2015 21:51
and I suppose it is on a per flag case
No problem,
run, you can make PRs later.
Min RK
@minrk
Mar 20 2015 21:51
Right, it's only for aliases that point to traitlets for List, Set, Tuple
I might try both sides, to see what they look like.
Jonathan Frederic
@jdfreder
Mar 20 2015 22:03
@jasongrout did you track down the test failure successfully?