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

Import .NET notebook as module #322

Open

Description

@roberchi

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 :-)

Activity

  1. jonsequitur commented on May 9, 2020

    @jonsequitur
    Contributor

    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 (Publish ExtensionLab NuGet packages #398).

  2. jonsequitur commented on May 9, 2020

    @jonsequitur
    Contributor
  3. roberchi commented on May 9, 2020

    @roberchi
    Author

    @jonsequitur by my side, extends #load directive to support .ipynb is a great idea.

  4. LadyNaggaga commented on May 9, 2020

    @LadyNaggaga
    Contributor

    I think this would a very useful feature too. I am onboard

  5. added
    Area-C#
    Area-F#
    on Aug 12, 2020
  6. added
    Area-Packages and Extensions
    on Jun 29, 2021
  7. jonsequitur commented on Jun 29, 2021

    @jonsequitur
    Contributor

    Maybe this should be #r "notebook:/path/to/notebook"

  8. added
    enhancement
    on Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-C#Area-F#Area-Packages and Extensionsenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions