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.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
chore: make touchup (#4469)
Myles Scolnick018794db09e4
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 7592a3ba7f..0bf7ec3d02 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -23,8 +23,14 @@ or [on Discord](https://marimo.io/discord?ref=contributing).To build marimo from source, you'll need to have Node.js, pnpm, GNU make, Python (>=3.9), and Hatch installed.-- Install [Node.js](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm#using-a-node-version-manager-to-install-nodejs-and-npm) >= 18- - We use Node.js version 20+You can check for pre-requisites with:++```bash+make check-prereqs+```++- Install [Node.js](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm#using-a-node-version-manager-to-install-nodejs-and-npm) >= 20+ - We use Node.js version 23- Install [pnpm](https://github.com/pnpm/pnpm) == 9.x- `npm install -g pnpm@9`- Install [GNU Make](https://www.gnu.org/software/make/) (you may already have it installed)@@ -36,9 +42,7 @@ To build marimo from source, you'll need to have Node.js, pnpm, GNU make, PythonAnd you'll need [pre-commit](https://pre-commit.com/) to run some validation checks:```bash-pipx install pre-commit-# or `pip install pre-commit` if you have a virtualenv-# or `brew install pre-commit`+uv tool install pre-commit```You can optionally install pre-commit hooks to automatically run the validation checks@@ -92,27 +96,27 @@ NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=development make fe -B| Command | Category | Description || -------------- | --------- | -------------------------------------------------------------- |-| `help` | General | Show this help |-| `py` | Setup | Editable python install; only need to run once |-| `install-all` | Setup | Install everything; takes a long time due to editable install |-| `fe` | Build | Package frontend into `marimo/` |-| `fe-codegen` | Build | Build [api specification](./development_docs/openapi.md) |-| `wheel` | Build | Build wheel |-| `check` | Test | Run all checks |-| `check-test` | Test | Run all checks and tests |-| `test` | Test | Run all tests |-| `fe-check` | Lint/Test | Check frontend |-| `fe-test` | Test | Test frontend |-| `e2e` | Test | Test end-to-end |-| `fe-lint` | Lint | Lint frontend |-| `fe-typecheck` | Lint | Typecheck frontend |-| `py-check` | Lint | Check python |-| `py-test` | Test | Test python |-| `py-snapshots` | Test | Update HTML snapshots |-| `storybook` | Docs | Run Storybook |-| `docs` | Docs | Build docs. Use `make ARGS="-a" docs` to force docs to rebuild |-| `docs-serve` | Docs | Serve docs |-| `docs-clean` | Docs | Remove built docs |+| `help` | General | 📖 Show available commands |+| `install-all` | Setup | 🚀 First-time setup: Install all dependencies (frontend & Python) |+| `check-prereqs`| Setup | ✓ Check if all required tools are installed |+| `py` | Setup | 🐍 Install Python dependencies in editable mode |+| `fe` | Build | 🔧 Build frontend assets |+| `test` | Test | 🧪 Run all tests (frontend, Python, end-to-end) |+| `check` | Test | 🧹 Run all checks |+| `fe-check` | Lint/Test | 🧹 Check frontend (lint, typecheck) |+| `fe-test` | Test | 🧪 Test frontend |+| `e2e` | Test | 🧪 Test end-to-end |+| `fe-lint` | Lint | 🧹 Lint frontend |+| `fe-typecheck` | Lint | 🔍 Typecheck frontend |+| `fe-codegen` | Build | 🔄 Generate frontend API |+| `py-check` | Lint | 🔍 Typecheck, lint, format python |+| `typos` | Lint | 🔍 Check for typos |+| `py-test` | Test | 🧪 Test python |+| `py-snapshots` | Test | 📸 Update snapshots |+| `wheel` | Build | 📦 Build wheel |+| `docs` | Docs | 📚 Build docs |+| `docs-serve` | Docs | 📚 Serve docs |+| `storybook` | Docs | 🧩 Start Storybook for UI development |## Lint, Typecheck, Formatdiff --git a/Makefile b/Makefileindex 7ae4b46cab..2e10c3b66f 100644--- a/Makefile+++ b/Makefile@@ -1,111 +1,151 @@+# Makefile for marimo - Development and build tasks+# Prerequisites:+# - hatch: for environment permutations management and testing+# - uv: for Python dependency management+# - pnpm: for frontend development+# - Node.js: for frontend development+.PHONY: help-# show this help+# 📖 Show available commandshelp:- @# prints help for rules preceded with comment- @# https://stackoverflow.com/a/35730928- @awk '/^#/{c=substr($$0,3);next}c&&/^[[:alpha:]][[:alnum:]_-]+:/{print substr($$1,1,index($$1,":")),c}1{c=0}' Makefile | column -s: -t+ @printf "\nMarimo Development Commands:\n\n"+ @awk '/^#/{c=substr($$0,3);next}c&&/^[[:alpha:]][[:alnum:]_-]+:/{printf " \033[36m%-20s\033[0m %s\n", substr($$1,1,index($$1,":")-1),c}1{c=0}' $(MAKEFILE_LIST)+ @printf "\nRun 'make check-prereqs' and 'make install-all' to get started!\n\n"++###############+# Setup Tasks #+###############++.PHONY: install-all+# 🚀 First-time setup: Install all dependencies (frontend & Python)+install-all: fe py++.PHONY: check-prereqs+# ✓ Check if all required tools are installed+check-prereqs:+ @command -v pnpm >/dev/null 2>&1 || { echo "pnpm is required. See https://pnpm.io/installation"; exit 1; }+ @pnpm -v | grep -q "9." || { echo "pnpm v9+ is required. Current version: $(shell pnpm -v)"; exit 1; }+ @command -v uv >/dev/null 2>&1 || { echo "uv is required. See https://docs.astral.sh/uv/getting-started/installation/"; exit 1; }+ @command -v hatch >/dev/null 2>&1 || { echo "hatch is required. See https://hatch.pypa.io/dev/install/"; exit 1; }+ @command -v node >/dev/null 2>&1 || { echo "Node.js is required. See https://nodejs.org/en/download/"; exit 1; }+ @node -v | grep -q "v2[0-9]" || { echo "Node.js v20+ is required. Current version: $(shell node -v)"; exit 1; }+ @echo "✅ All prerequisites are installed!"++.PHONY: py+# 🐍 Install Python dependencies in editable mode+py:+ @command -v uv >/dev/null 2>&1 || { echo "uv is required. See https://docs.astral.sh/uv/getting-started/installation/"; exit 1; }+ uv pip install -e ".[dev]"++######################+# Development Tasks #+######################-# package frontend into marimo/.PHONY: fe+# 🔧 Build frontend assetsfe: marimo/_static marimo/_lsp-# install/build frontend if anything under frontend/src or (top-level)-# frontend/ has changed+# 🔧 Install/build frontend if anything under frontend/marimo/_static: $(shell find frontend/src) $(wildcard frontend/*)+ @command -v pnpm >/dev/null 2>&1 || { echo "pnpm is required. See https://pnpm.io/installation"; exit 1; }cd frontend; pnpm install; cd ..; ./scripts/buildfrontend.sh-# install/build lsp if anything in lsp/ has changed+# 🔧 Install/build lsp if anything in lsp/ has changedmarimo/_lsp: $(shell find lsp)cd lsp; pnpm install; cd ..; ./scripts/buildlsp.sh-.PHONY: py-# editable python install; only need to run once-py:- pip install -e ".[dev]"--.PHONY: check-# run all checks-check: fe-check py-check--.PHONY: check-test-# run all checks and tests-check-test: check fe-test py-test e2e+#############+# Testing #+#############.PHONY: test-# run all checks and tests+# 🧪 Run all tests (frontend, Python, end-to-end)test: fe-test py-test e2e+.PHONY: check+# 🧹 Run all checks+check: fe-check py-check+.PHONY: fe-check-# check frontend+# 🧹 Check frontend (lint, typecheck)fe-check: fe-lint fe-typecheck.PHONY: fe-test-# test frontend+# 🧪 Test frontendfe-test:cd frontend; CI=true pnpm turbo test.PHONY: e2e-# test end-to-end+# 🧪 Test end-to-ende2e:cd frontend; pnpm playwright install; pnpm playwright test.PHONY: fe-lint+# 🧹 Lint frontendfe-lint:cd frontend/src && typos && cd - && cd frontend && pnpm lint.PHONY: fe-typecheck+# 🔍 Typecheck frontendfe-typecheck:cd frontend; pnpm turbo typecheck.PHONY: fe-codegen+# 🔄 Generate frontend APIfe-codegen:uv run marimo development openapi > openapi/api.yaml; \cd openapi; pnpm install; pnpm codegen; \biome format --fix src/api.ts;.PHONY: py-check-# typecheck, lint, format python+# 🔍 Typecheck, lint, format pythonpy-check:./scripts/pycheck.sh+.PHONY: typos+# 🔍 Check for typos+typos:+ hatch run typos+.PHONY: py-test-# test python+# 🧪 Test pythonpy-test:- cd marimo && typos && cd - && hatch run +py=3.12 test-optional:test+ @command -v hatch >/dev/null 2>&1 || { echo "hatch is required. See https://hatch.pypa.io/dev/install/"; exit 1; }+ hatch run typos && hatch run +py=3.12 test-optional:test $(ARGS).PHONY: py-snapshots-# update snapshots+# 📸 Update snapshotspy-snapshots:hatch run +py=3.12 test:test \tests/_server/templates/test_templates.py \tests/_server/api/endpoints/test_export.py \tests/test_api.py-.PHONY: install-all-# install everything; takes a long time due to editable install-install-all: fe py+##############+# Packaging #+##############.PHONY: wheel-# build wheel+# 📦 Build wheelwheel:hatch build-.PHONY: storybook-storybook:- cd frontend; pnpm storybook++#################+# Documentation #+#################.PHONY: docs-# build docs-# use make ARGS="-a" docs to force docs to rebuild, useful when-# modifying static files / assets+# 📚 Build docsdocs:- hatch run docs:build $(ARGS)+ hatch run docs:build.PHONY: docs-serve+# 📚 Serve docsdocs-serve:- hatch run docs:serve $(ARGS)+ hatch run docs:serve-.PHONY: docs-clean-# remove built docs-docs-clean:- hatch run docs:clean+.PHONY: storybook+# 🧩 Start Storybook for UI development+storybook:+ cd frontend; pnpm storybook