dfm / dfm/corner.py

12 tests fail: images not close (RMS 5.743)

Open
#308 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
576
Forks
234
PR merge metrics
No merged PRs in 30d

Description

============================================================================== FAILURES ===============================================================================
___________________________________________________________________________ test_arviz[png] ___________________________________________________________________________

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
                ^^^^^^^^^^^^^^^^^^^^^^^^
    )

/usr/local/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_arviz[png]>>}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
                   ^^^^^^^^^^^^^^^^^^^
E           matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 4.056):
E               result_images/test_corner/arviz.png
E               result_images/test_corner/arviz-expected.png
E               result_images/test_corner/arviz-failed-diff.png

/usr/local/lib/python3.11/contextlib.py:81: ImageComparisonFailure
__________________________________________________________________________ test_titles1[png] __________________________________________________________________________

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
                ^^^^^^^^^^^^^^^^^^^^^^^^
    )

/usr/local/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_titles1[png]>>}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
                   ^^^^^^^^^^^^^^^^^^^
E           matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 3.542):
E               result_images/test_corner/titles1.png
E               result_images/test_corner/titles1-expected.png
E               result_images/test_corner/titles1-failed-diff.png

/usr/local/lib/python3.11/contextlib.py:81: ImageComparisonFailure
___________________________________________________________________ test_reverse_overplotting[png] ____________________________________________________________________

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
                ^^^^^^^^^^^^^^^^^^^^^^^^
    )

/usr/local/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_reverse_overplotting[png]>>}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
                   ^^^^^^^^^^^^^^^^^^^
E           matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 0.032):
E               result_images/test_corner/reverse_overplotting.png
E               result_images/test_corner/reverse_overplotting-expected.png
E               result_images/test_corner/reverse_overplotting-failed-diff.png

/usr/local/lib/python3.11/contextlib.py:81: ImageComparisonFailure
__________________________________________________________________________ test_labels[png] ___________________________________________________________________________

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
                ^^^^^^^^^^^^^^^^^^^^^^^^
    )

/usr/local/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_labels[png]>>}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
                   ^^^^^^^^^^^^^^^^^^^
E           matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 4.057):
E               result_images/test_corner/labels.png
E               result_images/test_corner/labels-expected.png
E               result_images/test_corner/labels-failed-diff.png

/usr/local/lib/python3.11/contextlib.py:81: ImageComparisonFailure
___________________________________________________________________ test_extended_overplotting[png] ___________________________________________________________________

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
                ^^^^^^^^^^^^^^^^^^^^^^^^
    )

/usr/local/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_extended_overplotting[png]>>}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
                   ^^^^^^^^^^^^^^^^^^^
E           matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 0.034):
E               result_images/test_corner/extended_overplotting.png
E               result_images/test_corner/extended_overplotting-expected.png
E               result_images/test_corner/extended_overplotting-failed-diff.png

/usr/local/lib/python3.11/contextlib.py:81: ImageComparisonFailure
______________________________________________________________________ test_title_quantiles[png] ______________________________________________________________________

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
                ^^^^^^^^^^^^^^^^^^^^^^^^
    )

/usr/local/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_title_quantiles[png]>>}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
                   ^^^^^^^^^^^^^^^^^^^
E           matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 3.542):
E               result_images/test_corner/title_quantiles.png
E               result_images/test_corner/title_quantiles-expected.png
E               result_images/test_corner/title_quantiles-failed-diff.png

/usr/local/lib/python3.11/contextlib.py:81: ImageComparisonFailure
______________________________________________________________________ test_1d_fig_argument[png] ______________________________________________________________________

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
                ^^^^^^^^^^^^^^^^^^^^^^^^
    )

/usr/local/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_1d_fig_argument[png]>>}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
                   ^^^^^^^^^^^^^^^^^^^
E           matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 8.551):
E               result_images/test_corner/1d_fig_argument.png
E               result_images/test_corner/1d_fig_argument-expected.png
E               result_images/test_corner/1d_fig_argument-failed-diff.png

/usr/local/lib/python3.11/contextlib.py:81: ImageComparisonFailure
___________________________________________________________________________ test_tight[png] ___________________________________________________________________________

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
                ^^^^^^^^^^^^^^^^^^^^^^^^
    )

/usr/local/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_tight[png]>>}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
                   ^^^^^^^^^^^^^^^^^^^
E           matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 15.087):
E               result_images/test_corner/tight.png
E               result_images/test_corner/tight-expected.png
E               result_images/test_corner/tight-failed-diff.png

/usr/local/lib/python3.11/contextlib.py:81: ImageComparisonFailure
__________________________________________________________________ test_title_quantiles_raises[png] ___________________________________________________________________

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
                ^^^^^^^^^^^^^^^^^^^^^^^^
    )

/usr/local/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_title_quantiles_raises[png]>>}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
                   ^^^^^^^^^^^^^^^^^^^
E           matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 3.541):
E               result_images/test_corner/title_quantiles_raises.png
E               result_images/test_corner/title_quantiles_raises-expected.png
E               result_images/test_corner/title_quantiles_raises-failed-diff.png

/usr/local/lib/python3.11/contextlib.py:81: ImageComparisonFailure
__________________________________________________________________________ test_pandas[png] ___________________________________________________________________________

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
                ^^^^^^^^^^^^^^^^^^^^^^^^
    )

/usr/local/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_pandas[png]>>}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
                   ^^^^^^^^^^^^^^^^^^^
E           matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 5.743):
E               result_images/test_corner/pandas.png
E               result_images/test_corner/pandas-expected.png
E               result_images/test_corner/pandas-failed-diff.png

/usr/local/lib/python3.11/contextlib.py:81: ImageComparisonFailure
-------------------------------------------------------------------------- Captured log call --------------------------------------------------------------------------
WARNING  root:arviz_corner.py:92 Pandas support in corner is deprecated; use ArviZ directly
__________________________________________________________________ test_title_quantiles_default[png] __________________________________________________________________

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
                ^^^^^^^^^^^^^^^^^^^^^^^^
    )

/usr/local/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_title_quantiles_default[png]>>}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
                   ^^^^^^^^^^^^^^^^^^^
E           matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 3.542):
E               result_images/test_corner/title_quantiles_default.png
E               result_images/test_corner/title_quantiles_default-expected.png
E               result_images/test_corner/title_quantiles_default-failed-diff.png

/usr/local/lib/python3.11/contextlib.py:81: ImageComparisonFailure
__________________________________________________________________________ test_titles2[png] __________________________________________________________________________

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
                ^^^^^^^^^^^^^^^^^^^^^^^^
    )

/usr/local/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (), kwds = {'extension': 'png', 'request': <FixtureRequest for <Function test_titles2[png]>>}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
                   ^^^^^^^^^^^^^^^^^^^
E           matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 4.057):
E               result_images/test_corner/titles2.png
E               result_images/test_corner/titles2-expected.png
E               result_images/test_corner/titles2-failed-diff.png

/usr/local/lib/python3.11/contextlib.py:81: ImageComparisonFailure
============================================================== 12 failed, 49 passed in 174.75s (0:02:54) ==============================================================

I checked result_images/test_corner/arviz-failed-diff.png and it has diffs near text areas.
Is this a font issue?

Version: 2.2.3
Python-3.11
FreeBSD 14.3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by rerunning the failing corner image-comparison tests, including test_arviz, test_titles1, test_reverse_overplotting, test_labels, test_extended_overplotting, test_title_quantiles, test_1d_fig_argument, test_tight, test_title_quantiles_raises, and test_pandas. Compare the generated files under result_images/test_corner with their expected and failed-diff images; done means the affected tests pass without image-comparison failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, pandas, python
Domain
data-visualization, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.