Re: [matplotlib-devel] Comparing pdf output in tests

2009-10-12 Thread Jouni K . Seppänen
Andrew Straw straw...@astraw.com writes: Sorry for not noticing this earlier, but I'm looking in the baseline image directory, and I see a bunch of *_pdf.png files. I guess these have been convered to png from pdf on the tester's machine. Do you think it makes more sense to have the .pdf

Re: [matplotlib-devel] Comparing pdf output in tests

2009-10-12 Thread Andrew Straw
Jouni K. Seppänen wrote: Andrew Straw straw...@astraw.com writes: Sorry for not noticing this earlier, but I'm looking in the baseline image directory, and I see a bunch of *_pdf.png files. I guess these have been convered to png from pdf on the tester's machine. Do you think it makes

Re: [matplotlib-devel] Comparing pdf output in tests

2009-10-05 Thread John Hunter
On Fri, Oct 2, 2009 at 12:27 AM, Andrew Straw straw...@astraw.com wrote: I just installed gs on one of the buildbots -- so at least the .pdf generation should get tested on one machine. (The one running the py24 and py25 tests.) The OSX build bot has been down ever since the build machine was

Re: [matplotlib-devel] Comparing pdf output in tests

2009-10-05 Thread Andrew Straw
Jouni K. Seppänen wrote: Andrew Straw straw...@astraw.com writes: This test function is a generator that nose will then generate two test cases out of. So, perhaps the image_comparison decorator could be changed to become a generator? I'm not 100% sure it will work, but I don't see why

Re: [matplotlib-devel] Comparing pdf output in tests

2009-10-04 Thread Jouni K . Seppänen
Andrew Straw straw...@astraw.com writes: This test function is a generator that nose will then generate two test cases out of. So, perhaps the image_comparison decorator could be changed to become a generator? I'm not 100% sure it will work, but I don't see why it won't. If it does work, I

Re: [matplotlib-devel] Comparing pdf output in tests

2009-10-01 Thread Andrew Straw
Jouni K. Seppänen wrote: Jouni K. Seppänen j...@iki.fi writes: I committed something based on this, and a new rc parameter savefig.extension that sets the filename extension when you call savefig with a bare filename. The pdf tests seem to be working, at least for me, but I am sure that

Re: [matplotlib-devel] Comparing pdf output in tests

2009-09-27 Thread Jouni K . Seppänen
Andrew Straw straw...@astraw.com writes: Thus, the call to savefig() would continue not to explicitly set the extension. I've quickly modified the source to reflect my idea, but I haven't had a chance to flesh it out or test it. It should show the idea, though. See attached. I committed

Re: [matplotlib-devel] Comparing pdf output in tests

2009-09-23 Thread Andrew Straw
Jouni K. Seppänen wrote: Andrew Straw straw...@astraw.com writes: Michael Droettboom wrote: We can probably standardize the version of gs on the buildbot machines, but it's been very useful up to now to have tests that can run on a variety of developer machines as well.

Re: [matplotlib-devel] Comparing pdf output in tests

2009-09-23 Thread Jouni K . Seppänen
Andrew Straw straw...@astraw.com writes: Jouni - I don't think this would be hard to add, but I'm swamped at work. If this is an itch you'd like to scratch, feel free to hack away on the image_comparison() function in lib/matplotlib/testing/decorators.py -- it's a pretty straightforward

Re: [matplotlib-devel] Comparing pdf output in tests

2009-09-23 Thread John Hunter
On Wed, Sep 23, 2009 at 10:48 AM, Jouni K. Seppänen j...@iki.fi wrote: Andrew Straw straw...@astraw.com writes: Jouni - I don't think this would be hard to add, but I'm swamped at work. If this is an itch you'd like to scratch, feel free to hack away on the image_comparison() function in

Re: [matplotlib-devel] Comparing pdf output in tests

2009-09-23 Thread Jouni K . Seppänen
John Hunter jdh2...@gmail.com writes:    pyplot.savefig('foo1') Take a look at the pyplot switch_backends function. Yes, that function was on the next line after the part you quoted. :-) It calls matplotlib.use with warn=False, but that function ends up doing nothing. Alternatively, agg

Re: [matplotlib-devel] Comparing pdf output in tests

2009-09-23 Thread Andrew Straw
Jouni K. Seppänen wrote: John Hunter jdh2...@gmail.com writes: pyplot.savefig('foo1') Take a look at the pyplot switch_backends function. Yes, that function was on the next line after the part you quoted. :-) It calls matplotlib.use with warn=False, but that function

Re: [matplotlib-devel] Comparing pdf output in tests

2009-09-23 Thread John Hunter
On Wed, Sep 23, 2009 at 12:42 PM, Andrew Straw straw...@astraw.com wrote: Sorry, I should have been more clear. I was thinking that the image_compare() decorator would call the test function multiple times, having switched the backend between invocations. Thus, the call to savefig() would

Re: [matplotlib-devel] Comparing pdf output in tests

2009-09-23 Thread Andrew Straw
John Hunter wrote: On Wed, Sep 23, 2009 at 12:42 PM, Andrew Straw straw...@astraw.com wrote: Sorry, I should have been more clear. I was thinking that the image_compare() decorator would call the test function multiple times, having switched the backend between invocations. Thus, the call

Re: [matplotlib-devel] Comparing pdf output in tests

2009-09-23 Thread John Hunter
On Wed, Sep 23, 2009 at 12:56 PM, Andrew Straw straw...@astraw.com wrote: John Hunter wrote: On Wed, Sep 23, 2009 at 12:42 PM, Andrew Straw straw...@astraw.com wrote: Sorry, I should have been more clear. I was thinking that the image_compare() decorator would call the test function multiple

Re: [matplotlib-devel] Comparing pdf output in tests

2009-09-23 Thread Andrew Straw
John Hunter wrote: On Wed, Sep 23, 2009 at 12:56 PM, Andrew Straw straw...@astraw.com wrote: John Hunter wrote: On Wed, Sep 23, 2009 at 12:42 PM, Andrew Straw straw...@astraw.com wrote: Sorry, I should have been more clear. I was thinking that the image_compare() decorator

[matplotlib-devel] Comparing pdf output in tests

2009-09-22 Thread Jouni K . Seppänen
I am thinking about adding pdf comparison ability to compare_images. One simple way to do this would be to convert pdf files to pngs using Ghostscript: if we store reference pdf files, and both the reference file and the result of the test are converted using with exactly the same version of gs,

Re: [matplotlib-devel] Comparing pdf output in tests

2009-09-22 Thread Michael Droettboom
Jouni K. Seppänen wrote: I am thinking about adding pdf comparison ability to compare_images. One simple way to do this would be to convert pdf files to pngs using Ghostscript: if we store reference pdf files, and both the reference file and the result of the test are converted using with

Re: [matplotlib-devel] Comparing pdf output in tests

2009-09-22 Thread Andrew Straw
Michael Droettboom wrote: Jouni K. Seppänen wrote: I am thinking about adding pdf comparison ability to compare_images. One simple way to do this would be to convert pdf files to pngs using Ghostscript: if we store reference pdf files, and both the reference file and the result of the

Re: [matplotlib-devel] Comparing pdf output in tests

2009-09-22 Thread Jouni K . Seppänen
Andrew Straw straw...@astraw.com writes: Michael Droettboom wrote: We can probably standardize the version of gs on the buildbot machines, but it's been very useful up to now to have tests that can run on a variety of developer machines as well. I understood Jouni's idea to be to save