Skip to content

Display changes#82

Merged
flying-sheep merged 8 commits intomasterfrom
display-changes
Apr 14, 2015
Merged

Display changes#82
flying-sheep merged 8 commits intomasterfrom
display-changes

Conversation

@flying-sheep
Copy link
Member

i think this should be the way everyone’s happy with.

depends on IRkernel/IRdisplay#3’s function display_alternatives and IRkernel/repr (in order to display multiple alternative formats of one output, and to create those formats, respectively)

sorry for the mess of commits, i brought the notebooks up to date too. relevant changes should start here

this fixes #73 and lays foundations for #59 (by depending on repr)

R/execution.r Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I was going to argue that this should send a execution_reply but in python this also uses the display function :-/

But this then means that the kernel depends on the display package (due to the useage in sending plots) and the display package depends on the kernel (due to the actual sending of the display_data reply). I'm not sure if that's a problem in R.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already the case - IRdisplay provides the display API, that I also want to make usable from the R magic in a Python notebook, so the same code works in both. However, it doesn't know how to actually display the data - it needs to be run by something that gives it a base display function to send the data. IRkernel does this. It's not very nice, but it seems to work.

I'm still not convinced that display_alternatives is necessary, though.

@flying-sheep
Copy link
Member Author

so regarding #83:

you call that a hack? 1009088 is a hack!

A hack

(and jsonlite already encodes raw vectors as base64, so we don’t need to)

@flying-sheep
Copy link
Member Author

btw. i think that this is now independent from IRkernel/IRdisplay#3, right?

so we can pull this in and bikeshed over the IRdisplay APIs the following weeks ;)

@takluyver
Copy link
Member

Yes, I think so - I tested it without that PR (using #83).

I also want to think a bit about repr APIs, though - I'm a bit confused as to why repr has a class, rather than just a set of methods returning string/raw vectors.

flying-sheep added a commit that referenced this pull request Apr 14, 2015
@flying-sheep flying-sheep merged commit 738d9e3 into master Apr 14, 2015
@flying-sheep flying-sheep deleted the display-changes branch April 14, 2015 19:19
@flying-sheep
Copy link
Member Author

I also want to think a bit about repr APIs, though - I'm a bit confused as to why repr has a class, rather than just a set of methods returning string/raw vectors.

let’s discuss this in IRkernel/repr#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove set_plot_options

3 participants