Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

.dib metadata support - #2259

Merged
jonsequitur merged 5 commits into
dotnet:mainfrom
jonsequitur:dib-metadata-support
Sep 15, 2022
Merged

jonsequitur merged 5 commits into
dotnet:mainfrom
jonsequitur:dib-metadata-support

Conversation

@jonsequitur

Copy link
Copy Markdown
Contributor

This fixes #2184.

@jonsequitur
jonsequitur enabled auto-merge (squash) September 15, 2022 17:49
@@ -0,0 +1,27 @@
#!meta

{"kernelInfo":{"defaultKernelName":"csharp","items":[{"aliases":["cs","C#","c#"],"name":"csharp"},{"aliases":["fs","F#","f#"],"name":"fsharp"},{"aliases":["powershell"],"name":"pwsh"},{"name":"mermaid"},{"name":"javascript"}]}}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we format/indent this? It's kind-of meaningful to human eyes and if/when this changes, the diff will be more manageable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it should work if formatted over multiple lines, but I need to add a test for that.

public string? Language { get; set; }
public string? KernelName { get; set; }

// FIX: (InteractiveDocumentElement) add this back

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Language won't need to be added back; it can be looked up via the metadata.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean kernel info? The goal here is to not have to spin up the kernel in order to know some of these things.

@brettfo

brettfo commented Sep 15, 2022

Copy link
Copy Markdown
Member

The bottom of NotebookTestScript.dib has a dib-writing scenario that'll need to be updated.

@jonsequitur
jonsequitur merged commit 769f293 into dotnet:main Sep 15, 2022
@colombod colombod added the enhancement New feature or request label Oct 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add #!metadata kernel

3 participants