Open roberchi opened 4 years ago
I think this would be a very useful feature to include and we'd be happy to help you with a PR.
There are a few things to consider:
Is #!import
the right name? The F# and C# interactive tools (CSI and FSI) both currently support a #load
directive:
CSI's #load
directive is used to load .csx.
scripts
FSI's #load
directive is used to load .fs
source files or .fsx
scripts.
So "load" might be a more familiar term here, but a distinction between #load
and #!load
seems confusing. We could potentially shadow the underlying #load
directives and augment them with additional functionality to add support for .ipynb
(and possibly other formats.)
We might consider iterating on this in our extension lab. We plan to publish these as NuGet packages (#398).
@LadyNaggaga @cartermp @tmat @KevinRansom Thoughts on this?
@jonsequitur by my side, extends #load directive to support .ipynb is a great idea.
I think this would a very useful feature too. I am onboard
Maybe this should be #r "notebook:/path/to/notebook"
I create a simple extension here https://github.com/roberchi/Chino.Jupyter.Extensions to support the loading .NET notebook as modules in order to create a kind of library of notebooks. The extension simply load the notebook specified #!import [path\notebook] by loading the json definition and execute each code cell in the same handling kernel of the extension. Do you think colud be a relevant feature and can be included in the core? I'm not expert in the kernel implementation and extension so my code need to be reviewed and improved :-)