[Python-modules-commits] [python-mplexporter] 14/135: rearrange examples/tests/notebooks

Wolfgang Borgert debacle at moszumanska.debian.org
Tue Sep 23 21:18:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to branch master
in repository python-mplexporter.

commit 9bc4c408e167132013402a58f55640aedb7f6d2d
Author: Jake Vanderplas <vanderplas at astro.washington.edu>
Date:   Wed Feb 19 07:32:14 2014 -0800

    rearrange examples/tests/notebooks
---
 .../test_plotly.py => examples/plotly_example.py   | 20 +++-----------
 mplexporter/renderers/__init__.py                  |  1 +
 VegaTest.ipynb => notebooks/VegaTest.ipynb         |  0
 VincentTest.ipynb => notebooks/VincentTest.ipynb   |  0
 setup.py                                           | 31 ++++++++++++++++++++++
 5 files changed, 36 insertions(+), 16 deletions(-)

diff --git a/mplexporter/tests/test_plotly.py b/examples/plotly_example.py
similarity index 59%
rename from mplexporter/tests/test_plotly.py
rename to examples/plotly_example.py
index 128a695..cefbc2e 100644
--- a/mplexporter/tests/test_plotly.py
+++ b/examples/plotly_example.py
@@ -1,5 +1,5 @@
-from .. exporter import Exporter
-from .. renderers.plotly import PlotlyRenderer
+from mplexporter.exporter import Exporter
+from mplexporter.renderers.plotly import PlotlyRenderer
 
 import numpy as np
 import matplotlib.pyplot as plt
@@ -25,17 +25,5 @@ def plot_sin():
     exporter = Exporter(renderer)
     exporter.run(fig)
 
-    # check output from PlotlyRenderer against expected output
-    for line1, line2 in zip(renderer.output.strip().split(),
-                        PLOT_SIN_OUTPUT.strip().split()):
-        assert line1 == line2
-
-
-PLOT_SIN_OUTPUT = """
-opening figure
-  opening axes
-    draw line with 100 points
-    draw 100 markers
-  closing axes
-closing figure
-"""
\ No newline at end of file
+if __name__ == '__main__':
+    plot_sin()
diff --git a/mplexporter/renderers/__init__.py b/mplexporter/renderers/__init__.py
index a459909..73792c2 100644
--- a/mplexporter/renderers/__init__.py
+++ b/mplexporter/renderers/__init__.py
@@ -2,3 +2,4 @@ from .base import Renderer
 from .vega_renderer import VegaRenderer, fig_to_vega
 from .vincent_renderer import VincentRenderer, fig_to_vincent
 from .example_renderer import ExampleRenderer
+from .plotly import PlotlyRenderer
diff --git a/VegaTest.ipynb b/notebooks/VegaTest.ipynb
similarity index 100%
rename from VegaTest.ipynb
rename to notebooks/VegaTest.ipynb
diff --git a/VincentTest.ipynb b/notebooks/VincentTest.ipynb
similarity index 100%
rename from VincentTest.ipynb
rename to notebooks/VincentTest.ipynb
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..1eda66e
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,31 @@
+try:
+    from setuptools import setup
+except ImportError:
+    from distutils.core import setup
+
+DESCRIPTION = "General Matplotlib Exporter"
+LONG_DESCRIPTION = open('README.md').read()
+NAME = "mplexporter"
+AUTHOR = "Jake VanderPlas"
+AUTHOR_EMAIL = "jakevdp at cs.washington.edu"
+MAINTAINER = "Jake VanderPlas"
+MAINTAINER_EMAIL = "jakevdp at cs.washington.edu"
+DOWNLOAD_URL = 'http://github.com/jakevdp/mplexporter'
+URL = DOWNLOAD_URL
+LICENSE = 'BSD 3-clause'
+VERSION = '0.0.1'
+
+setup(name=NAME,
+      version=VERSION,
+      description=DESCRIPTION,
+      long_description=LONG_DESCRIPTION,
+      author=AUTHOR,
+      author_email=AUTHOR_EMAIL,
+      maintainer=MAINTAINER,
+      maintainer_email=MAINTAINER_EMAIL,
+      url=URL,
+      download_url=DOWNLOAD_URL,
+      license=LICENSE,
+      packages=['mplexporter', 'mplexporter.renderers',
+                'mplexporter.renderers.plotly'],
+     )

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-mplexporter.git



More information about the Python-modules-commits mailing list