##// END OF EJS Templates
add language_info to nbformat doc and spec
Min RK -
Show More
@@ -10,25 +10,48 b''
10 "type": "object",
10 "type": "object",
11 "additionalProperties": true,
11 "additionalProperties": true,
12 "properties": {
12 "properties": {
13 "kernel_info": {
13 "kernelspec": {
14 "description": "Kernel information.",
14 "description": "Kernel information.",
15 "type": "object",
15 "type": "object",
16 "required": ["name", "language"],
16 "required": ["name", "display_name"],
17 "properties": {
17 "properties": {
18 "name": {
18 "name": {
19 "description": "Name of the kernel specification.",
19 "description": "Name of the kernel specification.",
20 "type": "string"
20 "type": "string"
21 },
21 },
22 "language": {
22 "display_name": {
23 "description": "The programming language which this kernel runs.",
23 "description": "Name to display in UI.",
24 "type": "string"
25 },
26 "codemirror_mode": {
27 "description": "The codemirror mode to use for code in this language.",
28 "type": "string"
24 "type": "string"
29 }
25 }
30 }
26 }
31 },
27 },
28 "language_info": {
29 "description": "Kernel information.",
30 "type": "object",
31 "required": ["name"],
32 "properties": {
33 "name": {
34 "description": "The programming language which this kernel runs.",
35 "type": "string"
36 },
37 "codemirror_mode": {
38 "description": "The codemirror mode to use for code in this language.",
39 "type": "string"
40 },
41 "file_extension": {
42 "description": "The file extension for files in this language.",
43 "type": "string"
44 },
45 "mimetype": {
46 "description": "The mimetype corresponding to files in this language.",
47 "type": "string"
48 },
49 "pygments_lexer": {
50 "description": "The pygments lexer to use for code in this language.",
51 "type": "string"
52 }
53 }
54 },
32 "signature": {
55 "signature": {
33 "description": "Hash of the notebook.",
56 "description": "Hash of the notebook.",
34 "type": "string"
57 "type": "string"
@@ -36,11 +36,15 b' At the highest level, a Jupyter notebook is a dictionary with a few keys:'
36 "metadata" : {
36 "metadata" : {
37 "signature": "hex-digest", # used for authenticating unsafe outputs on load
37 "signature": "hex-digest", # used for authenticating unsafe outputs on load
38 "kernel_info": {
38 "kernel_info": {
39 # if kernel_info is defined, its name and language fields are required.
39 # if kernel_info is defined, its name field is required.
40 "name" : "the name of the kernel",
40 "name" : "the name of the kernel"
41 "language" : "the programming language of the kernel",
42 "codemirror_mode": "The name of the codemirror mode to use [optional]"
43 },
41 },
42 "language_info": {
43 # if language_info is defined, its name field is required.
44 "name" : "the programming language of the kernel",
45 "version": "the version of the language",
46 "codemirror_mode": "The name of the codemirror mode to use [optional]"
47 }
44 },
48 },
45 "nbformat": 4,
49 "nbformat": 4,
46 "nbformat_minor": 0,
50 "nbformat_minor": 0,
General Comments 0
You need to be logged in to leave comments. Login now