Comments (5)
could it be header_comment
or just header
in the markdown? since it would be nice to preserve these comments and since both script
and nix
are slightly different in their comment structuer
from marimo.
That would be nice because there might be other header comments that could be leveraged.
Arguments for having sections:
- Most / single hashbangs aren't useful since
.md
files aren't runnable - writing the env becomes more cumbersome and prone to error
- In the header form (even with
#
stripped out), the block would still have to be parsed to be usable and require sandbox / nix particular logic for the consumer
from marimo.
the block would still have to be parsed to be usable and require sandbox / nix particular logic for the consumer
Why does it? Why can't we just not touch the header and leave it as is? I don't think marimo can/should be opinionated on how to construct the env, especially since there isn't one way.
from marimo.
I think there should be parity with the python format. So even if there isn't a nix
section, maybe there should be a sandbox
section that extracts the relevant # /// script
section. Even though there's not one way to bootstrap an env, the marimo seems to be embracing the PEP specification
from marimo.
Could we not go a level higher, and instead of preserving # /// script
, we just preserve the whole comment as-in without any modification?
---
title: Notebook
marimo-version: 0.0.0
width: medium
comment: |
#! /usr/bin/env nix
#! nix shell --impure --expr ``
#! nix with (import (builtins.getFlake ''nixpkgs'') {});
#! nix python311.withPackages (
#! nix ps: with ps; [ marimo uv setuptools ]
#! nix )
#! nix ``
#! nix --command marimo edit --sandbox
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "numpy",
# ]
# ///
---
from marimo.
Related Issues (20)
- `alert` arg for `marimo.status.progress_bar` HOT 6
- [anywidget compat]: Nested binary data needs to be base64-decoded in frontend HOT 3
- marimo edit not working HOT 3
- download pdf gives totally blank preview, possibly only on windows HOT 4
- download as html missing markdown cell, and includes no outputs HOT 6
- configuration: allow `tab` to insert spaces at the end of a line HOT 6
- Support pyecharts library HOT 1
- Using uv with symlinks breaks install HOT 1
- Configurable auto-export location HOT 6
- Hide markdown duplication in 'edit' view. HOT 1
- import order matters when running as `marimo edit my-notebook.py` vs `python my-notebook.py` on the same environment HOT 9
- Missing closing marimo-filename tag when exporting with MarimoIslandGenerator HOT 3
- Multiple text boxes display bug HOT 1
- matplotlib: rc file not work HOT 8
- Enable user copy rendering code from `mo.ui.data_explorer` HOT 1
- import yaml not found while present (only import with issue) HOT 3
- Run apps in sandbox by default HOT 3
- Run in sandbox doesn't install missing packages when running an app from a URL
- Ability to add multiple dependencies and pressing ENTER to submit in Package Manager tab
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marimo.