-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow marimo configuration in notebook.py as script metadata (p…
…er PEP 723) (#3794)
- Loading branch information
Showing
13 changed files
with
415 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# /// script | ||
# requires-python = ">=3.12" | ||
# dependencies = [ | ||
# "marimo", | ||
# ] | ||
# [tool.marimo.runtime] | ||
# auto_instantiate = false | ||
# on_cell_change = "lazy" | ||
# [tool.marimo.display] | ||
# theme = "dark" | ||
# cell_output = "below" | ||
# /// | ||
import marimo | ||
|
||
__generated_with = "0.11.4" | ||
app = marimo.App(width="medium") | ||
|
||
|
||
@app.cell | ||
def _(): | ||
import marimo as mo | ||
|
||
return (mo,) | ||
|
||
|
||
@app.cell | ||
def _(mo): | ||
mo.md( | ||
r""" | ||
This is not auto-run because it has custom marimo configuration in the file header: | ||
```toml | ||
[tool.marimo.runtime] | ||
auto_instantiate = false | ||
on_cell_change = "lazy" | ||
``` | ||
""" | ||
) | ||
return | ||
|
||
|
||
if __name__ == "__main__": | ||
app.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.