Skip to content
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

Command line method for converting .ipynb to .NET console project #1275

Open
jonsequitur opened this issue Apr 19, 2021 · 4 comments
Open

Command line method for converting .ipynb to .NET console project #1275

jonsequitur opened this issue Apr 19, 2021 · 4 comments
Labels
Area-Automation Relating to non-interactive execution of notebooks and scripts enhancement New feature or request

Comments

@jonsequitur
Copy link
Contributor

Emitting a console project would enable publishing a "notebook" as an ordinary console application.

Specific variables within the notebook should be able to be exposed as command line options to enable runtime parameterization.

Related: #483, #890

@jonsequitur jonsequitur added enhancement New feature or request Area-Automation Relating to non-interactive execution of notebooks and scripts labels Apr 19, 2021
@WhiteBlackGoose
Copy link
Contributor

Something as simple as

dotnet new console
rm program.cs
jupyter nbconvert --to script notebook.ipynb
move notebook.cs program.cs

@jonsequitur
Copy link
Contributor Author

We'll probably want it to be supported directly, e.g.

> dotnet-interactive publish --format csproj --source /path/to/my.ipynb --destination /path/to/output/folder

We'll want to generate a Main method that defines command line options corresponding to variables in the notebook that have been identified as parameterizable. Those values then have to be populated in the kernel(s) that we create.

needs to be able to work for notebooks containing multiple languages.

@brettfo
Copy link
Member

brettfo commented Jun 1, 2021

A related scenario of converting a .ipynb notebook to a .dib via the command line would also be immensely useful.

@jonsequitur
Copy link
Contributor Author

See: #482.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Automation Relating to non-interactive execution of notebooks and scripts enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants