Skip to content

Embed the notebook kernel information in page metadata #142

@choldgraf

Description

@choldgraf

Right now when we parse notebooks, we throw away any notebook-level metadata that is not string/int/float:

https://github.com/ExecutableBookProject/MyST-NB/blob/master/myst_nb/parser.py#L173

However, this throws away the notebook kernel information, which may be useful for interactive tools like Thebelab. Here's the structure it has:

 "metadata": {
   "kernelspec": {
     "display_name": "Python 3",
     "language": "python",
     "name": "python3"
   }
  }

Can we either:

  1. Special-case the kernel information and put it in the metadata of the page (really we just need name, but perhaps language as well.
  2. Keep non int/float/string values as strings in the page metadata? (that's what we currently do for manually-specified Front Matter in myst-markdown)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions