Skip to content

Commit 707e492

Browse files
committed
Changes according to review
1 parent 1765886 commit 707e492

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

kernelspec-spec/kernelspec-spec.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,15 @@ date-started: "2023-04-19"
1010

1111
## Problem
1212

13-
The kernelspec configuration file is documented aside the kernel protocol documentation, but it is not
14-
*specified*. Besides, it might be unclear whether the kernelspec is part of the kernel protocol, or
15-
independent.
13+
The kernelspec configuration file is [documented](https://github.com/jupyter/jupyter_client/blob/main/docs/kernels.rst) aside the kernel protocol documentation, and an [implementation](https://github.com/jupyter/jupyter_client/blob/main/jupyter_client/kernelspec.py#L21) is available, but it is not *specified*. Besides, it might be unclear whether the kernelspec is part of the kernel protocol, or independent.
1614

1715
## Proposed Enhancement
1816

19-
We propose to specify the kernelspec with the JSON schema joined in this PR. The specification is conform
20-
to [the current description of the kernelspec](https://jupyter-client.readthedocs.io/en/stable/kernels.html#kernel-specs),
21-
and adds an optional `protocol_version` field.
17+
We propose to specify the kernelspec with the JSON schema joined in this PR. The specification would reflect
18+
[the current description of the kernelspec](https://jupyter-client.readthedocs.io/en/stable/kernels.html#kernel-specs),
19+
and adds an optional `kernel_protocol_version` field.
2220

23-
[A dedicated repo](https://github.com/jupyter-standards/kernelspec) for the specification and the documentation of
24-
the kernelspec has been created.
21+
The specification and the documentation of the kernelspec will be stored aside [those of the kernel protocol](https://github.com/jupyter-standards/kernel-protocol)
2522

2623
### Impact on existing implementations
2724

kernelspec-spec/kernelspec.schema.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
3-
"$id": "https://standards.jupyter.org/kernelspec.schema.json",
4-
"title": "Kernelspec",
5-
"description": "Specification of the kernelspec file",
3+
"$id": "https://schemas.jupyter.org/kernelspec-v1.0.schema.json",
4+
"title": "Jupyter Kernelspec",
5+
"description": "A description of the data required to start and manage a Jupyter Kernel",
66
"type": "object",
7+
78
"properties": {
89
"argv": {
910
"description": "A list of command line arguments used to start the kernel. The text {connection_file} in any argument will be replaced with the path to the connection file.",
@@ -22,13 +23,14 @@
2223
"type": "string"
2324
},
2425
"kernel_protocol_version": {
25-
"description": "The version of protocol this kernel implements. If not specified, the client will assume the version is <5.5 until it can get it via the kernel_info request.",
26-
"type": "string"
26+
"description": "The version of protocol this kernel implements. If not specified, the client will assume the version is <5.5 until it can get it via the kernel_info request. The kernel protocol uses semantic versioning (SemVer).",
27+
"type": "string",
28+
"pattern": "^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$"
2729
},
2830
"interrupt_mode": {
2931
"description": "May be either signal or message and specifies how a client is supposed to interrupt cell execution on this kernel, either by sending an interrupt signal via the operating system’s signalling facilities (e.g. SIGINT on POSIX systems), or by sending an interrupt_request message on the control channel (see Kernel interrupt). If this is not specified the client will default to signal mode.",
3032
"type": "string",
31-
"enume": ["signal", "message"]
33+
"enum": ["signal", "message"]
3234
},
3335
"env": {
3436
"description": "A dictionary of environment variables to set for the kernel. These will be added to the current environment variables before the kernel is started. Existing environment variables can be referenced using ${<ENV_VAR>} and will be substituted with the corresponding value. Administrators should note that use of ${<ENV_VAR>} can expose sensitive variables and should use only in controlled circumstances.",
@@ -37,7 +39,8 @@
3739
},
3840
"metadata": {
3941
"description": "A dictionary of additional attributes about this kernel; used by clients to aid in kernel selection. Metadata added here should be namespaced for the tool reading and writing that metadata.",
40-
"type": "object"
42+
"type": "object",
43+
"additionalProperties": {"type": "object"}
4144
}
4245
},
4346
"required": ["argv", "display_name", "language"]

0 commit comments

Comments
 (0)