Skip to content

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.

chore: harden against name collisions (#5649)

Dylan Madisetti750dae075182
diff --git a/marimo/_dependencies/dependencies.py b/marimo/_dependencies/dependencies.py
index d3fa090c5c..895055f93c 100644
--- a/marimo/_dependencies/dependencies.py
+++ b/marimo/_dependencies/dependencies.py
@@ -108,11 +108,14 @@ class Dependency:
raise_error=True,
)
- def get_version(self) -> str:
+ def get_version(self) -> str | None:
try:
return importlib.metadata.version(self.pkg)
except importlib.metadata.PackageNotFoundError:
- return f"{__import__(self.pkg).__version__}"
+ try:
+ return f"{__import__(self.pkg).__version__}"
+ except AttributeError:
+ return None
def warn_if_mismatch_version(
self,
@@ -144,12 +147,15 @@ class Dependency:
def _version_check(
*,
pkg: str,
- v: str,
+ v: str | None,
min_v: str | None = None,
max_v: str | None = None,
raise_error: bool = False,
quiet: bool = False,
) -> bool:
+ if v is None:
+ return False
+
if min_v is None and max_v is None:
return True
diff --git a/marimo/_smoke_tests/altair/altair_brush.py b/marimo/_smoke_tests/altair_examples/altair_brush.py
similarity index 99%
rename from marimo/_smoke_tests/altair/altair_brush.py
rename to marimo/_smoke_tests/altair_examples/altair_brush.py
index 33873c89ec..9950bf6a65 100644
--- a/marimo/_smoke_tests/altair/altair_brush.py
+++ b/marimo/_smoke_tests/altair_examples/altair_brush.py
@@ -23,11 +23,11 @@ def __(mo):
@app.cell
def __():
- import pandas as pd
- import numpy as np
import altair as alt
- import marimo as mo
+ import numpy as np
+ import pandas as pd
+ import marimo as mo
data = {
"index": np.tile(np.arange(100), 3),
@@ -109,7 +109,7 @@ def __(mo):
def __(chart_detail, chart_overview):
combined = chart_overview | chart_detail
combined
- return combined,
+ return (combined,)
@app.cell
diff --git a/marimo/_smoke_tests/altair/altair_charts.py b/marimo/_smoke_tests/altair_examples/altair_charts.py
similarity index 96%
rename from marimo/_smoke_tests/altair/altair_charts.py
rename to marimo/_smoke_tests/altair_examples/altair_charts.py
index 2edb5306c8..138f388f2b 100644
--- a/marimo/_smoke_tests/altair/altair_charts.py
+++ b/marimo/_smoke_tests/altair_examples/altair_charts.py
@@ -17,11 +17,14 @@ app = marimo.App(width="full")
@app.cell(hide_code=True)
def __():
- import marimo as mo
- from vega_datasets import data
import json
- import pandas as pd
+
import numpy as np
+ import pandas as pd
+ from vega_datasets import data
+
+ import marimo as mo
+
return data, json, mo, np, pd
@@ -84,7 +87,7 @@ def __(alt, cars, chart_selection_value, legend_selection_value, mo):
legend_selection=legend_selection_value,
label="Cars",
)
- return chart1,
+ return (chart1,)
@app.cell
@@ -127,7 +130,9 @@ def __(alt, chart_selection_value, employment, legend_selection_value, mo):
alt.Chart(employment)
.mark_area()
.encode(
- alt.X("yearmonth(date):T").axis(domain=False, format="%Y", tickSize=0),
+ alt.X("yearmonth(date):T").axis(
+ domain=False, format="%Y", tickSize=0
+ ),
alt.Y("sum(count):Q").stack("center").axis(None),
alt.Color("series:N").scale(scheme="category20b"),
# opacity=alt.condition(_selection, alt.value(1), alt.value(0.9)),
@@ -139,7 +144,7 @@ def __(alt, chart_selection_value, employment, legend_selection_value, mo):
chart_selection=chart_selection_value,
legend_selection=legend_selection_value,
)
- return chart2,
+ return (chart2,)
@app.cell
@@ -207,7 +212,7 @@ def __(alt, chart_selection_value, iris, legend_selection_value, mo):
chart_selection=chart_selection_value,
legend_selection=legend_selection_value,
)
- return chart3,
+ return (chart3,)
@app.cell
@@ -299,7 +304,7 @@ def __(alt, data, mo):
.mark_bar()
.encode(x=alt.X("Miles_per_Gallon:Q", bin=True), y="count()")
)
- return binned,
+ return (binned,)
@app.cell
@@ -312,7 +317,7 @@ def __(alt, cars, mo):
y="mean(Acceleration):Q",
)
)
- return mean,
+ return (mean,)
@app.cell
@@ -329,7 +334,7 @@ def __(alt, data, mo):
.encode(x=alt.X("Miles_per_Gallon:Q"), y="count()")
)
hist = mo.ui.altair_chart(hist)
- return hist,
+ return (hist,)
@app.cell
@@ -392,7 +397,7 @@ def __(alt, data, mo):
.transform_filter(alt.datum.year == 2000)
.properties(height=alt.Step(20))
)
- return horizontal_bar,
+ return (horizontal_bar,)
@app.cell
@@ -415,7 +420,7 @@ def __(alt, mo, pd):
color="category:N",
)
)
- return pie,
+ return (pie,)
@app.cell
@@ -475,7 +480,7 @@ def __(alt, data, mo):
),
)
multiline_chart
- return multiline_chart,
+ return (multiline_chart,)
@app.cell
@@ -511,7 +516,7 @@ def __(alt, mo, np, pd):
facet_chart = mo.ui.altair_chart(facet_chart, chart_selection="interval")
facet_chart
- return facet_chart,
+ return (facet_chart,)
@app.cell
@@ -600,7 +605,10 @@ def __(alt, mo, pd):
@app.cell
def __(layered_chart, mo):
mo.vstack(
- [layered_chart, mo.hstack([layered_chart.value, layered_chart.selections])]
+ [
+ layered_chart,
+ mo.hstack([layered_chart.value, layered_chart.selections]),
+ ]
)
return
diff --git a/marimo/_smoke_tests/altair/altair_datetime.py b/marimo/_smoke_tests/altair_examples/altair_datetime.py
similarity index 93%
rename from marimo/_smoke_tests/altair/altair_datetime.py
rename to marimo/_smoke_tests/altair_examples/altair_datetime.py
index 45b5d738f4..566eabde2a 100644
--- a/marimo/_smoke_tests/altair/altair_datetime.py
+++ b/marimo/_smoke_tests/altair_examples/altair_datetime.py
@@ -6,10 +6,12 @@ app = marimo.App(width="medium")
@app.cell
def __():
- import marimo as mo
- import pandas as pd
+ from datetime import datetime, timedelta, timezone
+
import altair as alt
- from datetime import datetime, timezone, timedelta
+ import pandas as pd
+
+ import marimo as mo
df = pd.DataFrame(
[
diff --git a/marimo/_smoke_tests/altair/altair_geoshape.py b/marimo/_smoke_tests/altair_examples/altair_geoshape.py
similarity index 93%
rename from marimo/_smoke_tests/altair/altair_geoshape.py
rename to marimo/_smoke_tests/altair_examples/altair_geoshape.py
index c2df0467d8..0aba39e1b0 100644
--- a/marimo/_smoke_tests/altair/altair_geoshape.py
+++ b/marimo/_smoke_tests/altair_examples/altair_geoshape.py
@@ -17,14 +17,15 @@ app = marimo.App(width="medium")
@app.cell
def __():
import marimo as mo
- return mo,
+
+ return (mo,)
@app.cell
def __():
import altair as alt
- from vega_datasets import data
import geopandas as gpd
+ from vega_datasets import data
url = "https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_countries.zip"
gdf_ne = gpd.read_file(url) # zipped shapefile
@@ -35,7 +36,7 @@ def __():
@app.cell
def __(gdf_ne):
gdf_sel = gdf_ne.query("CONTINENT == 'Africa'")
- return gdf_sel,
+ return (gdf_sel,)
@app.cell
@@ -45,7 +46,7 @@ def __(alt, gdf_sel):
.mark_geoshape(stroke="white", strokeWidth=1.5)
.encode(fill="NAME:N")
)
- return chart,
+ return (chart,)
@app.cell
@@ -64,7 +65,7 @@ def __(chart):
def __(chart, mo):
mo_chart = mo.ui.altair_chart(chart)
mo_chart
- return mo_chart,
+ return (mo_chart,)
@app.cell
diff --git a/marimo/_smoke_tests/altair/altair_polars.py b/marimo/_smoke_tests/altair_examples/altair_polars.py
similarity index 97%
rename from marimo/_smoke_tests/altair/altair_polars.py
rename to marimo/_smoke_tests/altair_examples/altair_polars.py
index 8009a6bd91..8ce072753c 100644
--- a/marimo/_smoke_tests/altair/altair_polars.py
+++ b/marimo/_smoke_tests/altair_examples/altair_polars.py
@@ -14,8 +14,10 @@ app = marimo.App(width="medium")
@app.cell
def __():
- import marimo as mo
import altair as alt
+
+ import marimo as mo
+
return alt, mo
@@ -23,7 +25,6 @@ def __():
def __():
import polars as pl
-
df = pl.DataFrame(
{"year": [2020, 2021, 2022], "population": [1000, 2000, 3000]}
)
@@ -42,7 +43,7 @@ def __(alt, df, mo):
)
)
chart
- return chart,
+ return (chart,)
@app.cell
diff --git a/marimo/_smoke_tests/altair/binary_values.py b/marimo/_smoke_tests/altair_examples/binary_values.py
similarity index 100%
rename from marimo/_smoke_tests/altair/binary_values.py
rename to marimo/_smoke_tests/altair_examples/binary_values.py
index ee80c98e81..6a9f4d8779 100644
--- a/marimo/_smoke_tests/altair/binary_values.py
+++ b/marimo/_smoke_tests/altair_examples/binary_values.py
@@ -6,11 +6,12 @@ app = marimo.App(width="medium")
@app.cell
def _():
- import marimo as mo
import altair as alt
import pandas as pd
import polars as pl
+ import marimo as mo
+
df = pd.DataFrame(
{
"state": ["000", "010", "100", "111"],
@@ -33,7 +34,6 @@ def _():
.properties(width=200)
)
-
mo.hstack([pd_chart, pl_chart])
return alt, df, mo, pd, pd_chart, pl, pl_chart, pl_df
diff --git a/marimo/_smoke_tests/altair/boxplot.py b/marimo/_smoke_tests/altair_examples/boxplot.py
similarity index 93%
rename from marimo/_smoke_tests/altair/boxplot.py
rename to marimo/_smoke_tests/altair_examples/boxplot.py
index 7fb3cc494e..5cd960def4 100644
--- a/marimo/_smoke_tests/altair/boxplot.py
+++ b/marimo/_smoke_tests/altair_examples/boxplot.py
@@ -33,7 +33,9 @@ def _():
data_pd = data.to_pandas()
# Create a boxplot
- boxplot = alt.Chart(data_pd).mark_boxplot().encode(x="category:O", y="value:Q")
+ boxplot = (
+ alt.Chart(data_pd).mark_boxplot().encode(x="category:O", y="value:Q")
+ )
boxplot
return alt, boxplot, data, data_pd, pl
@@ -76,6 +78,7 @@ def _(boxplot2, mo):
@app.cell
def _():
import marimo as mo
+
return (mo,)
diff --git a/marimo/_smoke_tests/altair/chart_dates.py b/marimo/_smoke_tests/altair_examples/chart_dates.py
similarity index 99%
rename from marimo/_smoke_tests/altair/chart_dates.py
rename to marimo/_smoke_tests/altair_examples/chart_dates.py
index 1a08909de7..29940cc8e0 100644
--- a/marimo/_smoke_tests/altair/chart_dates.py
+++ b/marimo/_smoke_tests/altair_examples/chart_dates.py
@@ -7,14 +7,17 @@ app = marimo.App(width="medium")
@app.cell
def _():
import marimo as mo
+
return (mo,)
@app.cell
def _():
- import polars as pl
- import altair as alt
from datetime import date
+
+ import altair as alt
+ import polars as pl
+
return alt, date, pl
diff --git a/marimo/_smoke_tests/altair/embed_options.py b/marimo/_smoke_tests/altair_examples/embed_options.py
similarity index 99%
rename from marimo/_smoke_tests/altair/embed_options.py
rename to marimo/_smoke_tests/altair_examples/embed_options.py
index 752e8a4f94..791ea3ba01 100644
--- a/marimo/_smoke_tests/altair/embed_options.py
+++ b/marimo/_smoke_tests/altair_examples/embed_options.py
@@ -6,10 +6,11 @@ app = marimo.App(width="medium")
@app.cell
def __():
- import marimo as mo
import altair as alt
import pandas as pd
+ import marimo as mo
+
data = pd.DataFrame({"x": range(10), "y": range(10)})
alt.renderers.set_embed_options(actions=False)
diff --git a/marimo/_smoke_tests/altair/layered_charts.py b/marimo/_smoke_tests/altair_examples/layered_charts.py
similarity index 99%
rename from marimo/_smoke_tests/altair/layered_charts.py
rename to marimo/_smoke_tests/altair_examples/layered_charts.py
index 2744d336d4..787c9b520f 100644
--- a/marimo/_smoke_tests/altair/layered_charts.py
+++ b/marimo/_smoke_tests/altair_examples/layered_charts.py
@@ -6,10 +6,11 @@ app = marimo.App(width="medium")
@app.cell
def __():
- import marimo as mo
import altair as alt
import pandas as pd
+ import marimo as mo
+
# data
test_counts = pd.DataFrame(
[
diff --git a/marimo/_smoke_tests/altair/map_selection.py b/marimo/_smoke_tests/altair_examples/map_selection.py
similarity index 93%
rename from marimo/_smoke_tests/altair/map_selection.py
rename to marimo/_smoke_tests/altair_examples/map_selection.py
index 0f6ffcedb2..0c00ccaf4c 100644
--- a/marimo/_smoke_tests/altair/map_selection.py
+++ b/marimo/_smoke_tests/altair_examples/map_selection.py
@@ -13,8 +13,9 @@ def _(mo):
@app.cell(hide_code=True)
def _():
import altair as alt
- from vega_datasets import data
import geopandas as gpd
+ from vega_datasets import data
+
return alt, data, gpd
@@ -27,7 +28,9 @@ def _(mo):
@app.cell(hide_code=True)
def _(data, gpd):
# load the data
- us_states = gpd.read_file(data.us_10m.url, driver="TopoJSON", layer="states")
+ us_states = gpd.read_file(
+ data.us_10m.url, driver="TopoJSON", layer="states"
+ )
us_population = data.population_engineers_hurricanes()[
["state", "id", "population"]
]
@@ -55,7 +58,9 @@ def _(alt, us_population, us_states):
# define a pointer selection
click_state = alt.selection_point(fields=["state"])
# define a condition on the opacity encoding depending on the selection
- opacity = alt.when(click_state).then(alt.value(1)).otherwise(alt.value(0.2))
+ opacity = (
+ alt.when(click_state).then(alt.value(1)).otherwise(alt.value(0.2))
+ )
# create a choropleth map using a lookup transform
choropleth = (
@@ -63,7 +68,9 @@ def _(alt, us_population, us_states):
.mark_geoshape()
.transform_lookup(
lookup="id",
- from_=alt.LookupData(us_population, "id", ["population", "state"]),
+ from_=alt.LookupData(
+ us_population, "id", ["population", "state"]
+ ),
)
.encode(
color="population:Q",
@@ -89,6 +96,7 @@ def _(alt, us_population, us_states):
)
return (choropleth & bars).add_params(click_state)
+
return (population_map,)
@@ -137,6 +145,7 @@ def _():
@app.cell
def _():
import marimo as mo
+
return (mo,)
@@ -212,6 +221,7 @@ def _(alt, gdf_quakies, gdf_world):
type="orthographic", rotate=alt.expr(f"[{rotate0.name}, 0, 0]")
)
return comb
+
return (world_map,)
@@ -242,7 +252,9 @@ def _(mo, world_map):
@app.cell(hide_code=True)
def _(mo):
- mo.md("""Hovering over an element on the map should filter the table below.""")
+ mo.md(
+ """Hovering over an element on the map should filter the table below."""
+ )
return
diff --git a/marimo/_smoke_tests/altair/nans_infinity.py b/marimo/_smoke_tests/altair_examples/nans_infinity.py
similarity index 99%
rename from marimo/_smoke_tests/altair/nans_infinity.py
rename to marimo/_smoke_tests/altair_examples/nans_infinity.py
index 47cea050f5..6a1ddd923f 100644
--- a/marimo/_smoke_tests/altair/nans_infinity.py
+++ b/marimo/_smoke_tests/altair_examples/nans_infinity.py
@@ -6,9 +6,11 @@ app = marimo.App(width="medium")
@app.cell
def _():
- import marimo as mo
- import polars as pl
import pandas as pd
+ import polars as pl
+
+ import marimo as mo
+
return mo, pd, pl
diff --git a/marimo/_smoke_tests/altair/narwhals_compat.py b/marimo/_smoke_tests/altair_examples/narwhals_compat.py
similarity index 90%
rename from marimo/_smoke_tests/altair/narwhals_compat.py
rename to marimo/_smoke_tests/altair_examples/narwhals_compat.py
index 4ff72449b6..a9f99e6513 100644
--- a/marimo/_smoke_tests/altair/narwhals_compat.py
+++ b/marimo/_smoke_tests/altair_examples/narwhals_compat.py
@@ -6,10 +6,12 @@ app = marimo.App(width="medium")
@app.cell
def __():
- import polars as pl
- import pandas as pd
import altair as alt
+ import pandas as pd
+ import polars as pl
+
import marimo as mo
+
return alt, mo, pd, pl
@@ -29,7 +31,9 @@ def __(mo, pd, pl):
def __(alt, df_selection, mo):
df = df_selection.value
chart = mo.ui.altair_chart(
- alt.Chart(df).mark_point().encode(x="sepal_length:Q", y="sepal_width:Q")
+ alt.Chart(df)
+ .mark_point()
+ .encode(x="sepal_length:Q", y="sepal_width:Q")
)
chart
return chart, df
diff --git a/marimo/_smoke_tests/altair/nested_vconcat.py b/marimo/_smoke_tests/altair_examples/nested_vconcat.py
similarity index 100%
rename from marimo/_smoke_tests/altair/nested_vconcat.py
rename to marimo/_smoke_tests/altair_examples/nested_vconcat.py
index 2f63925815..5e042fa434 100644
--- a/marimo/_smoke_tests/altair/nested_vconcat.py
+++ b/marimo/_smoke_tests/altair_examples/nested_vconcat.py
@@ -6,9 +6,10 @@ app = marimo.App(width="medium")
@app.cell
def _():
+ import altair as alt
from vega_datasets import data
+
import marimo as mo
- import altair as alt
cars = data.cars()
@@ -28,7 +29,6 @@ def _():
alt.vconcat(_chart, alt.vconcat(_chart, _chart)),
)
-
mo.ui.altair_chart(stacked_chart)
return (stacked_chart,)
diff --git a/marimo/_smoke_tests/altair/repeat.py b/marimo/_smoke_tests/altair_examples/repeat.py
similarity index 89%
rename from marimo/_smoke_tests/altair/repeat.py
rename to marimo/_smoke_tests/altair_examples/repeat.py
index 202503ea98..53ff6d96ec 100644
--- a/marimo/_smoke_tests/altair/repeat.py
+++ b/marimo/_smoke_tests/altair_examples/repeat.py
@@ -6,17 +6,18 @@ app = marimo.App()
@app.cell
def _():
- ## BUG: interactive, repeated chart does not work with polars data frame, non interactive one works fine.
+ # BUG: interactive, repeated chart does not work with polars data frame, non interactive one works fine.
return
@app.cell
def _():
- import marimo as mo
- import polars as pl
+ from datetime import date
+
import altair as alt
+ import polars as pl
- from datetime import date
+ import marimo as mo
sample_data = pl.DataFrame(
{
diff --git a/marimo/_smoke_tests/altair/text_selection.py b/marimo/_smoke_tests/altair_examples/text_selection.py
similarity index 93%
rename from marimo/_smoke_tests/altair/text_selection.py
rename to marimo/_smoke_tests/altair_examples/text_selection.py
index e933a3ddf0..19285c36ff 100644
--- a/marimo/_smoke_tests/altair/text_selection.py
+++ b/marimo/_smoke_tests/altair_examples/text_selection.py
@@ -1,4 +1,3 @@
-
# /// script
# requires-python = ">=3.12"
# dependencies = [
@@ -17,6 +16,7 @@ app = marimo.App(width="medium")
@app.cell
def _():
import marimo as mo
+
return (mo,)
@@ -28,8 +28,8 @@ def _(mo):
@app.cell
def _(mo):
- from vega_datasets import data
import altair as alt
+ from vega_datasets import data
chart = (
alt.Chart(data.cars())
@@ -125,7 +125,9 @@ def _(alt, data, mo):
alt.Chart(_source)
.mark_text(align="right", dx=-5)
.encode(
- x="min(temp_min):Q", y=alt.Y("month(date):O"), text="min(temp_min):Q"
+ x="min(temp_min):Q",
+ y=alt.Y("month(date):O"),
+ text="min(temp_min):Q",
)
)
@@ -133,7 +135,9 @@ def _(alt, data, mo):
alt.Chart(_source)
.mark_text(align="left", dx=5)
.encode(
- x="max(temp_max):Q", y=alt.Y("month(date):O"), text="max(temp_max):Q"
+ x="max(temp_max):Q",
+ y=alt.Y("month(date):O"),
+ text="max(temp_max):Q",
)
)
diff --git a/marimo/_smoke_tests/altair/timestamp_with_no_timezone.py b/marimo/_smoke_tests/altair_examples/timestamp_with_no_timezone.py
similarity index 99%
rename from marimo/_smoke_tests/altair/timestamp_with_no_timezone.py
rename to marimo/_smoke_tests/altair_examples/timestamp_with_no_timezone.py
index 7b0dce9db0..0cc33f8f43 100644
--- a/marimo/_smoke_tests/altair/timestamp_with_no_timezone.py
+++ b/marimo/_smoke_tests/altair_examples/timestamp_with_no_timezone.py
@@ -48,6 +48,7 @@ def __(StringIO, date_format, pd):
]
return res
+
return (build_df,)
@@ -75,11 +76,14 @@ def __():
@app.cell
def __():
- import marimo as mo
- import numpy as np
- import pandas as pd
from io import StringIO
+
import altair as alt
+ import numpy as np
+ import pandas as pd
+
+ import marimo as mo
+
return StringIO, alt, mo, np, pd
diff --git a/marimo/_smoke_tests/altair/vegafusion_histograms.py b/marimo/_smoke_tests/altair_examples/vegafusion_histograms.py
similarity index 99%
rename from marimo/_smoke_tests/altair/vegafusion_histograms.py
rename to marimo/_smoke_tests/altair_examples/vegafusion_histograms.py
index 899b9ef8eb..74cf233b97 100644
--- a/marimo/_smoke_tests/altair/vegafusion_histograms.py
+++ b/marimo/_smoke_tests/altair_examples/vegafusion_histograms.py
@@ -21,6 +21,7 @@ app = marimo.App(width="medium")
@app.cell
def _():
import marimo as mo
+
return (mo,)
@@ -47,8 +48,8 @@ def _(mo):
@app.cell
def _():
- import polars as pl
import altair as alt
+ import polars as pl
import vegafusion as vf
# Requires vl-convert-python as well
diff --git a/marimo/_smoke_tests/altair/vegafusion_nb.py b/marimo/_smoke_tests/altair_examples/vegafusion_nb.py
similarity index 99%
rename from marimo/_smoke_tests/altair/vegafusion_nb.py
rename to marimo/_smoke_tests/altair_examples/vegafusion_nb.py
index 315bff6fb7..d15ce5875a 100644
--- a/marimo/_smoke_tests/altair/vegafusion_nb.py
+++ b/marimo/_smoke_tests/altair_examples/vegafusion_nb.py
@@ -19,6 +19,7 @@ app = marimo.App(width="medium")
@app.cell
def _():
import marimo as mo
+
return (mo,)
@@ -30,8 +31,8 @@ def _(mo):
@app.cell
def _():
- import pandas as pd
import altair as alt
+ import pandas as pd
import vegafusion as vf
# Comment out to disable duckdb connection
@@ -144,6 +145,7 @@ def _(alt):
.transform_calculate("time", "hours(datum.date)")
.repeat(column=["distance", "delay", "time"])
)
+
return (make_cross_filter_chart,)
@@ -189,6 +191,7 @@ def _(alt):
)
return alt.layer(bars, line, data=source).properties(height=200)
+
return (make_average_chart,)
@@ -257,6 +260,7 @@ def _(alt):
bar,
rect + circ,
).resolve_legend(color="independent", size="independent")
+
return (make_movie_chart,)
diff --git a/marimo/_smoke_tests/altair/vegafusion_select.py b/marimo/_smoke_tests/altair_examples/vegafusion_select.py
similarity index 99%
rename from marimo/_smoke_tests/altair/vegafusion_select.py
rename to marimo/_smoke_tests/altair_examples/vegafusion_select.py
index 2c61a2e921..2172415853 100644
--- a/marimo/_smoke_tests/altair/vegafusion_select.py
+++ b/marimo/_smoke_tests/altair_examples/vegafusion_select.py
@@ -17,10 +17,11 @@ app = marimo.App(width="medium")
@app.cell
def _():
- import marimo as mo
import altair as alt
from vega_datasets import data
+ import marimo as mo
+
alt.data_transformers.enable("vegafusion")
# Load some data