Skip to content

Commit 4ef0b9d

Browse files
committed
setup for altair
1 parent 0f0a1a3 commit 4ef0b9d

File tree

3 files changed

+32
-20
lines changed

3 files changed

+32
-20
lines changed

render.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"matplotlib": "Matplotlib",
2222
"seaborn": "Seaborn",
2323
"plotnine": "plotnine",
24-
"bokeh": "Bokeh",
2524
"plotly": "plotly",
25+
"altair": "Altair",
2626
"ggplot": "ggplot2 (R)",
2727
}
2828

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
bokeh
21
selenium
32
pillow
43
ipython
@@ -19,3 +18,4 @@ psutil
1918
plotly
2019
tzlocal
2120
simplegeneric
21+
altair

tests/test_plots.py

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,38 @@
11
import render
22

3-
defined_plots = {'bar-counts': ['pandas', 'plotnine', 'ggplot', 'plotly', ],
4-
'dodged-bar-chart': ['pandas', 'plotnine', 'ggplot', 'plotly', ],
5-
'scatter-plot': ['pandas', 'plotnine', 'ggplot', 'plotly', ],
6-
'scatter-plot-with-colors': ['matplotlib',
7-
'seaborn',
8-
'plotnine',
9-
'ggplot',
10-
'plotly', ],
11-
'scatter-plot-with-facet': ['seaborn', 'plotnine', 'ggplot', 'plotly', ],
12-
'scatter-plot-with-facets': ['seaborn', 'plotnine', 'ggplot', 'plotly', ],
13-
'scatter-plot-with-size': ['pandas', 'plotnine', 'ggplot', 'plotly', ],
14-
'scatter-with-regression': ['seaborn', 'plotnine', 'ggplot', 'plotly', ],
15-
'simple-histogram': ['pandas', 'matplotlib', 'plotnine', 'ggplot', 'plotly', ],
16-
'stacked-bar-chart': ['pandas', 'plotnine', 'ggplot', 'plotly', ],
17-
'stacked-kde': ['pandas', 'seaborn', 'plotnine', 'ggplot', 'plotly', ],
18-
'stacked-smooth-line-and-scatter': ['plotnine', 'ggplot', 'plotly', ],
19-
'timeseries': ['pandas', 'plotnine', 'ggplot', 'plotly', ]}
3+
defined_plots = {
4+
"bar-counts": ["pandas", "plotnine", "ggplot", "plotly", "altair",],
5+
"dodged-bar-chart": ["pandas", "plotnine", "ggplot", "plotly", "altair",],
6+
"scatter-plot": ["pandas", "plotnine", "ggplot", "plotly", "altair",],
7+
"scatter-plot-with-colors": [
8+
"matplotlib",
9+
"seaborn",
10+
"plotnine",
11+
"ggplot",
12+
"plotly",
13+
"altair",
14+
],
15+
"scatter-plot-with-facet": ["seaborn", "plotnine", "ggplot", "plotly", "altair",],
16+
"scatter-plot-with-facets": ["seaborn", "plotnine", "ggplot", "plotly", "altair",],
17+
"scatter-plot-with-size": ["pandas", "plotnine", "ggplot", "plotly", "altair",],
18+
"scatter-with-regression": ["seaborn", "plotnine", "ggplot", "plotly",],
19+
"simple-histogram": [
20+
"pandas",
21+
"matplotlib",
22+
"plotnine",
23+
"ggplot",
24+
"plotly",
25+
"altair",
26+
],
27+
"stacked-bar-chart": ["pandas", "plotnine", "ggplot", "plotly", "altair",],
28+
"stacked-kde": ["pandas", "seaborn", "plotnine", "ggplot", "plotly", "altair",],
29+
"stacked-smooth-line-and-scatter": ["plotnine", "ggplot", "plotly", "altair",],
30+
"timeseries": ["pandas", "plotnine", "ggplot", "plotly", "altair",],
31+
}
2032

2133

2234
def test_exist():
2335
plots = render.extract_cells("Examples.ipynb")
2436
for name, slug in plots:
25-
names = [d['package-slug'] for d in plots[(name, slug)]]
37+
names = [d["package-slug"] for d in plots[(name, slug)]]
2638
assert set(names) == set(defined_plots[slug])

0 commit comments

Comments
 (0)