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

Embed the notebook kernel information in page metadata #142

Closed
choldgraf opened this issue Apr 7, 2020 · 2 comments
Closed

Embed the notebook kernel information in page metadata #142

choldgraf opened this issue Apr 7, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@choldgraf
Copy link
Member

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)
@choldgraf choldgraf added the enhancement New feature or request label Apr 7, 2020
@chrisjsewell
Copy link
Member

Yeh just json serialize

@choldgraf
Copy link
Member Author

This is fixed in #147

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants