File tree Expand file tree Collapse file tree 5 files changed +53
-3
lines changed
Expand file tree Collapse file tree 5 files changed +53
-3
lines changed Original file line number Diff line number Diff line change 1+ [run]
2+ branch = true
3+ source =
4+ mplaltair
5+
6+ [report]
7+ exclude_lines =
8+ raise NotImplemented
9+ def __str__
10+ def __repr__
11+ if __name__ == .__main__.:
Original file line number Diff line number Diff line change @@ -18,11 +18,11 @@ matrix:
1818
1919install :
2020 - python -m pip install --upgrade pip
21- - python -m pip install --upgrade codecov coverage
21+ - python -m pip install --upgrade codecov coverage pytest
2222 - python -m pip install -ve .
2323
2424script :
25- - coverage run python -m pytest
25+ - coverage run run_tests.py
2626 - coverage report -m
2727 - set -e
2828 - codecov
Original file line number Diff line number Diff line change 11import matplotlib
22import altair
3+
4+
5+ # TODO rename this?
6+ def convert (encoding , * , figure = None ):
7+ """Convert an altair encoding to a Matplotlib figure
8+
9+
10+ Parameters
11+ ----------
12+ encoding
13+ The Altair encoding of the plot.
14+
15+ figure : matplotib.figure.Figure, optional
16+ # TODO: generalize this to 'thing that supports gridspec slicing?
17+
18+ Returns
19+ -------
20+ figure : matplotlib.figure.Figure
21+ The Figure with all artists in it (ready to be saved or shown)
22+
23+ mapping : dict
24+ Mapping from parts of the encoding to the Matplotlib artists. This is
25+ for later customization.
26+
27+
28+ """
29+ if figure is None :
30+ from matplotlib import pyplot as plt
31+ figure = plt .figure ()
32+
33+ mapping = {}
34+
35+ return figure , mapping
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+ import sys
3+ import pytest
4+
5+ if __name__ == '__main__' :
6+ sys .exit (pytest .main (sys .argv [1 :]))
Original file line number Diff line number Diff line change 2323 'Programming Language :: Python :: 3.5' ,
2424 'Programming Language :: Python :: 3.6' ,
2525 'Topic :: Scientific/Engineering :: Visualization' ,
26- classifiers = classifiers ,
2726 ]
2827
2928
3938 python_requires = '>=3.5' ,
4039 license = "BSD" ,
4140 platforms = 'any' ,
41+ classifiers = classifiers ,
4242 long_description = descr )
4343
4444setup (** setup_parameters )
You can’t perform that action at this time.
0 commit comments