Is there an intermediate format in matplotlib to which we can compare? It
seems odd to compare images that are generated by an external library.
Couldn't a change in matplotlib cause our tests to fail?
On Feb 9, 2012 12:26 PM, "krastanov.ste...@gmail.com" <
krastanov.ste...@gmail.com> wrote:

> On 9 February 2012 21:12, Aaron Meurer <asmeu...@gmail.com> wrote:
> > I just did a git clone, and everything, including the checkout is 52MB.
> >
> > Is it possible to use SVG versions of the images?  That should be much
> > smaller, I would think, as the plots are vector images anyway.  Also,
> > git will handle any diffs on a SVG much better than from a binary
> > file.
> >
> > What are these images used for?
> During the tests a number of images are generated. Those are then
> compared to the saved reference images.
> I have tried several comparison methods:
>  - bit by bit - it does not work (both for png and svg)
>  - string comparison for svg but only after removing all randomly
> generated ids and hrefs (ok, tested only on one machine, but gives an
> enormous number of lines of code in all tracking software (git,
> github, loc counters))
>  - histogram comparison for png - it is the method used in the
> upstream matplotlib testing framework. I am calculating the histograms
> and then comparing them with some hardcoded tolerance. I imagine that
> instead of saving entire png files I can save only the histogram.
>
> So as possible solutions I propose:
> - using svg (but it will give an enormous loc count)
> - saving only the histograms of the pngs (quite small and nice but
> difficult to verify in case of failure, when the failure is just due
> to insufficient tolerance during the comparison (you can not compare
> them with your own eyes))
> - sticking to png and using sizes that are a bit smaller (but not too much)
>
> I prefer the second or third method because otherwise git will report
> tens of thousands of loc.
>
> A similar problem is present in the notebooks in the example folder.
> Notebooks with figures tend to be big.
>
> >
> > Aaron Meurer
> >
> > On Thu, Feb 9, 2012 at 12:42 PM, krastanov.ste...@gmail.com
> > <krastanov.ste...@gmail.com> wrote:
> >> Hi,
> >>
> >> The new plotting module tests keep a number of reference png images
> >> for comparison. ~20 images each ~200KB is more than the size of our
> >> code base. I do not know it it will be a good decision to burden git
> >> with those. What do you think?
> >>
> >> Stefan
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups "sympy" group.
> >> To post to this group, send email to sympy@googlegroups.com.
> >> To unsubscribe from this group, send email to
> sympy+unsubscr...@googlegroups.com.
> >> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
> >>
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "sympy" group.
> > To post to this group, send email to sympy@googlegroups.com.
> > To unsubscribe from this group, send email to
> sympy+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To post to this group, send email to sympy@googlegroups.com.
> To unsubscribe from this group, send email to
> sympy+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to