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

2009-10-12 Thread Andrew Straw
Jouni K. Seppänen wrote: > Andrew Straw 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 sen

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

2009-10-12 Thread Jouni K . Seppänen
Andrew Straw 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 files in the test

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

2009-10-12 Thread Andrew Straw
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 e

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

2009-10-05 Thread Andrew Straw
Jouni K. Seppänen wrote: > Andrew Straw 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.

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 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 upgraded to 10.6

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

2009-10-04 Thread Jouni K . Seppänen
Andrew Straw 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 think this is a go

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

2009-10-01 Thread Andrew Straw
Jouni K. Seppänen wrote: > Jouni K. Seppänen 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 t

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

2009-09-28 Thread Jouni K . Seppänen
Jouni K. Seppänen 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 the code can be improved. The buildbo

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

2009-09-27 Thread Jouni K . Seppänen
Andrew Straw 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 something based on t

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 wrote: > >> John Hunter wrote: >> >>> On Wed, Sep 23, 2009 at 12:42 PM, Andrew Straw wrote: >>> >>> >>> Sorry, I should have been more clear. I was thinking that the image_compare() decorator would call t

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 wrote: > John Hunter wrote: >> On Wed, Sep 23, 2009 at 12:42 PM, Andrew Straw wrote: >> >> >>> Sorry, I should have been more clear. I was thinking that the >>> image_compare() decorator would call the test function multiple times, >>> having switche

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 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 >> save

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 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 continue not to exp

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

2009-09-23 Thread Andrew Straw
Jouni K. Seppänen wrote: > John Hunter 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 en

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

2009-09-23 Thread Jouni K . Seppänen
John Hunter 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 knows how to s

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 wrote: > Andrew Straw 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/d

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

2009-09-23 Thread Jouni K . Seppänen
Andrew Straw 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 > piece of code. Cha

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

2009-09-22 Thread Andrew Straw
Jouni K. Seppänen wrote: > Andrew Straw 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-22 Thread Jouni K . Seppänen
Andrew Straw 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 the .pdfs as

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 o

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 e

[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, th