[matplotlib-devel] New tests failing when run together

2013-10-10 Thread Todd
I have been implementing some new plot types, with tests.  This code passes
all existing tests.  I have also expanded the tests on some existing plot
types and mlab functions.  These tests run fine on their own.

The problem is that, when I run the code with the new tests, I get a lot of
out of memory errors.  Further, the errors do not occur in the new tests,
but rather in other, unrelated tests.  Further, the tests that fail work
fine when run on their own, they only fail when run as part of the complete
test suite.

Even stranger, when I run the tests in parallel (even with only one
process) and enable "--process-restartworker", the tests run fine (with a
large enough timeout).  But "--process-restartworker" doesn't help if
parallel tests are not turned on.

So I am not sure exactly what to do here.  Even if I leave out my own
tests, I may be running into some limit or memory leak that may very well
result in problems for other people down the road.

A solution might be to force tests to run in parallel with
"--process-restartworker", but of course it would be better to find out
where the leak is.
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Image comparison decorators outside matplotlib

2013-10-10 Thread Eduard Bopp
Hello,

I am developing a toolkit to parse, analyse and plot some scientific
data using matplotlib. Among them are some application-specific plotting
functions that sort of extend matplotlib.

There are these nice image comparison decorators to test code like that
but I am not sure how to use them for unit testing outside the scope of
matplotlib itself. Is this use case intended and possible for the decorator?

I have experimented with this unsuccessfully in the following way:

There is a tests directory within my package with test functions
decorated like so

@image_comparison(baseline_images=['custom_function'])
def test_custom_function():
# plot stuff...

When I run nosetests, it fails creating some output images in
result_images.

Copying the appropriate files according to [1] to
my_package/tests/baseline_images does not seem to have any effect. There
are neither *-expected* nor *_{pdf,svg}.png files in there, only
custom_function.{pdf,svg,png}. What am I doing wrong?

Eduard

[1] http://matplotlib.org/devel/testing.html

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] New tests failing when run together

2013-10-10 Thread Michael Droettboom
Are your tests including the "@cleanup" decorator?  (The @cleanup 
decorator is run implicitly with the @image_comparison decorator, so you 
really only need one or the other).


Beyond that wild guess, I'm not sure what could be going on.  You could 
file a pull request with your new code, even if it's not fully ready, so 
we could try it out and poke at it.  Or just point us to your git branch 
so we could check it out.


Mike

On 10/10/2013 07:33 AM, Todd wrote:
I have been implementing some new plot types, with tests.  This code 
passes all existing tests.  I have also expanded the tests on some 
existing plot types and mlab functions.  These tests run fine on their 
own.


The problem is that, when I run the code with the new tests, I get a 
lot of out of memory errors.  Further, the errors do not occur in the 
new tests, but rather in other, unrelated tests.  Further, the tests 
that fail work fine when run on their own, they only fail when run as 
part of the complete test suite.


Even stranger, when I run the tests in parallel (even with only one 
process) and enable "--process-restartworker", the tests run fine 
(with a large enough timeout).  But "--process-restartworker" doesn't 
help if parallel tests are not turned on.


So I am not sure exactly what to do here.  Even if I leave out my own 
tests, I may be running into some limit or memory leak that may very 
well result in problems for other people down the road.


A solution might be to force tests to run in parallel with 
"--process-restartworker", but of course it would be better to find 
out where the leak is.



--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk


___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel



--
   _
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] 1.3.1 tagged

2013-10-10 Thread Michael Droettboom
I have tagged and uploaded 1.3.1.  It is exactly the same as 1.3.1rc2, 
with only the version number being different.  Once the Windows binaries 
are ready, I'll make a broader announcement in the usual places.

Mike

-- 
_
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] New tests failing when run together

2013-10-10 Thread Todd
The branch is matplotlib/toddrjen spectral:

https://github.com/toddrjen/matplotlib/tree/spectral

Specifically the tests that are causing the problem are in test_mlab.py.  I
tried reorganizing the tests into subclasses and implementing a cleanup
class (that is the current HEAD), but the problem exists even without that
commit.  You can cherry-pick 50c90102a929af5d534e551fd624abffeb9470b8 and
7c1b4db8b2d04826e267781c0de1bcc622f0fdb5.


On Thu, Oct 10, 2013 at 3:22 PM, Michael Droettboom  wrote:

>  Are your tests including the "@cleanup" decorator?  (The @cleanup
> decorator is run implicitly with the @image_comparison decorator, so you
> really only need one or the other).
>
> Beyond that wild guess, I'm not sure what could be going on.  You could
> file a pull request with your new code, even if it's not fully ready, so we
> could try it out and poke at it.  Or just point us to your git branch so we
> could check it out.
>
> Mike
>
>
> On 10/10/2013 07:33 AM, Todd wrote:
>
>   I have been implementing some new plot types, with tests.  This code
> passes all existing tests.  I have also expanded the tests on some existing
> plot types and mlab functions.  These tests run fine on their own.
>
>  The problem is that, when I run the code with the new tests, I get a lot
> of out of memory errors.  Further, the errors do not occur in the new
> tests, but rather in other, unrelated tests.  Further, the tests that fail
> work fine when run on their own, they only fail when run as part of the
> complete test suite.
>
>  Even stranger, when I run the tests in parallel (even with only one
> process) and enable "--process-restartworker", the tests run fine (with a
> large enough timeout).  But "--process-restartworker" doesn't help if
> parallel tests are not turned on.
>
>  So I am not sure exactly what to do here.  Even if I leave out my own
> tests, I may be running into some limit or memory leak that may very well
> result in problems for other people down the road.
>
>  A solution might be to force tests to run in parallel with
> "--process-restartworker", but of course it would be better to find out
> where the leak is.
>
>
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register 
> >http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
>
>
>
> ___
> Matplotlib-devel mailing 
> [email protected]://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>
>
> --
>_
> |\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
> |  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |
> http://www.droettboom.com
>
>
>
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] python3 bug in __init__.py - plus fix

2013-10-10 Thread Alexander Heger
I am using Fedora 19, 64 bit, and the distribution's python 3.3.2, and
the most recent version of mpl from git

there seems to be a bug in the starup routine where proper conversion
from bytes to string (as needed for Python 3) is not done

the problem is in

/matplotlib/__init__.py, line 459 ... 460

459 gs_exec, gs_v = checkdep_ghostscript()
460 if compare_versions(gs_v, gs_sugg): pass

ipdb> gs_exec,  gs_v
('gs', b'9.07')

where clearly gs_v needs to be str

Could you please make checkdep_ghostscript() to be python3-save by
changing line 334 from

v = stdout[:-1]

to

v = stdout[:-1].decode('ascii')

(my apologies not following the bug report procedures; I hope you can
consider it anyway)

-Alexander


~/python/source3>ip
Python 3.3.2 (default, Aug 23 2013, 19:00:04)
Type "copyright", "credits" or "license" for more information.

IPython 0.13.2 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help  -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
[TerminalIPythonApp] GUI event loop or pylab initialization failed
---
TypeError Traceback (most recent call last)
/usr/lib/python3.3/site-packages/IPython/core/pylabtools.py in
find_gui_and_backend(gui)
194 """
195
--> 196 import matplotlib
197
198 if gui and gui != 'auto':

/home/alex/mpl/usr/lib64/python3.3/site-packages/matplotlib/__init__.py
in ()
975
976 rcParams['ps.usedistiller'] =
checkdep_ps_distiller(rcParams['ps.usedistiller'])
--> 977 rcParams['text.usetex'] = checkdep_usetex(rcParams['text.usetex'])
978
979 if rcParams['axes.formatter.use_locale']:

/home/alex/mpl/usr/lib64/python3.3/site-packages/matplotlib/__init__.py
in checkdep_usetex(s)
458
459 gs_exec, gs_v = checkdep_ghostscript()
--> 460 if compare_versions(gs_v, gs_sugg): pass
461 elif compare_versions(gs_v, gs_req):
462 verbose.report(('ghostscript-%s found. ghostscript-%s
or later is '

/home/alex/mpl/usr/lib64/python3.3/site-packages/matplotlib/__init__.py
in compare_versions(a, b)
116 "return True if a is greater than or equal to b"
117 if a:
--> 118 a = distutils.version.LooseVersion(a)
119 b = distutils.version.LooseVersion(b)
120 if a>=b: return True

/usr/lib64/python3.3/distutils/version.py in __init__(self, vstring)
308 def __init__ (self, vstring=None):
309 if vstring:
--> 310 self.parse(vstring)
311
312

/usr/lib64/python3.3/distutils/version.py in parse(self, vstring)
316 # use by __str__
317 self.vstring = vstring
--> 318 components = [x for x in self.component_re.split(vstring)
319   if x and x != '.']
320 for i, obj in enumerate(components):

TypeError: can't use a string pattern on a bytes-like object

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] IPython Comm backend

2013-10-10 Thread Jason Grout
I've been working on a backend based on the webagg backend, but that 
uses the IPython Comm architecture at 
https://github.com/ipython/ipython/pull/4195 to send messages instead of 
starting a server and opening websocket connections.  I have an initial 
version in my github ipython-comm branch (see 
https://github.com/jasongrout/matplotlib/compare/ipython-comm).  I'm 
getting confused about how the backend infrastructure works, though, 
like what the purpose for the FigureManager class is, etc.  I'm running 
out of time to work on this now, and I'm hoping that someone will take 
what work I've done here and get it working properly with the matplotlib 
architecture.  If not, I'll probably tinker with this more later.

Thanks,

Jason

--
Jason Grout

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel