Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

docs: fix some outdated docs/tutorial (#2530)

Akshay Agrawal225d1fe718e7
diff --git a/docs/_static/docs-cell-actions.png b/docs/_static/docs-cell-actions.png
index c77b9cc863..fb837c90e4 100644
Binary files a/docs/_static/docs-cell-actions.png and b/docs/_static/docs-cell-actions.png differ
diff --git a/docs/guides/editor_features/overview.md b/docs/guides/editor_features/overview.md
index 4f330238e9..db066973f9 100644
--- a/docs/guides/editor_features/overview.md
+++ b/docs/guides/editor_features/overview.md
@@ -4,6 +4,7 @@ This guide introduces some of marimo editor's features, including
a variables panel, dependency graph viewer, table of contents, HTML export,
GitHub copilot, code formatting, a feedback form, and more.
+
## Configuration
The editor exposes of a number of settings for the current notebook,
@@ -11,13 +12,10 @@ as well as user-wide configuration that will apply to all your notebooks.
These settings include the option to display the current notebook in
full width, to use vim keybindings, to enable GitHub copilot, and more.
-To access these settings, click the gear icon in the top-right of the editor.
+To access these settings, click the gear icon in the top-right of the editor:
-<div align="left">
-<figure>
-<img src="/_static/docs-user-config.png"/ style="height:80px">
-<figcaption>Configure settings.</figcaption>
-</figure>
+<div align="center">
+<img src="/_static/docs-user-config.png" />
</div>
A non-exhaustive list of settings:
@@ -44,56 +42,32 @@ marimo supports vim keybindings.
- `gd` - go to definition
- `dd` - when a cell is empty, delete it
-<div align="center">
-<figure>
-<img src="/_static/docs-settings.png"/>
-<figcaption>Click the gear icon to access notebook and editor settings.</figcaption>
-</figure>
-</div>
-
## Overview panels
-marimo ships with the IDE panels that provide an overview of your notebook:
+marimo ships with the IDE panels that provide an overview of your notebook
-::::{grid} 1 1 2 2
-:::{card}
-
-<figure>
-<img src="/_static/docs-panel-icons.png" style="height: 400px"/>
-</figure>
-:::
-
-:::{card}
-
-1. **file explorer**: view the file tree, open other notebooks
-2. **variables**: explore variable values, see where they are defined and used, with go-to-definition
-3. **data explorer**: see dataframe and table schemas at a glance
-4. **dependency graph**: view dependencies between cells, drill-down on nodes and edges
-5. **table of contents**: corresponding to your markdown
-6. **documentation** - move your text cursor over a symbol to see its documentation
-7. **logs**: a continuous stream of stdout and stderr
-8. **scratchpad**: a scratchpad cell where you can execute throwaway code
-9. **snippets** - searchable snippets to copy directly into your notebook
-10. **feedback** - share feedback!
-:::
-
-::::
+- **file explorer**: view the file tree, open other notebooks
+- **variables**: explore variable values, see where they are defined and used, with go-to-definition
+- **data explorer**: see dataframe and table schemas at a glance
+- **dependency graph**: view dependencies between cells, drill-down on nodes and edges
+- **package manager**: add and remove packages, and view your current environment
+- **table of contents**: corresponding to your markdown
+- **documentation** - move your text cursor over a symbol to see its documentation
+- **logs**: a continuous stream of stdout and stderr
+- **scratchpad**: a scratchpad cell where you can execute throwaway code
+- **snippets** - searchable snippets to copy directly into your notebook
+- **feedback** - share feedback!
These panels can be toggled via the buttons in the left of the editor.
## Cell actions
-Click the dot array to the right of a cell to pull up a context menu, or hold
-and drag to move the cell:
+Click the three dots in the top right of a cell to pull up a context menu,
+letting you format code, hide code, send a cell to the top or bottom of the
+notebook, give the cell a name, and more.
-<div align="center">
-<figure>
-<img src="/_static/docs-cell-actions.png"/>
-<figcaption>Access cell actions like code formatting, hiding code, and more
-through the cell context menu.</figcaption>
-</figure>
-</div>
+Drag a cell using the vertical dots to the right of the cell.
## Right-click menus
diff --git a/marimo/_tutorials/intro.py b/marimo/_tutorials/intro.py
index 1d17c8a5e7..6b3fb38d18 100644
--- a/marimo/_tutorials/intro.py
+++ b/marimo/_tutorials/intro.py
@@ -2,7 +2,7 @@
import marimo
-__generated_with = "0.7.19"
+__generated_with = "0.9.2"
app = marimo.App()
@@ -11,13 +11,13 @@ def __():
import marimo as mo
mo.md("# Welcome to marimo! 🌊🍃")
- return mo,
+ return (mo,)
@app.cell
def __(mo):
slider = mo.ui.slider(1, 22)
- return slider,
+ return (slider,)
@app.cell
@@ -120,7 +120,7 @@ def __(changed, mo):
@app.cell
def __():
changed = False
- return changed,
+ return (changed,)
@app.cell(hide_code=True)
@@ -210,13 +210,13 @@ def __(mo):
@app.cell
def __(mo):
icon = mo.ui.dropdown(["🍃", "🌊", "✨"], value="🍃")
- return icon,
+ return (icon,)
@app.cell
def __(icon, mo):
repetitions = mo.ui.slider(1, 16, label=f"number of {icon.value}: ")
- return repetitions,
+ return (repetitions,)
@app.cell
@@ -384,10 +384,10 @@ def __():
),
"Running": (
"""
- 1. _Run a cell_ by clicking the play ( ▷ ) button on the bottom
+ 1. _Run a cell_ by clicking the play ( ▷ ) button on the top
right of a cell, or by inputting `Ctrl/Cmd+Enter`.
- 2. _Run a stale cell_ by clicking the yellow run button to the
+ 2. _Run a stale cell_ by clicking the yellow run button on the
right of the cell, or by inputting `Ctrl/Cmd+Enter`. A cell is
stale when its code has been modified but not run.
@@ -425,10 +425,9 @@ def __():
),
"Disabling Cells": (
"""
- You can disable a cell via the cell context menu (open it
- by clicking the icon to the right of a cell). marimo will
- never run a disabled cell or any cells that depend on it. This
- can help prevent accidental execution of expensive computations
+ You can disable a cell via the cell context menu.
+ marimo will never run a disabled cell or any cells that depend on it.
+ This can help prevent accidental execution of expensive computations
when editing a notebook.
"""
),
@@ -466,7 +465,7 @@ def __():
"""
),
}
- return tips,
+ return (tips,)
if __name__ == "__main__":
diff --git a/marimo/_tutorials/sql.py b/marimo/_tutorials/sql.py
index 7f63949be3..e83270517b 100644
--- a/marimo/_tutorials/sql.py
+++ b/marimo/_tutorials/sql.py
@@ -2,7 +2,7 @@
import marimo
-__generated_with = "0.7.13"
+__generated_with = "0.9.2"
app = marimo.App()
@@ -122,11 +122,11 @@ def __(mo):
@app.cell(hide_code=True)
def __(mo):
- mo.md("## Querying dataframes with SQL")
+ mo.md("""## Querying dataframes with SQL""")
return
[email protected](hide_code=True)
def __(mo):
mo.md(r"""Let's take a look at a SQL cell. The next cell generates a dataframe called `df`.""")
return
@@ -213,7 +213,7 @@ def __(mo, string):
list(string.ascii_lowercase), label="token prefix", value="a"
)
token_prefix
- return token_prefix,
+ return (token_prefix,)
@app.cell
@@ -228,7 +228,7 @@ def __(df, mo, token_prefix):
-- Notice that we named the output variable `result`
"""
)
- return result,
+ return (result,)
@app.cell(hide_code=True)
@@ -253,7 +253,7 @@ def __(mo):
{charting_library}
"""
)
- return charting_library,
+ return (charting_library,)
@app.cell(hide_code=True)
@@ -324,7 +324,7 @@ def __(mo, result, token_prefix):
)
[email protected](hide_code=True)
def __(mo):
mo.md(r"""## CSVs, Parquet, Postgres, and more ...""")
return
@@ -365,7 +365,7 @@ def __(cars, mo):
SELECT * from cars;
"""
)
- return cars,
+ return (cars,)
@app.cell(hide_code=True)
@@ -403,7 +403,7 @@ def __(cars, cylinders_dropdown, mo, origin_dropdown):
ORIGIN = '{origin_dropdown.value}'
"""
)
- return filtered_cars,
+ return (filtered_cars,)
@app.cell(hide_code=True)
@@ -434,7 +434,7 @@ def __():
@app.cell(hide_code=True)
def __():
import string
- return string,
+ return (string,)
if __name__ == "__main__":