|
1 | 1 | import render
|
2 | 2 |
|
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 | +} |
20 | 32 |
|
21 | 33 |
|
22 | 34 | def test_exist():
|
23 | 35 | plots = render.extract_cells("Examples.ipynb")
|
24 | 36 | 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)]] |
26 | 38 | assert set(names) == set(defined_plots[slug])
|
0 commit comments