Skip to content

improvement: marimo export ipynb with outputs#3048

Merged
mscolnick merged 12 commits intomainfrom
ms/ipynb-include-outputs
Dec 5, 2024
Merged

improvement: marimo export ipynb with outputs#3048
mscolnick merged 12 commits intomainfrom
ms/ipynb-include-outputs

Conversation

@mscolnick
Copy link
Copy Markdown
Contributor

@mscolnick mscolnick commented Dec 3, 2024

Fixes #2960

📝 Summary

add --include-outputs for marimo export. The goal for this is to export to ipynb so they can be committed to git and viewable in GitHub. GitHub doesn't allow scripts/styles that are remote (they get sanitized), so web-components or widgets (including anywidgets) do not get shown.

Instead, we will output markdown as that will be best rendered in GitHub's notebook renderer.

e.g.

# with outputs
marimo export ipynb notebook.py -o notebook.ipynb --include-outputs
# without outputs (default)
marimo export ipynb notebook.py -o notebook.ipynb --no-include-outputs

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 5, 2024 2:38pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 5, 2024 2:38pm

@@ -0,0 +1,250 @@
{
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

akshayka
akshayka previously approved these changes Dec 4, 2024
Copy link
Copy Markdown
Contributor

@akshayka akshayka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Does this work with

  1. matplotlib plots
  2. plotly
  3. altair (looks like not yet?)

?

Copy link
Copy Markdown
Contributor

@akshayka akshayka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed the failing tests — let me know if help is needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

marimo export ipynb should include outputs, cell order, and other metadata

2 participants