Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly support multiple mime outputs #35

Open
rapgenic opened this issue Jun 8, 2021 · 1 comment
Open

Properly support multiple mime outputs #35

rapgenic opened this issue Jun 8, 2021 · 1 comment
Assignees
Labels
console Related to jupyter console mode what/output 📺 Output/display renderer related

Comments

@rapgenic
Copy link
Collaborator

rapgenic commented Jun 8, 2021

We need to properly insert in the responses from the kernel multiple mime types, and at least text/plain, in order to support every interface (e.g. jupyter console, whch is terminal based and only supports text/plain outputs).

Native types

Support for these has alredy been implemented, see 45b636d.

Custom class based types

E.g. @tf and @sym. Enhanced output is provided by overriding the display function. It does not seem to be possible however to call the base function provided by those class to get a textual output. A possibility, although ugly, is to copy and paste the default function alongside the new one, to generate both outputs in the new one.

The best solution would be having package authors using on their own the xoctave functions to identify when running in a kernel and to display properly their output. This however requires a stable API (#8).

Original issue:

With console mode you mean jupyter console?
I tried to run some cells there and didn't work for me. I wonder if I did something wrong?
I just built it normally, do you know if there's the necessity of having some other stuff installed?

Originally posted by @marimeireles in https://github.com/rapgenic/xeus-octave/issues/5#issuecomment-856448763

Possibly related to mime outputs in the responses from the server. Need to check if the text/plain is always included.

@rapgenic rapgenic self-assigned this Jun 8, 2021
@rapgenic rapgenic added console Related to jupyter console mode type/planning 📑 Internal organization issues what/output 📺 Output/display renderer related labels Jun 8, 2021
rapgenic added a commit that referenced this issue Jun 10, 2021
Note that classes are still displayed only with custom formatting.

Ref: #35
@rapgenic rapgenic changed the title Fix jupyter console command Properly support multiple mime outputs Jun 10, 2021
@rapgenic
Copy link
Collaborator Author

@marimeireles I have updated the output infrastructure, and now jupyter console should mostly work.

See the updated issue text for more information.

@AntoinePrv AntoinePrv removed the type/planning 📑 Internal organization issues label Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console Related to jupyter console mode what/output 📺 Output/display renderer related
Projects
None yet
Development

No branches or pull requests

2 participants