Execute ipnb
File via API, resp. in Batch mode
#1390
Replies: 2 comments 1 reply
-
This is something we're working on. You can see the related issues under this label: https://github.com/dotnet/interactive/issues?q=is%3Aopen+is%3Aissue+label%3AArea-Automation The events returned by the |
Beta Was this translation helpful? Give feedback.
-
Thanks, this already helps me a bit futher; Which kernel would you recommend for this kind of 'end-user'-interaction?
However, this seems to cause some sort of infinite loop, |
Beta Was this translation helpful? Give feedback.
-
For our research code, in the past, we used some C#-scripting module from Mono (
Mono.CSharp.dll
) as a scripting frontend, we even created our own, custom (but glitchy) notebook GUI.Now, we want to move everything towards dotnet-interactive, resp. Jupyter notebooks.
A typical use-case is the following:
We further used these worksheets in our test-procedure:
I allready managed to convert our custom notebooks to
ipnb
, using mostly members of theMicrosoft.DotNet.Interactive.Notebook
namespace.Now, I also want to execute those notebooks which we use for testing as a unit test. I could theoretically use
jupyter nbconvert --execute ...
, but I'm wondering if there is any option which does not depend on an existing Jupyter installation.I already managed to execute a single command by
CSharpKerner.SendAsync(...)
, which seems to work; at least, I can fetch variables throughCSharpKernel.TryGetVariable(...)
. However, I am missing some general way to check if the execution went well or not, i.e. a check for uncaught exceptions, syntax errors, etc.Is there any way of executing an entire notebook and check whether some Exception or NUnit Assertion has been raised, or if any Syntax error occurs?
(Either command-by-command or the entire notebook at once?)
Beta Was this translation helpful? Give feedback.
All reactions