Skip to content

Commit

Permalink
test: add example specs as regression test for invalid values (#9339)
Browse files Browse the repository at this point in the history
Just add more specs examples

---------

Co-authored-by: GitHub Actions Bot <vega-actions-bot@users.noreply.github.com>
  • Loading branch information
kanitw and GitHub Actions Bot committed May 3, 2024
1 parent f610cce commit 1a7e2d9
Show file tree
Hide file tree
Showing 12 changed files with 2,954 additions and 0 deletions.
Binary file added examples/compiled/test_invalid_default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/compiled/test_invalid_default.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
892 changes: 892 additions & 0 deletions examples/compiled/test_invalid_default.vg.json

Large diffs are not rendered by default.

Binary file added examples/compiled/test_invalid_filter.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/compiled/test_invalid_filter.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
892 changes: 892 additions & 0 deletions examples/compiled/test_invalid_filter.vg.json

Large diffs are not rendered by default.

Binary file added examples/compiled/test_invalid_null.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/compiled/test_invalid_null.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
900 changes: 900 additions & 0 deletions examples/compiled/test_invalid_null.vg.json

Large diffs are not rendered by default.

87 changes: 87 additions & 0 deletions examples/specs/test_invalid_default.vl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Testing invalid",
"data": {
"values": [
{"a": null, "b": 1000},
{"a": -10, "b": null},
{"a": -5, "b": 25},
{"a": -1, "b": 20},
{"a": 0, "b": null},
{"a": 1, "b": 30},
{"a": 5, "b": 40},
{"a": 10, "b": null}
]
},
"hconcat": [{
"title": "Quantitative X",
"vconcat": [{
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "line",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "area",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}]
},{
"title": "Ordinal X",
"vconcat": [{
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "line",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "area",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}]
}]
}
90 changes: 90 additions & 0 deletions examples/specs/test_invalid_filter.vl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Testing invalid",
"data": {
"values": [
{"a": null, "b": 1000},
{"a": -10, "b": null},
{"a": -5, "b": 25},
{"a": -1, "b": 20},
{"a": 0, "b": null},
{"a": 1, "b": 30},
{"a": 5, "b": 40},
{"a": 10, "b": null}
]
},
"config": {
"mark": {"invalid": "filter"}
},
"hconcat": [{
"title": "Quantitative X",
"vconcat": [{
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "line",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "area",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}]
},{
"title": "Ordinal X",
"vconcat": [{
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "line",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "area",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}]
}]
}
90 changes: 90 additions & 0 deletions examples/specs/test_invalid_null.vl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Testing invalid",
"data": {
"values": [
{"a": null, "b": 1000},
{"a": -10, "b": null},
{"a": -5, "b": 25},
{"a": -1, "b": 20},
{"a": 0, "b": null},
{"a": 1, "b": 30},
{"a": 5, "b": 40},
{"a": 10, "b": null}
]
},
"config": {
"mark": {"invalid": null}
},
"hconcat": [{
"title": "Quantitative X",
"vconcat": [{
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "line",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "area",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}]
},{
"title": "Ordinal X",
"vconcat": [{
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "line",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "area",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}]
}]
}

0 comments on commit 1a7e2d9

Please sign in to comment.