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
Add nbconvert to test-optional and change CI runner to macOS in Playwright workflow (#8712)
Myles Scolnicke06a6fd33382
diff --git a/frontend/e2e-tests/global-setup.ts b/frontend/e2e-tests/global-setup.tsindex 8d20c2f663..d70f585714 100644--- a/frontend/e2e-tests/global-setup.ts+++ b/frontend/e2e-tests/global-setup.ts@@ -23,7 +23,7 @@ async function globalSetup(_config: FullConfig) {while (retries > 0) {try {await page.goto(url, {- waitUntil: "networkidle",+ waitUntil: "load",timeout: 15_000,});console.log(`✅ ${app} ready`);diff --git a/frontend/e2e-tests/global-teardown.ts b/frontend/e2e-tests/global-teardown.tsindex 34db39dafa..684d3bbc0d 100644--- a/frontend/e2e-tests/global-teardown.ts+++ b/frontend/e2e-tests/global-teardown.ts@@ -10,10 +10,14 @@ async function globalTeardown() {console.log("🧹 Cleaning up test environment...");try {- // Kill any remaining marimo processes+ // Kill marimo processes and their parent uv processes.+ // On macOS, uv doesn't forward SIGTERM to children, so Playwright's+ // webServer termination hangs waiting for the uv process to exit.+ // Using SIGKILL (-9) ensures processes die immediately.try {- await execAsync("pkill -f 'marimo.*--headless' || true");- console.log("✅ Cleaned up marimo processes");+ await execAsync("pkill -9 -f 'marimo.*--headless' || true");+ await execAsync("pkill -9 -f 'uv.*marimo' || true");+ console.log("✅ Cleaned up marimo/uv processes");} catch {// Ignore errors - processes might not existconsole.log("⚠️ No marimo processes to clean up");diff --git a/marimo/_server/export/exporter.py b/marimo/_server/export/exporter.pyindex 192a14d846..eb88b7d0e0 100644--- a/marimo/_server/export/exporter.py+++ b/marimo/_server/export/exporter.py@@ -405,7 +405,7 @@ class Exporter:exc_info=e,)- from nbconvert import WebPDFExporter # type: ignore[import-not-found]+ from nbconvert import WebPDFExporterweb_exporter = WebPDFExporter() # type: ignore[no-untyped-call]web_exporter.exclude_input = not include_inputs@@ -499,7 +499,7 @@ class Exporter:import osimport tempfile- from nbconvert import SlidesExporter # type: ignore[import-not-found]+ from nbconvert import SlidesExporter# Add slideshow metadata so each cell becomes a slide.for cell in notebook.cells:@@ -512,7 +512,7 @@ class Exporter:# Convert to reveal.js HTMLslides_exporter = SlidesExporter() # type: ignore[no-untyped-call]slides_exporter.exclude_input = not include_inputs- html_data, _resources = slides_exporter.from_notebook_node(notebook) # type: ignore[no-untyped-call]+ html_data, _resources = slides_exporter.from_notebook_node(notebook)# Write HTML to a temp file for Playwright to loadwith tempfile.NamedTemporaryFile(diff --git a/pyproject.toml b/pyproject.tomlindex 1fe134471d..79919648bb 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -197,6 +197,7 @@ test-optional = ["litellm>=1.70.0",# exporting as ipynb"nbformat>=5.10.4",+ "nbconvert>=7.17.0","sympy>=1.13.3","jupytext>=1.17.2",# For standard scientific computing/ MLdiff --git a/tests/_server/api/endpoints/test_export.py b/tests/_server/api/endpoints/test_export.pyindex aeb0a4ec14..2fb2310c19 100644--- a/tests/_server/api/endpoints/test_export.py+++ b/tests/_server/api/endpoints/test_export.py@@ -786,6 +786,10 @@ def test_update_cell_outputs_empty_request(client: TestClient) -> None:assert response.json() == {"success": True}+ reason="endpoint does not yet wire up collect_pdf_png_fallbacks",+ strict=True,+)@pytest.mark.skipif(not DependencyManager.nbformat.has()or not DependencyManager.nbconvert.has(),@@ -828,6 +832,10 @@ def test_export_pdf_endpoint(client: TestClient) -> None:assert call_kwargs["png_fallbacks"] == {}+ reason="endpoint does not yet wire up collect_pdf_png_fallbacks",+ strict=True,+)@pytest.mark.skipif(not DependencyManager.nbformat.has()or not DependencyManager.nbconvert.has(),@@ -872,6 +880,10 @@ def test_export_pdf_endpoint_webpdf_mode(client: TestClient) -> None:assert call_kwargs["png_fallbacks"] == {}+ reason="endpoint does not yet wire up collect_pdf_png_fallbacks",+ strict=True,+)@pytest.mark.skipif(not DependencyManager.nbformat.has()or not DependencyManager.nbconvert.has(),@@ -918,6 +930,10 @@ def test_export_pdf_endpoint_slides_preset(client: TestClient) -> None:mock_exporter.export_as_pdf.assert_not_called()+ reason="endpoint does not yet wire up collect_pdf_png_fallbacks",+ strict=True,+)@pytest.mark.skipif(not DependencyManager.nbformat.has()or not DependencyManager.nbconvert.has(),