Context for the IPython Notebook Format 4

The IPython notebook will (soon) debut their new notebook format, which
lies at the heart of a very cool ecosystem of technologies. Here is
the pre-announcement
thread
<http://python.6.x6.nabble.com/Notebook-format-quot-incompatible-quot-changes-td5076324.html>
.

Here is the new schema
<https://github.com/minrk/ipython/blob/nbformat4/IPython/nbformat/v4/nbformat.v4.schema.json>
.

One of the developers is interested in adding a JSON-LD context, granted
without a specific use case, but I can think of a few. At any rate, I
highlight a few challenges in the above thread.

The biggest I see is in the old bugaboo, @container: @index, and I really
want the data. Here's the schema snippet:

"patternProperties": {
  "^(?!application/json$)[a-zA-Z0-9]+/[a-zA-Z0-9\\-\\+\\.]+$": {
    "description": "mimetype output (e.g. text/plain), represented as
either an array of strings or a string.",
    "$ref": "#/definitions/misc/multiline_string"
  }
}


I've previously encountered this with package.json, where the most
interesting information, dependencies*, is tied up in a (currently)
nearly-impossible to parse format.

The harder thing is that the contents of this key is either an ordered list
(not a set) OR a deeper JSON object.

@vocab helps with the first problem (i.e. application/json =>
nbf4:application/json).

The second problem, of @list vs tree, I really don't see a way around it
without preprocessing.

Here is a playground
<http://json-ld.org/playground/index.html#startTab=tab-compacted&json-ld=https%3A%2F%2Fgist.githubusercontent.com%2Fbollwyvl%2Fe7f8136bd2ea5674dd00%2Fraw%2Ftest4.linked.context.ipynb%23&context=https%3A%2F%2Fgist.githubusercontent.com%2Fbollwyvl%2Fe7f8136bd2ea5674dd00%2Fraw%2Fnb4.context.jsonld>,
with the test notebook, with a fairly lean context. I've done a bit to map
the mime types i mention above, and wonder if fully populating that is the
only thing I can do.

Received on Tuesday, 4 November 2014 14:35:39 UTC