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
tests: check schema drift from openapi schema (#2322)
Myles Scolnickefd4e67ac6f7
diff --git a/openapi/api.yaml b/openapi/api.yamlindex fe16a17344..853b89d526 100644--- a/openapi/api.yaml+++ b/openapi/api.yaml@@ -861,6 +861,13 @@ components:app_title:nullable: truetype: string+ auto_download:+ items:+ enum:+ - html+ - markdown+ type: string+ type: arraycss_file:nullable: truetype: string@@ -876,6 +883,7 @@ components:type: stringrequired:- width+ - auto_downloadtype: objectcapabilities:properties:@@ -1855,7 +1863,7 @@ components:type: objectinfo:title: marimo API- version: 0.8.14+ version: 0.8.15openapi: 3.1.0paths:/@file/{filename_and_length}:diff --git a/openapi/src/api.ts b/openapi/src/api.tsindex 0fd4fa9978..e625ebb491 100644--- a/openapi/src/api.ts+++ b/openapi/src/api.ts@@ -2203,6 +2203,7 @@ export interface components {KernelReady: {app_config: {app_title?: string | null;+ auto_download: ("html" | "markdown")[];css_file?: string | null;layout_file?: string | null;/** @enum {string} */diff --git a/tests/_cli/test_cli_development.py b/tests/_cli/test_cli_development.pyindex 979f1f07d0..72aaf9fc12 100644--- a/tests/_cli/test_cli_development.py+++ b/tests/_cli/test_cli_development.py@@ -3,6 +3,8 @@ from __future__ import annotationsimport subprocess+import yaml+def test_cli_development_openapi() -> None:p = subprocess.run(@@ -12,3 +14,25 @@ def test_cli_development_openapi() -> None:assert p.returncode == 0# Check a random endpointassert "/api/export/html" in p.stdout.decode()+++def test_openapi_up_to_date() -> None:+ with open("openapi/api.yaml", "r") as f:+ current_content = yaml.safe_load(f)++ result = subprocess.run(+ ["marimo", "development", "openapi"], capture_output=True, text=True+ )+ generated_content = yaml.safe_load(result.stdout)++ # Remove the version from both contents+ # we don't care about the version for this comparison+ if "info" in current_content:+ del current_content["info"]["version"]+ if "info" in generated_content:+ del generated_content["info"]["version"]++ cmd = "marimo development openapi > openapi/api.yaml && make fe-codegen"+ assert (+ current_content == generated_content+ ), f"openapi/api.yaml is not up to date. Run '{cmd}' to update it."