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

auto-download for marimo ipynb #2961

Open
mscolnick opened this issue Nov 25, 2024 · 5 comments
Open

auto-download for marimo ipynb #2961

mscolnick opened this issue Nov 25, 2024 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@mscolnick
Copy link
Contributor

Description

We already support auto-exporting HTML. We should add auto-exporting for ipynb in top-down order with the outputs, so that users can commit these files to github and view them natively.

Suggested solution

An additional option in this dropdown

Image

Alternative

No response

Additional context

No response

@mscolnick mscolnick added the enhancement New feature or request label Nov 25, 2024
@mscolnick mscolnick added this to the marimo 1.0.0 milestone Nov 25, 2024
@mscolnick mscolnick changed the title auto-export of marimo ipynb auto-download for marimo ipynb Nov 25, 2024
@liquidcarbon
Copy link
Contributor

liquidcarbon commented Nov 27, 2024

How do you feel about supporting Quarto?

Instead of generating a complicated JSON, you could be generating a git-friendly .qmd markdown file. Much simpler to compose and maintain. I can help with that.

Quarto then can take care of IPYNB generation - .ipynb <-- quarto convert --> .qmd (it works via pandoc). QMD files can also run directly like notebooks via VS Code plugin.

Either in addition to this, or as an alternative, how about:

  1. set up an API for generating .qmd files; it needs a frontmatter template (YAML)
  2. give an option for also saving .ipynb via quarto convert (also through the file manager)

@liquidcarbon
Copy link
Contributor

Ditto for #2960 - it's already solved in Quarto

@akshayka
Copy link
Contributor

A community member (@dmadisetti) has developed an experimental Quarto extension but it hasn't gotten much use yet I believe: https://github.com/dmadisetti/quarto-marimo

The main point of supporting ipynb is two-fold:

  1. View notebook with outputs on GitHub (qmd doesn't render on GitHub I believe).
  2. Compatibility with ecosystem of tooling built around ipynb files (such as static site generation and inclusion in docs), to make it easier for existing Jupyter users to adopt marimo.

In this case the point isn't to be git-friendly. If I understand correctly, qmd files don't include outputs like plots, etc, making them git-friendly but not suitable for output snapshots.

@liquidcarbon
Copy link
Contributor

liquidcarbon commented Nov 27, 2024

They don't, they're simply text, like marimo. But in order to render outputs, you would need the machinery to execute notebooks. Quarto takes care of that.

Also interested in how all the interactivity and built-in APIs would render in a Jupyter environment.

Env management may be tricky, but this is where puppy's pup.fetch should be helpful. It works the same in any interactive python environment.

Basically, my proposal is this: marimo takes care of .py -> .qmd, and wraps Quarto for generating and executing .ipynb, just like it wraps ruff or black.

@liquidcarbon
Copy link
Contributor

Check out #2994

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants