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
fix: # %% in export script (#1350)
Akshay Agrawal74047bae0eb7
diff --git a/marimo/_server/export/exporter.py b/marimo/_server/export/exporter.pyindex 75b51d04f3..e53f0d5ac0 100644--- a/marimo/_server/export/exporter.py+++ b/marimo/_server/export/exporter.py@@ -110,13 +110,10 @@ class Exporter:graph = file_manager.app.graphcodes: list[str] = [- graph.cells[cid].code+ "# %%\n" + graph.cells[cid].codefor cid in dataflow.topological_sort(graph, graph.cells.keys())]- code = (- f'\n__generated_with = "{__version__}"\n\n'- + "\n\n# ---\n\n".join(codes)- )+ code = f'\n__generated_with = "{__version__}"\n\n' + "\n\n".join(codes)download_filename = get_download_filename(file_manager, ".script.py")return code, download_filenamediff --git a/marimo/_utils/marimo_path.py b/marimo/_utils/marimo_path.pyindex f14b6dfeeb..68d2d2ab64 100644--- a/marimo/_utils/marimo_path.py+++ b/marimo/_utils/marimo_path.py@@ -1,3 +1,4 @@+# Copyright 2024 Marimo. All rights reserved.from __future__ import annotationsfrom pathlib import Pathdiff --git a/tests/_cli/snapshots/script.txt b/tests/_cli/snapshots/script.txtindex 6525b9c1bb..87dc8a0a85 100644--- a/tests/_cli/snapshots/script.txt+++ b/tests/_cli/snapshots/script.txt@@ -1,8 +1,8 @@__generated_with = "0.0.0"+# %%import marimo as mo-# ----+# %%slider = mo.ui.slider(0, 10)