-
Notifications
You must be signed in to change notification settings - Fork 30
Remove FakeFunc from AddPdf/AddPdfNorm._parts #91
Remove FakeFunc from AddPdf/AddPdfNorm._parts #91
Conversation
So since there were few remaining test failures I tried to fix them as well. |
So the builds work for python 2.7 and 3.4, and it works for me for python 3.7. The only two tests that are remaining are two plot check that fail for python 3.5 and 3.6 and I cannot see the difference to solve (the diff plot is inside travis env). |
…d test_draw_residual_blh_norm
Hi @marinang, thumbs up for the heroic effort! |
if you look at the makefile https://github.com/scikit-hep/probfit/blob/master/Makefile: test: build the second part is using pytest-mpl https://github.com/matplotlib/pytest-mpl, which is an image comparator. Basically it compares images produced in the tests functions and the images here https://github.com/scikit-hep/probfit/tree/master/tests/baseline. The tests fail for /draw_residual_blh_norm.png and /draw_residual_ulh_norm.png which is highly mysterious why since it works for python 2.7 and 3.4. pytest-mpl produces a difference plot, which highlights where in the plots the differences are but we don't have access to them in the travis build right? |
Yep, got there as well, actually looking at the various files needed. While doing that I also noticed the comments
in a couple of tests in tests_plotting.py where a tolerance is specified. Could it be a matter of increasing the tolerance for the 2 failing tests? |
…rm and test_draw_residual_blh_norm
…idual_b(u)lh_norm_no_errbars.png
@eduardo-rodrigues you have to put a big tolerance because the rms are ~45 and 56 for between the expected and obtained images. Two remaining problems still for py35 and py36, the doc is not compiled because of this module 'matplotlib.sphinxext.only_directives' which is not found. It should be found from the installed Matplotlib though ... |
Saw that. It's a weird thing the differences between Py 3.4 and 3.5-3.6. To be revisited at some point it seems … I am tempted to accept this PR given that what is addressed is sorted-ish. The failure at creating the documentation is a different matter and deserves its own PR I would say. I browsed the web a bit and may try and address the problem with the doc soon. I will merge this later unless somebody shouts. |
…b release in travis.yml
@eduardo-rodrigues I just tried to set a maximum requirement on the matplotlib version in travis to the public one, because from the log I saw that the mil version was 3.0.1 ... so just a check |
from probfit.plotting import draw_pdf, draw_compare_hist | ||
from probfit.pdf import gaussian, linear | ||
from probfit.funcutil import rename | ||
from probfit.functor import Extended, AddPdfNorm, AddPdf | ||
from probfit.costfunc import UnbinnedLH, BinnedLH, BinnedChi2, Chi2Regression, \ | ||
SimultaneousFit | ||
|
||
major, minor = sys.version_info[0:2] | ||
if major >= 3 and minor >= 5: | ||
special_tol = 60.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new tolerance seems excessively large. Why is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a look here https://travis-ci.org/scikit-hep/probfit/jobs/448471653.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok.
@eduardo-rodrigues for the doc according to https://matplotlib.org/3.0.0/devel/plot_directive.html?highlight=sphinx#module-matplotlib.sphinxext.plot_directive it looks like matplotlib.sphinxext.only_directive doesn't exist anymore. |
Yes, seems the directive is gone with matplotlib >=3. |
This is a workaround that worked for me and Following #84, I think it will solve a couple of tests.