##// END OF EJS Templates
Make notebook signature optional
Jessica B. Hamrick -
Show More
@@ -1,324 +1,323 b''
1 1 {
2 2 "$schema": "http://json-schema.org/draft-03/schema#",
3 3 "description": "IPython Notebook v4.0 JSON schema.",
4 4 "type": "object",
5 5 "additionalProperties": false,
6 6 "properties": {
7 7 "metadata": {
8 8 "description": "Notebook root-level metadata.",
9 9 "type": "object",
10 10 "required": true,
11 11 "additionalProperties": true,
12 12 "properties": {
13 13 "language": {
14 14 "description": "Language of the notebook's kernel.",
15 15 "type": "string",
16 16 "required": true
17 17 },
18 18 "kernel_info": {
19 19 "description": "Other kernel information, to be determined.",
20 20 "type": "object",
21 21 "required": true,
22 22 "additionalProperties": true
23 23 },
24 24 "signature": {
25 "description": "SHA256 hash of the notebook.",
25 "description": "Hash of the notebook.",
26 26 "type": "string",
27 "required": true,
28 "pattern": "^sha256:[0-9a-f]{64}$"
27 "required": false
29 28 }
30 29 }
31 30 },
32 31 "nbformat_minor": {
33 32 "description": "Notebook format (minor number). Incremented for slight changes to the notebook format.",
34 33 "type": "integer",
35 34 "required": true,
36 35 "minimum": 0
37 36 },
38 37 "nbformat": {
39 38 "description": "Notebook format (major number). Incremented between backwards incompatible changes to the notebook format.",
40 39 "type": "integer",
41 40 "required": true,
42 41 "minimum": 4
43 42 },
44 43 "orig_nbformat": {
45 44 "description": "Original notebook format (major number) before converting the notebook between versions.",
46 45 "type": "integer",
47 46 "required": false,
48 47 "minimum": 1
49 48 },
50 49 "cells": {
51 50 "description": "Array of cells of the current notebook.",
52 51 "type": "array",
53 52 "required": true,
54 53 "items": {
55 54 "type": [
56 55 {"$ref": "/definitions/raw_cell"},
57 56 {"$ref": "/definitions/markdown_cell"},
58 57 {"$ref": "/definitions/heading_cell"},
59 58 {"$ref": "/definitions/code_cell"}
60 59 ]
61 60 }
62 61 }
63 62 },
64 63
65 64 "definitions": {
66 65
67 66 "raw_cell": {
68 67 "description": "Notebook raw nbconvert cell.",
69 68 "type": "object",
70 69 "additionalProperties": false,
71 70 "properties": {
72 71 "cell_type": {
73 72 "description": "String identifying the type of cell.",
74 73 "enum": ["raw"],
75 74 "required": true
76 75 },
77 76 "metadata": {
78 77 "description": "Cell-level metadata.",
79 78 "type": "object",
80 79 "required": true,
81 80 "additionalProperties": true,
82 81 "properties": {
83 82 "format": {
84 83 "description": "Raw cell format, to be determined.",
85 84 "type": "string",
86 85 "required": false
87 86 }
88 87 }
89 88 },
90 89 "source": {
91 90 "description": "Contents of the cell, represented as an array of lines.",
92 91 "type": "array",
93 92 "required": true,
94 93 "items": {"type": "string"}
95 94 }
96 95 }
97 96 },
98 97
99 98 "markdown_cell": {
100 99 "description": "Notebook markdown cell.",
101 100 "type": "object",
102 101 "additionalProperties": false,
103 102 "properties": {
104 103 "cell_type": {
105 104 "description": "String identifying the type of cell.",
106 105 "enum": ["markdown"],
107 106 "required": true
108 107 },
109 108 "metadata": {
110 109 "description": "Cell-level metadata.",
111 110 "type": "object",
112 111 "required": true,
113 112 "additionalProperties": true
114 113 },
115 114 "source": {
116 115 "description": "Contents of the cell, represented as an array of lines.",
117 116 "type": "array",
118 117 "required": true,
119 118 "items": {"type": "string"}
120 119 }
121 120 }
122 121 },
123 122
124 123 "heading_cell": {
125 124 "description": "Notebook heading cell.",
126 125 "type": "object",
127 126 "additionalProperties": false,
128 127 "properties": {
129 128 "cell_type": {
130 129 "description": "String identifying the type of cell.",
131 130 "enum": ["heading"],
132 131 "required": true
133 132 },
134 133 "metadata": {
135 134 "description": "Cell-level metadata.",
136 135 "type": "object",
137 136 "required": true,
138 137 "additionalProperties": true
139 138 },
140 139 "source": {
141 140 "description": "Contents of the cell, represented as an array of lines.",
142 141 "type": "array",
143 142 "required": true,
144 143 "items": {"type": "string"}
145 144 },
146 145 "level": {
147 146 "description": "Level of heading cells.",
148 147 "type": "integer",
149 148 "required": true,
150 149 "minimum": 1,
151 150 "maximum": 6
152 151 }
153 152 }
154 153 },
155 154
156 155 "code_cell": {
157 156 "description": "Notebook code cell.",
158 157 "type": "object",
159 158 "additionalProperties": false,
160 159 "properties": {
161 160 "cell_type": {
162 161 "description": "String identifying the type of cell.",
163 162 "enum": ["code"],
164 163 "required": true
165 164 },
166 165 "metadata": {
167 166 "description": "Cell-level metadata.",
168 167 "type": "object",
169 168 "required": true,
170 169 "additionalProperties": true,
171 170 "properties": {
172 171 "collapsed": {
173 172 "description": "Whether the cell is collapsed/expanded.",
174 173 "type": "boolean",
175 174 "required": true
176 175 },
177 176 "autoscroll": {
178 177 "description": "Whether the cell's output should autoscroll.",
179 178 "type": "boolean",
180 179 "required": true
181 180 }
182 181 }
183 182 },
184 183 "source": {
185 184 "description": "Contents of the cell, represented as an array of lines.",
186 185 "type": "array",
187 186 "required": true,
188 187 "items": {"type": "string"}
189 188 },
190 189 "outputs": {
191 190 "description": "Execution, display, or stream outputs.",
192 191 "type": "array",
193 192 "required": true,
194 193 "items": {
195 194 "type": [
196 195 {"$ref": "/definitions/execute_output"},
197 196 {"$ref": "/definitions/stream_output"},
198 197 {"$ref": "/definitions/error_output"}
199 198 ]
200 199 }
201 200 },
202 201 "prompt_number": {
203 202 "description": "The code cell's prompt number. Will be null if the cell has not been run.",
204 203 "type": ["integer", "null"],
205 204 "required": true,
206 205 "minimum": 0
207 206 }
208 207 }
209 208 },
210 209
211 210 "execute_output": {
212 211 "description": "Result of executing a code cell.",
213 212 "type": "object",
214 213 "additionalProperties": false,
215 214 "properties": {
216 215 "output_type": {
217 216 "description": "Type of cell output.",
218 217 "enum": ["execute_output", "display_data"],
219 218 "required": true
220 219 },
221 220 "metadata": {
222 221 "description": "Cell output metadata.",
223 222 "type": "object",
224 223 "required": true,
225 224 "additionalProperties": true
226 225 },
227 226 "prompt_number": {
228 227 "description": "The code cell's prompt number. Will be null if the cell has not been run.",
229 228 "type": ["integer", "null"],
230 229 "required": false,
231 230 "minimum": 0
232 231 },
233 232 "text": {
234 233 "description": "The cell's text output, represented as an array of strings.",
235 234 "type": "array",
236 235 "required": false,
237 236 "items": {"type": "string"}
238 237 },
239 238 "html": {
240 239 "description": "The cell's html output, represented as an array of strings.",
241 240 "type": "array",
242 241 "required": false,
243 242 "items": {"type": "string"}
244 243 },
245 244 "javascript": {
246 245 "description": "The cell's javascript output, represented as an array of strings.",
247 246 "type": "array",
248 247 "required": false,
249 248 "items": {"type": "string"}
250 249 },
251 250 "png": {
252 251 "description": "The cell's png output.",
253 252 "type": "string",
254 253 "required": false
255 254 }
256 255 }
257 256 },
258 257
259 258 "stream_output": {
260 259 "description": "Stream output from a code cell.",
261 260 "type": "object",
262 261 "additionalProperties": false,
263 262 "properties": {
264 263 "output_type": {
265 264 "description": "Type of cell output.",
266 265 "enum": ["stream"],
267 266 "required": true
268 267 },
269 268 "metadata": {
270 269 "description": "Cell output metadata.",
271 270 "type": "object",
272 271 "required": true,
273 272 "additionalProperties": true
274 273 },
275 274 "stream": {
276 275 "description": "The stream type/destination.",
277 276 "type": "string",
278 277 "required": true
279 278 },
280 279 "text": {
281 280 "description": "The stream's text output, represented as an array of strings.",
282 281 "type": "array",
283 282 "required": false,
284 283 "items": {"type": "string"}
285 284 }
286 285 }
287 286 },
288 287
289 288 "error_output": {
290 289 "description": "Output of an error that occurred during code cell execution.",
291 290 "type": "object",
292 291 "additionalProperties": false,
293 292 "properties": {
294 293 "output_type": {
295 294 "description": "Type of cell output.",
296 295 "enum": ["error"],
297 296 "required": true
298 297 },
299 298 "metadata": {
300 299 "description": "Cell output metadata.",
301 300 "type": "object",
302 301 "required": true,
303 302 "additionalProperties": true
304 303 },
305 304 "ename": {
306 305 "description": "The name of the error.",
307 306 "type": "string",
308 307 "required": true
309 308 },
310 309 "evalue": {
311 310 "description": "The value, or message, of the error.",
312 311 "type": "string",
313 312 "required": true
314 313 },
315 314 "traceback": {
316 315 "description": "The error's traceback, represented as an array of strings.",
317 316 "type": "array",
318 317 "required": true,
319 318 "items": {"type": "string"}
320 319 }
321 320 }
322 321 }
323 322 }
324 323 }
General Comments 0
You need to be logged in to leave comments. Login now