Skip to content

Final discussion about design #6

@flying-sheep

Description

@flying-sheep

#5 totally derailed and IRkernel/IRkernel#97 makes this urgent so let me get this done:

We want the following functions:

  1. high level display creating a mimebundle by calling all repr_* functions on an object, then calling base_display on that mimebundle
  2. low level display_mimebundle and display1 functions directly accepting mimebundle-like lists
  3. high level display_* convenience functions for a single object or file.

more questions:

  1. should we call base_display only with base64 encoded text strings or also with raw vectors and rely on simplejson automatically base64’ing those?

  2. i like the ... API instead of a dedicated list: which should we do:

    • display_mimebundle(list('application/png' = bar,
                              'image/png' = foo),
                         metadata = list(
                              'image/png' = list(width = 400)))
    • display_mimebundle('application/png' = bar,
                         'image/png' = foo, 
                         metadata = list(
                               'image/png' = list(width = 400)))
    • display_mimebundle('application/png' = bar,
                         'image/png' = list(foo, width = 400))

    the latter of course would also accept a dedicated metadata parameter.


change in IRkernel: jupyter.result_mimetypesjupyter.display_mimetypes

…which we then use here in the new display function to determine which reprs to call

since IRkernel sets the option (if not also set) and this project doesn’t depend on IRkernel: should this project also set a default for that option?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions