Skip to content

Commit c665c50

Browse files
authored
Merge pull request #280 from craigcitro/doc
Clarify recommended use of metadata in docs.
2 parents 420cf25 + 7cd3c6e commit c665c50

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docs/api/kernelspec.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ kernelspec - discovering kernels
3030
Additional kernel-specific metadata; clients can use this as needed,
3131
for instance to aid in kernel selection and filtering.
3232

33+
Metadata added here should be namespaced for the tool reading and
34+
writing that metadata. Concretely, if you're adding a new field called
35+
:code:`supported_versions` which your tool recognizes, then you should
36+
add it as :code:`"mytool": {"supported_versions": [1, 2]}`, **not** as a
37+
top-level field called :code:`supported_versions`.
38+
3339
.. attribute:: resource_dir
3440

3541
The path to the directory with this kernel's resources, such as icons.

docs/kernels.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ JSON serialised dictionary containing the following keys and values:
136136
These will be added to the current environment variables before the kernel is
137137
started.
138138
- **metadata** (optional): A dictionary of additional attributes about this
139-
kernel; used by clients to aid clients in kernel selection.
139+
kernel; used by clients to aid clients in kernel selection. Metadata added
140+
here should be namespaced for the tool reading and writing that metadata.
140141

141142
For example, the kernel.json file for IPython looks like this::
142143

0 commit comments

Comments
 (0)