Skip to content

Commit 96b7ceb

Browse files
authored
fix: update snapshots and types for altair v6.1.0 / vega-lite v6.4.1 (#9415)
CI was failing on main after the altair upgrade landed: - snapshots referenced vega-lite v6.1.0 schema and old view-hash names - alt.layer now returns LayerChart | FacetChart, breaking add_common_config - vlc.get_*_locale signatures became Literal-typed
1 parent afb9c9c commit 96b7ceb

28 files changed

Lines changed: 64 additions & 81 deletions

.github/renovate.json5

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@
6565
"!/.*@oxc.*/",
6666
// react-hook-form is pinned to 7.54.2
6767
"!/.*react-hook-form.*/",
68-
// vega-lite is pinned to 6.3.1
69-
"!/.*vega-lite.*/",
7068
// pyodide needs to be manually updated
7169
"!/.*pyodide.*/"
7270
],

.github/workflows/test_fe.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,6 @@ jobs:
181181
echo "Error: react-hook-form version in package.json must be exactly 7.54.2. As it breaks mo.ui.dataframe"
182182
exit 1
183183
fi
184-
if ! grep -q '"vega-lite": "6.3.1"' package.json; then
185-
echo "Error: vega-lite version in package.json must be exactly 6.3.1. Newer versions break numeric tooltips"
186-
exit 1
187-
fi
188184
if ! grep -q '"html-to-image": "1.11.13"' package.json; then
189185
echo "Error: html-to-image version in package.json must be exactly 1.11.13. Newer versions break matplotlib toolbars"
190186
exit 1

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
"typescript-memoize": "^1.1.1",
156156
"use-acp": "0.2.6",
157157
"use-resize-observer": "^9.1.0",
158-
"vega-lite": "6.3.1",
158+
"vega-lite": "6.4.2",
159159
"vega-loader": "^5.1.0",
160160
"vega-parser": "^7.1.0",
161161
"vega-tooltip": "^1.1.0",

marimo/_data/charts.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ class ChartParams:
8282
COMMON_CONFIG = 'properties(width="container").configure_view(stroke=None)'
8383

8484

85-
def add_common_config(chart: alt.Chart | alt.LayerChart) -> alt.Chart:
85+
def add_common_config(
86+
chart: alt.Chart | alt.LayerChart | alt.FacetChart,
87+
) -> alt.Chart:
8688
return chart.properties(width="container").configure_view(stroke=None) # type: ignore
8789

8890

marimo/_output/formatters/altair_formatters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def get_time_format_locale(locale: str) -> dict[str, Any]:
196196
if DependencyManager.vl_convert_python.has():
197197
import vl_convert as vlc # type: ignore
198198

199-
return dict(vlc.get_time_format_locale(locale))
199+
return dict(vlc.get_time_format_locale(locale)) # type: ignore[arg-type]
200200
else:
201201
with urlopen(
202202
TIME_FORMAT_LOCALE_URL.format(locale=locale),
@@ -212,7 +212,7 @@ def get_format_locale(locale: str) -> dict[str, Any]:
212212
if DependencyManager.vl_convert_python.has():
213213
import vl_convert as vlc # type: ignore
214214

215-
return dict(vlc.get_format_locale(locale))
215+
return dict(vlc.get_format_locale(locale)) # type: ignore[arg-type]
216216
else:
217217
with urlopen(
218218
FORMAT_LOCALE_URL.format(locale=locale),

marimo/_sql/engines/adbc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def convert_to_polars() -> pl.DataFrame | pl.Series:
534534
return pl.from_arrow(arrow_table)
535535

536536
def convert_to_pandas() -> pd.DataFrame:
537-
return arrow_table.to_pandas()
537+
return cast("pd.DataFrame", arrow_table.to_pandas())
538538

539539
result = convert_to_output(
540540
sql_output_format=sql_output_format,

pnpm-lock.yaml

Lines changed: 16 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_cli/snapshots/export/ipynb/ipynb_with_media_outputs.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@
271271
"outputs": [
272272
{
273273
"data": {
274-
"application/vnd.vegalite.v6+json": "{\n \"$schema\": \"https://vega.github.io/schema/vega-lite/v6.1.0.json\",\n \"config\": {\n \"view\": {\n \"continuousHeight\": 300,\n \"continuousWidth\": 300\n }\n },\n \"data\": {\n \"name\": \"data-a202e5dd04552c98b78a4bc5fc59f367\"\n },\n \"datasets\": {\n \"data-a202e5dd04552c98b78a4bc5fc59f367\": [\n {\n \"x\": 1,\n \"y\": 1\n }\n ]\n },\n \"encoding\": {\n \"x\": {\n \"field\": \"x\",\n \"type\": \"ordinal\"\n },\n \"y\": {\n \"field\": \"y\",\n \"type\": \"quantitative\"\n }\n },\n \"mark\": {\n \"type\": \"circle\"\n },\n \"usermeta\": {\n \"embedOptions\": {}\n }\n}"
274+
"application/vnd.vegalite.v6+json": "{\n \"$schema\": \"https://vega.github.io/schema/vega-lite/v6.4.1.json\",\n \"config\": {\n \"view\": {\n \"continuousHeight\": 300,\n \"continuousWidth\": 300\n }\n },\n \"data\": {\n \"name\": \"data-a202e5dd04552c98b78a4bc5fc59f367\"\n },\n \"datasets\": {\n \"data-a202e5dd04552c98b78a4bc5fc59f367\": [\n {\n \"x\": 1,\n \"y\": 1\n }\n ]\n },\n \"encoding\": {\n \"x\": {\n \"field\": \"x\",\n \"type\": \"ordinal\"\n },\n \"y\": {\n \"field\": \"y\",\n \"type\": \"quantitative\"\n }\n },\n \"mark\": {\n \"type\": \"circle\"\n },\n \"usermeta\": {\n \"embedOptions\": {}\n }\n}"
275275
},
276276
"metadata": {},
277277
"output_type": "display_data"
@@ -292,7 +292,7 @@
292292
"outputs": [
293293
{
294294
"data": {
295-
"application/vnd.vega.v6+json": "{\n \"$schema\": \"https://vega.github.io/schema/vega-lite/v6.1.0.json\",\n \"config\": {\n \"view\": {\n \"continuousHeight\": 300,\n \"continuousWidth\": 300\n }\n },\n \"data\": {\n \"name\": \"data-a202e5dd04552c98b78a4bc5fc59f367\"\n },\n \"datasets\": {\n \"data-a202e5dd04552c98b78a4bc5fc59f367\": [\n {\n \"x\": 1,\n \"y\": 1\n }\n ]\n },\n \"encoding\": {\n \"x\": {\n \"field\": \"x\",\n \"type\": \"ordinal\"\n },\n \"y\": {\n \"field\": \"y\",\n \"type\": \"quantitative\"\n }\n },\n \"mark\": {\n \"type\": \"circle\"\n },\n \"usermeta\": {\n \"embedOptions\": {}\n }\n}"
295+
"application/vnd.vega.v6+json": "{\n \"$schema\": \"https://vega.github.io/schema/vega-lite/v6.4.1.json\",\n \"config\": {\n \"view\": {\n \"continuousHeight\": 300,\n \"continuousWidth\": 300\n }\n },\n \"data\": {\n \"name\": \"data-a202e5dd04552c98b78a4bc5fc59f367\"\n },\n \"datasets\": {\n \"data-a202e5dd04552c98b78a4bc5fc59f367\": [\n {\n \"x\": 1,\n \"y\": 1\n }\n ]\n },\n \"encoding\": {\n \"x\": {\n \"field\": \"x\",\n \"type\": \"ordinal\"\n },\n \"y\": {\n \"field\": \"y\",\n \"type\": \"quantitative\"\n }\n },\n \"mark\": {\n \"type\": \"circle\"\n },\n \"usermeta\": {\n \"embedOptions\": {}\n }\n}"
296296
},
297297
"metadata": {},
298298
"output_type": "display_data"

tests/_data/snapshots/charts_json.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# boolean
22
{
3-
"$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json",
3+
"$schema": "https://vega.github.io/schema/vega-lite/v6.4.1.json",
44
"config": {
55
"view": {
66
"continuousHeight": 300,
@@ -160,7 +160,7 @@
160160

161161
# date
162162
{
163-
"$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json",
163+
"$schema": "https://vega.github.io/schema/vega-lite/v6.4.1.json",
164164
"config": {
165165
"axis": {
166166
"grid": false
@@ -327,7 +327,7 @@
327327
"strokeWidth": 1,
328328
"type": "rule"
329329
},
330-
"name": "view_08552f810e029e90_2",
330+
"name": "view_f88a3e6c17252800_2",
331331
"transform": [
332332
{
333333
"filter": "datum.some_column != null"
@@ -363,7 +363,7 @@
363363
"type": "point"
364364
},
365365
"views": [
366-
"view_08552f810e029e90_2"
366+
"view_f88a3e6c17252800_2"
367367
]
368368
}
369369
],
@@ -372,7 +372,7 @@
372372

373373
# datetime
374374
{
375-
"$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json",
375+
"$schema": "https://vega.github.io/schema/vega-lite/v6.4.1.json",
376376
"config": {
377377
"axis": {
378378
"grid": false
@@ -539,7 +539,7 @@
539539
"strokeWidth": 1,
540540
"type": "rule"
541541
},
542-
"name": "view_08552f810e029e90_2",
542+
"name": "view_f88a3e6c17252800_2",
543543
"transform": [
544544
{
545545
"filter": "datum.some_column != null"
@@ -575,7 +575,7 @@
575575
"type": "point"
576576
},
577577
"views": [
578-
"view_08552f810e029e90_2"
578+
"view_f88a3e6c17252800_2"
579579
]
580580
}
581581
],
@@ -584,7 +584,7 @@
584584

585585
# time
586586
{
587-
"$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json",
587+
"$schema": "https://vega.github.io/schema/vega-lite/v6.4.1.json",
588588
"config": {
589589
"axis": {
590590
"grid": false
@@ -751,7 +751,7 @@
751751
"strokeWidth": 1,
752752
"type": "rule"
753753
},
754-
"name": "view_08552f810e029e90_2",
754+
"name": "view_f88a3e6c17252800_2",
755755
"transform": [
756756
{
757757
"filter": "datum.some_column != null"
@@ -787,7 +787,7 @@
787787
"type": "point"
788788
},
789789
"views": [
790-
"view_08552f810e029e90_2"
790+
"view_f88a3e6c17252800_2"
791791
]
792792
}
793793
],
@@ -796,7 +796,7 @@
796796

797797
# integer
798798
{
799-
"$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json",
799+
"$schema": "https://vega.github.io/schema/vega-lite/v6.4.1.json",
800800
"config": {
801801
"view": {
802802
"continuousHeight": 300,
@@ -857,7 +857,7 @@
857857

858858
# number
859859
{
860-
"$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json",
860+
"$schema": "https://vega.github.io/schema/vega-lite/v6.4.1.json",
861861
"config": {
862862
"view": {
863863
"continuousHeight": 300,
@@ -919,7 +919,7 @@
919919

920920
# string
921921
{
922-
"$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json",
922+
"$schema": "https://vega.github.io/schema/vega-lite/v6.4.1.json",
923923
"config": {
924924
"axis": {
925925
"grid": false
@@ -1117,7 +1117,7 @@
11171117

11181118
# string (limit to 10 items)
11191119
{
1120-
"$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json",
1120+
"$schema": "https://vega.github.io/schema/vega-lite/v6.4.1.json",
11211121
"config": {
11221122
"axis": {
11231123
"grid": false
@@ -1321,7 +1321,7 @@
13211321

13221322
# unknown
13231323
{
1324-
"$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json",
1324+
"$schema": "https://vega.github.io/schema/vega-lite/v6.4.1.json",
13251325
"config": {
13261326
"view": {
13271327
"continuousHeight": 300,

tests/_data/snapshots/charts_json_bad_data.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json",
2+
"$schema": "https://vega.github.io/schema/vega-lite/v6.4.1.json",
33
"config": {
44
"axis": {
55
"grid": false

0 commit comments

Comments
 (0)