Buckets:

download
raw
907 Bytes
import gradio as gr
from .plot_data import barley, simple
class TestNativePlot:
def test_plot_recognizes_correct_datatypes(self):
plot = gr.BarPlot(
value=simple,
x="date",
y="b",
)
assert plot.value["datatypes"]["date"] == "temporal"
assert plot.value["datatypes"]["b"] == "quantitative"
plot = gr.BarPlot(
value=simple,
x="a",
y="b",
color="c",
)
assert plot.value["datatypes"]["a"] == "nominal"
assert plot.value["datatypes"]["b"] == "quantitative"
assert plot.value["datatypes"]["c"] == "quantitative"
def test_plot_accepts_fn_as_value(self):
plot = gr.BarPlot(
value=lambda: barley.sample(frac=0.1, replace=False),
x="year",
y="yield",
)
assert plot.value["mark"] == "bar"

Xet Storage Details

Size:
907 Bytes
·
Xet hash:
13717462cc9d46781682c77c6523aa8d092aecbabd4890ad492a1eb8fad5f123

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.