nellyg
nellyg7mo ago

We are exploring using marimo for more

We are exploring using marimo for more of our reporting needs now. One of our potential use cases is a report that a user needs to generate and attach to a PR that they make. Unfortunately, github doesn't really support inserting html like that. My initial thought was looking to add a png export from the command line. Not sure if there are better ideas how you might attach a report like that to a PR? We could always upload the HTML somewhere else and link it. We just have no use for these reports outside of the PR context so I don't particularly want to store them somehwere else.
4 Replies
Myles Scolnick
Myles Scolnick7mo ago
export to png would be a bit tough - you would need a headless browser im pretty sure (like selenium) to render the html -> png. there might be an existing CLI (could be python or not) that does that for you. another option would be using https://github.com/actions/upload-artifact you can then use another github action to post to the PR with the artifact URL (which would render html to view)
GitHub
GitHub - actions/upload-artifact
Contribute to actions/upload-artifact development by creating an account on GitHub.
nellyg
nellygOP7mo ago
GitHub will render the HTML in a PR? I’ll give it a look thanks!
dmad
dmad7mo ago
You could use markdown mode, it renders nicely: https://github.com/marimo-team/marimo/blob/main/marimo/_tutorials/markdown_format.md You can also go from markdown -> pdf or markdown with inline outputs with pandoc
GitHub
marimo/marimo/_tutorials/markdown_format.md at main · marimo-team/m...
A reactive notebook for Python — run reproducible experiments, execute as a script, deploy as an app, and version with git. - marimo-team/marimo
Myles Scolnick
Myles Scolnick7mo ago
GitHub won’t render the html but you can provide a link to the hosted static html which you can use GitHub artifacts as the CDN