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

Add JSONLD @context to the top level .ipynb node #44

Closed
1 of 7 tasks
westurner opened this issue Sep 6, 2016 · 9 comments
Closed
1 of 7 tasks

Add JSONLD @context to the top level .ipynb node #44

westurner opened this issue Sep 6, 2016 · 9 comments

Comments

@westurner
Copy link
Contributor

westurner commented Sep 6, 2016

From #43 (comment) :

JSONLD is application/ld+json:

There is a @context mapping for nbformat JSONLD out there:

.

  • SCH: .ipynb JSONLD @context by @bollwyvl
    • Would it be okay to merge this upstream?
    • TST: Does this cover all of the ipynb nbformat v4 attributes?
    • TST: Tests (@context + .ipynb => jsonld => rdf) (PyLD, rdflib-jsonld)
  • Host an @context at a stable, versioned URI
    • https://<url>/ns/v4/nbformat.context.jsonld
      • There may be a lot of (cacheable) lookups
        • CDN (GitHub Pages (Fastly), CloudFlare)
    • @ jupyter, what would be the best way to handle this?
  • DOC,SCH: nbformat specification: heading, link(s)?
  • ENH,SCH: Add @context: to the top level .ipynb in Jupyter Notebook

Questions:

  • Would this be a breaking change?
    • Signatures would change; but otherwise,no, IIUC, adding @context to .ipynb would not be a breaking or even a major change, so waiting until nbformat v5 would not be necessary.
@rgbkrk
Copy link
Member

rgbkrk commented Sep 6, 2016

Well the @context is finely encapsulated inside of the payload for application/ld+json. There is no change to the notebook format spec here.

@westurner
Copy link
Contributor Author

Value: Transform Jupyter Notebook JSON (nbformat .ipynb) to JSONLD to RDF (linked data).

http://5stardata.info/

@westurner
Copy link
Contributor Author

westurner commented Sep 6, 2016

Well the @context is finely encapsulated inside of the payload for application/ld+json. There is no change to the notebook format spec here.

The change to the notebook format spec would be adding "@context": "<url>", to the .ipynb JSON to link to an official JSONLD @context . (edit) and adding "@type": ["http://schema.org/DigitalDocument", "http://schema.jupyter.org/JupyterNotebook"] in the top-level nbformat node

[EDIT]
Here's a patch to add a JSONLD @context, author, and license to the nbformat JSONSchema: master...westurner:SCH_add_metadata.

@westurner
Copy link
Contributor Author

westurner commented Jan 29, 2017

See:

@rgbkrk
Copy link
Member

rgbkrk commented Jan 6, 2020

This would be a major version bump that would break all the frontends requiring validation (notebook, lab, etc.), so this is a non-starter. Closing. Feel free to open if there's likely development activity around it.

@rgbkrk rgbkrk closed this as completed Jan 6, 2020
@bollwyvl
Copy link
Contributor

bollwyvl commented Jan 6, 2020 via email

@meeseeksmachine
Copy link

This issue has been mentioned on Jupyter Community Forum. There might be relevant details there:

https://discourse.jupyter.org/t/sustainability-of-the-ipynb-nbformat-document-format/3051/2

@westurner
Copy link
Contributor Author

Is it now [almost] possible to use the new features of JSON-LD 1.1 to write a sufficient @context for nbformat 5.1?

Looks like there may be a JSON-LD 1.2/2.0 for RDFstar* support; and possibly whatever is needed to add @context to .ipynb files backward-compatibly and non-breakingly.

Is this the latest draft of a JSON-LD 1.0 @context for nbformat v4?
https://gist.github.com/bollwyvl/09f0241b45fc3a98df8b

@westurner
Copy link
Contributor Author

JSON-LD 1.1 (2020) > "Changes since 1.0 Recommendation of 16 January 2014":
https://www.w3.org/TR/json-ld11/#changes-from-10

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

No branches or pull requests

4 participants