Skip to content

Commit d1485ae

Browse files
committed
Updated requirements and build files.
Formatted test_plots.py with black.
1 parent 84847b4 commit d1485ae

File tree

3 files changed

+62
-18
lines changed

3 files changed

+62
-18
lines changed

render.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"bokeh": "Bokeh",
2525
"plotly": "plotly",
2626
"ggplot": "ggplot2 (R)",
27+
"altair": "Altair",
2728
}
2829

2930
names = {

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ statsmodels==0.10.0rc2 --pre
1717
rpy2
1818
tzlocal
1919
simplegeneric
20+
altair

tests/test_plots.py

Lines changed: 60 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,68 @@
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": [
16+
"seaborn",
17+
"plotnine",
18+
"ggplot",
19+
"plotly",
20+
"altair",
21+
],
22+
"scatter-plot-with-facets": [
23+
"seaborn",
24+
"plotnine",
25+
"ggplot",
26+
"plotly",
27+
"altair",
28+
],
29+
"scatter-plot-with-size": [
30+
"pandas",
31+
"plotnine",
32+
"ggplot",
33+
"plotly",
34+
"altair",
35+
],
36+
"scatter-with-regression": ["seaborn", "plotnine", "ggplot", "plotly",],
37+
"simple-histogram": [
38+
"pandas",
39+
"matplotlib",
40+
"plotnine",
41+
"ggplot",
42+
"plotly",
43+
"altair",
44+
],
45+
"stacked-bar-chart": ["pandas", "plotnine", "ggplot", "plotly", "altair",],
46+
"stacked-kde": [
47+
"pandas",
48+
"seaborn",
49+
"plotnine",
50+
"ggplot",
51+
"plotly",
52+
"altair",
53+
],
54+
"stacked-smooth-line-and-scatter": [
55+
"plotnine",
56+
"ggplot",
57+
"plotly",
58+
"altair",
59+
],
60+
"timeseries": ["pandas", "plotnine", "ggplot", "plotly", "altair",],
61+
}
2062

2163

2264
def test_exist():
2365
plots = render.extract_cells("Examples.ipynb")
2466
for name, slug in plots:
25-
names = [d['package-slug'] for d in plots[(name, slug)]]
67+
names = [d["package-slug"] for d in plots[(name, slug)]]
2668
assert set(names) == set(defined_plots[slug])

0 commit comments

Comments
 (0)