-
-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration with VS Code Notebooks #411
Comments
Hmm, that could prove interesting. I'll have to have a look at how the koans render in the Notebook mode. All the examples given in the blog post are pretty tame, no indication of how a comment inside a scriptblock is rendered... Perhaps it's worth asking @TylerLeonhardt and possibly others whether a Pester test could be rendered in a specific way that might help us out. 😉 |
Pester tests are a weird one because they have huge blocks of code. Markdown cells in the mix of that would break those up.... Unless the describe blocks are small... But I don't think that's true for PSKoans, right? |
Yeah, not really, no... the general format is: <#
Introductory paragraph(s).
#>
Describe 'Thing' {
Context 'Part 1' {
<#
Detail sentence/paragraph(s)
#>
...
}
Context 'Part 2' {
<#
Detail sentence/paragraph(s)
#>
...
}
} Many of the I was wondering if it's possible to define a custom view for the notebook mode? Such that, for example, for PSKoans it could render Describe / Context / It as various heading levels, and then comments more or less where they're at in the code (as Markdown), with the code for each |
Yeah this would need a substantial change to Notebook Mode... With that said, maybe there is an opportunity to implement a Notebook UI in https://github.com/TylerLeonhardt/vscode-powershell-test-adapter Where the play button would run the test/tests inside the code block. |
I don't really have time to work on that, but such an experience could be realized that way |
Appreciate the pointers! 💖 It'll be something to look into when I get some time 🙂 |
Describe "Functionality"
I just read the PS blog on PowerShell VS Code notebook public preview and the first thing I thought where this might be useful was in
PSKoans
.Its able to take ps1 scripts with comments formatted in markdown and display that in a notebook view. The code is then in a panel and is able to run in the same view like in a Jupyter notebook.
Context "Private or Public? What are the use cases? Parameters? Options?"
This can give additional formatting and "UI" around each Koan for people who just want to see the instructions and code snippet they're working on instead of the whole script.
Context "Additional Information"
The text was updated successfully, but these errors were encountered: