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
docs: fix some warnings when building docs (#2990)
Myles Scolnick8384a66a7f8d
diff --git a/docs/api/app.md b/docs/api/app.mdindex 028a0fe8cd..fc2f349c31 100644--- a/docs/api/app.md+++ b/docs/api/app.md@@ -13,6 +13,6 @@.. autoclass:: app_meta()- .. autofunction:: marimo._runtime.app_meta.AppMeta.theme- .. autofunction:: marimo._runtime.app_meta.AppMeta.mode+ .. automethod:: marimo._runtime.app_meta.AppMeta.theme+ .. automethod:: marimo._runtime.app_meta.AppMeta.mode```diff --git a/docs/api/control_flow.md b/docs/api/control_flow.mdindex f23e84bd6d..60d2aa2d22 100644--- a/docs/api/control_flow.md+++ b/docs/api/control_flow.md@@ -17,6 +17,7 @@ interval (or on click).```{eval-rst}.. autoclass:: marimo.ui.refresh:members:+ :noindex:.. autoclasstoc:: marimo._plugins.ui._impl.refresh.refresh```diff --git a/docs/api/inputs/chat.md b/docs/api/inputs/chat.mdindex 75220a2a7e..b32fc5d17d 100644--- a/docs/api/inputs/chat.md+++ b/docs/api/inputs/chat.md@@ -49,7 +49,7 @@ chat = mo.ui.chat(echo_model, prompts=["Hello", "How are you?"])chat```-Here, `messages` is a list of [`ChatMessage`](#marimo.ui.ChatMessage) objects,+Here, `messages` is a list of [`ChatMessage`](#marimo.ai.ChatMessage) objects,which has `role` (`"user"`, `"assistant"`, or `"system"`) and `content` (themessage string) attributes; `config` is a[`ChatModelConfig`](#marimo.ai.ChatModelConfig) object with variousdiff --git a/docs/api/inputs/index.md b/docs/api/inputs/index.mdindex def6e31f00..8d578754d1 100644--- a/docs/api/inputs/index.md+++ b/docs/api/inputs/index.md@@ -11,8 +11,8 @@chatcheckboxcode_editor- dataframedata_explorer+ dataframedatesdictionarydropdown@@ -21,6 +21,7 @@formmicrophonemultiselect+ nav_menunumberradiorange_sliderdiff --git a/docs/guides/integrating_with_marimo/displaying_objects.md b/docs/guides/integrating_with_marimo/displaying_objects.mdindex a051f0081b..d6d6e73e39 100644--- a/docs/guides/integrating_with_marimo/displaying_objects.md+++ b/docs/guides/integrating_with_marimo/displaying_objects.md@@ -14,15 +14,13 @@ three options:2. Implement a `_mime_()` method3. Implement an IPython-style `_repr_*_()` method-If you can't modify the object, you can also add a formatter to the marimo-library (option 4).+If you can't modify the object, you can also add a formatter to the marimo library (option 4).The return value of these methods determines what is shown. `_display_`has the highest precedence, then built-in formatters, then `_mime_`, then `IPython` style `_repr_*_`methods.--### Option 1: Implement a `_display_()` method+## Option 1: Implement a `_display_()` methodIf an object implements a `_display_()`, marimo will use its return valueto visualize the object as an output.@@ -50,7 +48,7 @@ However, if you need to display an object that marimo does not know how torender (for example, maybe you are building a new plotting library), thenyou need to consider of the other options below.-### Option 2: Implement an IPython `_repr_*_()` method+## Option 2: Implement an IPython `_repr_*_()` methodmarimo can render objects that implement[IPython's `_repr_*_()` protocol](https://ipython.readthedocs.io/en/stable/config/integrating.html#custom-methods)@@ -68,7 +66,6 @@ class Shout:We support the following methods:-- `_repr_html_`- `_repr_mimebundle_`- `_repr_svg_`@@ -79,7 +76,7 @@ We support the following methods:- `_repr_latex_`- `_repr_text_`-### Option 3: Implement a `_mime_` method+## Option 3: Implement a `_mime_` methodWhen displaying an object, marimo's media viewer checks for the presence of amethod called `_mime_`. This method should take no arguments and return@@ -143,7 +140,7 @@ a tuple of two strings, the [mime type](https://developer.mozilla.org/en-US/docsImage("https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg")```-### Option 4: Add a formatter to the marimo repo+## Option 4: Add a formatter to the marimo repoThe recommended way to render rich displays of objects in marimo is toimplement `_display_` if possible, otherwise either the IPython `_repr_*_()_`