These are chat archives for ipython/ipython

22nd
Jun 2015
Sylvain Corlay
@SylvainCorlay
Jun 22 2015 14:05
This message was deleted
Jason Grout
@jasongrout
Jun 22 2015 14:13
Perhaps the news page at http://ipython.org/news.html should be updated with news of IPython 3.2 release?
Jason Grout
@jasongrout
Jun 22 2015 15:45
If I have two anaconda installs, and use each to install different nbextensions, all of the extensions are installed to the same place (either /usr/local/share/..., or .local/share/...), right?
does anyone know if there is an easy way to get the nbextensions installed in different anaconda environments, so that one environment doesn't bleed over into others?
Jonathan Frederic
@jdfreder
Jun 22 2015 15:52
Yeah, I think you can set the path as an environment variable.
Similar to IPython's notion of profiles
I don't remember the name of the environment variable though, off the top of my head... It was something like JUPYTER_DIR or JUPYTER_PATH
Jason Grout
@jasongrout
Jun 22 2015 15:54
So I would need to manually set the jupyter installation path for something that is anaconda-specific? Okay, thanks, that's enough to start looking into things.
Jonathan Frederic
@jdfreder
Jun 22 2015 15:54
yeah
Disclaimer: I don't use anaconda. Anaconda might have a nice way to do that for you.
Min RK
@minrk
Jun 22 2015 16:48
We've talked about a --prefix arg to install-nbextension.
Even though nbextension is basically a copy, I think it's a good idea.
Fernando Perez
@fperez
Jun 22 2015 18:04
@jdfreder, are you around to chat for a minute about the widgets exercises?
Jonathan Frederic
@jdfreder
Jun 22 2015 18:04
Yes
Fernando Perez
@fperez
Jun 22 2015 18:10
are you with Brian at Cal Poly?
Jonathan Frederic
@jdfreder
Jun 22 2015 18:10
No I'm not
Fernando Perez
@fperez
Jun 22 2015 18:10
ok
Jonathan Frederic
@jdfreder
Jun 22 2015 18:10
Although
he is there
Fernando Perez
@fperez
Jun 22 2015 18:10
let's wait for him to ping back then
ok, I texted him
Jonathan Frederic
@jdfreder
Jun 22 2015 18:10
awesome
I'll be here
in the mean time I try to think up some ideas
Jason Grout
@jasongrout
Jun 22 2015 18:12
@jdfreder - quick question(s) about widget infrastructure
(coming from me being on leave for much of the last month, so not touching the code much... :)
Jonathan Frederic
@jdfreder
Jun 22 2015 18:12
Min is really going to spend a whole day on widgets? That leaves a lot of room for cool projects!
@jasongrout shoot
Jason Grout
@jasongrout
Jun 22 2015 18:13
what exactly happens to instantiate a widget?
x=IntSlider()
what happens?
  1. a comm_open message is sent to js with a target of 'ipython.widget'
  1. on the js side, the comm manager receives the message and then.... ???
Jonathan Frederic
@jdfreder
Jun 22 2015 18:14
yes, the message should also have metadata specifying the model class module and name.
then when the front-end receives that message, the registered comm target code executes
require is used, just like with the views, to load the right model class
the model is constructed, and the comm is associated with it
in the meantime
the backend sends another
"full state" message
which is just a state update, with every key
that arrives at the front-end either before or after the model exists
and is processed once the model exists via asynchronous promise stuff
Jason Grout
@jasongrout
Jun 22 2015 18:17
the comm open message is, for example: {"parent_header": {...}, "msg_type": "comm_open", "msg_id": "35558622-6b0e-42f3-8509-2ebbcf83b24f", "content": {"target_name": "ipython.widget", "target_module": null, "data": {"model_module": null, "model_name": "WidgetModel"}, "comm_id": "6e7610aeceb44be8994f0eb353e367af"}
does the comm manager invoke a callback for the widget manager with the content, or does the comm manager instantiate a new something?
Fernando Perez
@fperez
Jun 22 2015 18:18
Yes @jdfreder, it's 5 1/2 hr total, so we want to give them plenty of time to work on their own with a few ideas.
Jonathan Frederic
@jdfreder
Jun 22 2015 18:19
Sorry, the comm manager instantiates the comm, then invokes the callback in widget manager with the data and the comm instance.
I want to change this behavior though...
Jason Grout
@jasongrout
Jun 22 2015 18:20
how so?
Jonathan Frederic
@jdfreder
Jun 22 2015 18:20
I want to include the initial state push in the comm open message
Jonathan Frederic
@jdfreder
Jun 22 2015 18:23
Because right now, it's difficult to know if you've recieved a full state from the backend at any given time. You need to know when you've received the full state, otherwise you can't change the current state. This leads to the states becoming out of sync. There's a request state method, but it's awkward and prevents things from being symmetric.
Jason Grout
@jasongrout
Jun 22 2015 18:23
yes, that makes sense.
Jonathan Frederic
@jdfreder
Jun 22 2015 18:23
@jasongrout yes
Jason Grout
@jasongrout
Jun 22 2015 18:23
I was thinking about how to structure a phosphor-based notebook
and trying to figure out exactly how widgets fit in.
Jonathan Frederic
@jdfreder
Jun 22 2015 18:24
@fperez awesome, yeah I think it may make sense to cover custom widgets then. When we talk, I'd like to get a better idea of how much time will be spent covering interact vs widgets at a lower level.
Jason Grout
@jasongrout
Jun 22 2015 18:24
In particular, how can we store something that signifies "widget" in the notebook state
@jdfreder, @fperez - can I help in any way? I'll be there for the tutorials, and I'm currently registered for some other one, but I think it would be better for me to see how people are using widgets, what people struggle with, etc.
(are you guys talking about one of the scipy tutorials Mon/Tues?)
Fernando Perez
@fperez
Jun 22 2015 18:26
Thanks @jasongrout, this is for a Tutorial this Thursday in Southampton that Min is teaching on short notice.
Jonathan Frederic
@jdfreder
Jun 22 2015 18:26
@jasongrout no, this is Min going to Europe .. this week I think!
Jason Grout
@jasongrout
Jun 22 2015 18:26
oh, okay. Well, still, if there's some way I can help, let me know.
Fernando Perez
@fperez
Jun 22 2015 18:26
I think that the lessons Min brings back at the end of the week will be useful for us to fine-tune the Scipy presentation, though.
Thanks!
we're brainstorming on a few good exercises to include, so it's not a big wall of lecturing all day.
Jonathan Frederic
@jdfreder
Jun 22 2015 18:27
Thanks, if you have cool ideas for widget related exercises, please share.
Jason Grout
@jasongrout
Jun 22 2015 18:27
this doesn't happen to be South Hampton, NY, does it? That's close for us :)
Fernando Perez
@fperez
Jun 22 2015 18:28
Nope, Southampton, UK ;)
Jason Grout
@jasongrout
Jun 22 2015 18:28
ah, just a short hop across the pond.
Jonathan Frederic
@jdfreder
Jun 22 2015 18:28
@jasongrout I've always been keen to the idea of storing the widget state in the notebook state directly, notebook level, not cell. Is this the kind of question you're trying to answer? I'm sure you remember the long discussions we had about that last year... : )
Jason Grout
@jasongrout
Jun 22 2015 18:29
well, I was also trying to get output and widgets interspersed
I'm sure you remember those long conversations two years ago :)
Jonathan Frederic
@jdfreder
Jun 22 2015 18:30
oh yes..
Jason Grout
@jasongrout
Jun 22 2015 18:30
So what if we had a display data message that signified a widget. A handler could be registered to take care of those display data messages, that would instantiate a widget and set up the comm
non-widget enabled frontends could display the text and a link to installing the notebook :).
Min RK
@minrk
Jun 22 2015 18:31
Yeah, I still think based on the nature of widgets, their state shouldn't go in the notebook at all. At most, I think the notebook should have a reference to where widget state is stored.
Jason Grout
@jasongrout
Jun 22 2015 18:31
The state could be encoded in that initial display data message, so related to your point above
Jonathan Frederic
@jdfreder
Jun 22 2015 18:31
I think that's a good idea.
Jason Grout
@jasongrout
Jun 22 2015 18:31
but I see @minrk's point too.
Min RK
@minrk
Jun 22 2015 18:31
It's the multiple-display that really throws a wrench in the whole thing.
That one widget can actually have many views on the page. So there really has to be a big uuid-keyed blob that changes all the time. That's the kicker for me - we can't have something like that in the nbformat.
What I had in my head at the beginning was something like @jasongrout is describing - widgets are like outputs, with a key for their widget class, and their state as a dict.
I think that would be totally fine. It just turns out to not actually adequately represent widgets as they are.
Jason Grout
@jasongrout
Jun 22 2015 18:38
right, thanks for reminding me of the debate from a while ago. The models are not tied to a specific place in a notebook
So a view could be registered as a display_data message, with a reference to a model id.
Jonathan Frederic
@jdfreder
Jun 22 2015 18:39
Which is why I'm inclined to store them at notebook level, regardless of whether or not it is in nbformat.
Maybe a small sqlite db
Min RK
@minrk
Jun 22 2015 18:40
Yeah. I think a notebook-level key-value store is fine—it matches the model—it should just be a sidecar file.
Jason Grout
@jasongrout
Jun 22 2015 18:41
but I still like the idea of views being contained in the notebook format as display_data messages, containing a reference to a model id
Min RK
@minrk
Jun 22 2015 18:41
Maybe there should be a combination, though - a short summary of the view in the notebook, so that a snapshot can be reproduced from the notebook file, if not the whole thing.
Jonathan Frederic
@jdfreder
Jun 22 2015 18:41
But yeah, the what is now a completely custom comm message to construct and display a view, could be redone using the rich display framework, leveraging the mime type stuff I think...
Min RK
@minrk
Jun 22 2015 18:42
I think we should try very hard to avoid putting UUIDs in nbformat.
Jason Grout
@jasongrout
Jun 22 2015 18:42
one problem being that in display_data messages, only the application/json mime type has rich information. the others are all strings.
Min RK
@minrk
Jun 22 2015 18:43
maybe it should be application/json+widget or something like that.
For that we would need to adjust some of the serialization handling, since we right now look just for application/json, but that seems sensible at first glance, anyway.
Jason Grout
@jasongrout
Jun 22 2015 18:46
from http://www.freeformatter.com/mime-types-list.html, it seems that the thing after '+' should be the format (e.g., +xml, +zip), not the semantic meaning
so it would make more sense to have application/widget+json
Min RK
@minrk
Jun 22 2015 18:47
ah, ok.
But still - we could make the json handling be that, instead of the single case we have now.
And probably should, I imagine.
Jason Grout
@jasongrout
Jun 22 2015 18:47
yes, that makes a lot of sense
it'd be harder to type in typescript, but oh well.
Min RK
@minrk
Jun 22 2015 18:48
Even regardless of whether we use this for widgets, it's probably the right thing to do.
Jason Grout
@jasongrout
Jun 22 2015 18:48
yep, agreed
Jason Grout
@jasongrout
Jun 22 2015 18:55
so your objection to having uuids in the notebook format is that executing a cell twice, producing the same visual output, shouldn't change the format?
Min RK
@minrk
Jun 22 2015 18:56
just minimize churn for no actual changes.
Fernando Perez
@fperez
Jun 22 2015 18:56
@jdfreder, quick skype call?
Min RK
@minrk
Jun 22 2015 18:56
I'm not saying they are unacceptable (uuid keys probably are, since they will resort every time), just that we should work hard to find more deterministic ways to do things.
Jason Grout
@jasongrout
Jun 22 2015 18:57
yep, that makes sense
Jonathan Frederic
@jdfreder
Jun 22 2015 18:57
Sure
Logging on
Sylvain Corlay
@SylvainCorlay
Jun 22 2015 20:03
@minrk do you have any other remarks re: the comm_list message?
Min RK
@minrk
Jun 22 2015 21:10
@SylvainCorlay I think it makes sense. I want to bring it up at the meeting tomorrow.
It brings up a shortcoming with one aspect of the split, but that's not relevant to the PR.
Sylvain Corlay
@SylvainCorlay
Jun 22 2015 21:16
ok, thanks
Cameron Oelsen
@cameronoelsen
Jun 22 2015 22:16
Over the last week have been doing a redesign of the IPython site, content wont be the same but I just simply revamped the look of it!
http://invis.io/KF3BRI8QU
Min RK
@minrk
Jun 22 2015 22:40
Nice!
@cameronoelsen did you do some blurring/smoothing on the logo? It looks lumpy on there.
Cameron Oelsen
@cameronoelsen
Jun 22 2015 22:43
@minrk I didn't have the vector artwork for IPython so I just took the raster image (the logo) from the current site and vectorized it, so it may look a little funky. In the final version, we will have the vectorized SVG so it will look correct :)
Min RK
@minrk
Jun 22 2015 22:44
ok, that makes sense. Whatever smoothing algorithm was used doesn't apparently prioritize corners.
SVGs are here by the way.
Cameron Oelsen
@cameronoelsen
Jun 22 2015 22:45
@minrk Cool! Thanks!!
Sylvain Corlay
@SylvainCorlay
Jun 22 2015 22:46
This is nice.
alope107
@alope107
Jun 22 2015 22:51
Hi @minrk my name is Auberon and I just started working on Jupyter with @ellisonbg. I've started looking into making pyspark integration easier and was referred to your findspark project. Do you have ideas of how to streamline the process further, or do you think that findspark is a sufficient solution?
Min RK
@minrk
Jun 22 2015 22:52
I doubt findspark is sufficient, but I don't have enough info to know the various details of setting up a spark env.
Talking to Jeremy Freeman (he's contributed to the findspark repo) is probably a good idea. He has a lot of experience working with pyspark and notebooks.
Sylvain Corlay
@SylvainCorlay
Jun 22 2015 22:55
Speaking of design, some +1 on FortAwesome/Font-Awesome#6619 could help getting this into font-awesome!
Min RK
@minrk
Jun 22 2015 22:56
(also, welcome to the project, @alope107!)
alope107
@alope107
Jun 22 2015 22:57
Thanks!
Brian E. Granger
@ellisonbg
Jun 22 2015 23:44
@minrk and @alope107 I am going to send out a general email about Jupyter+Spark integration to the main jupyter mailing list - @rgbkrk has also thought about these things.