FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

TST: Add future dependency tests as a weekly CI job by greglucas · Pull Request #21634 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) .yml  (1) All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
32 changes: 32 additions & 0 deletions .github/workflows/tests.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request:
branches-ignore:
- v[0-9]+.[0-9]+.[0-9x]+-doc
schedule:
# 3:47 UTC on Saturdays
- cron: "47 3 * * 6"
Comment thread
greglucas marked this conversation as resolved.

env:
NO_AT_BRIDGE: 1 # Necessary for GTK3 interactive test.
Expand Down Expand Up @@ -209,6 +212,20 @@ jobs:
echo 'wxPython is available' ||
echo 'wxPython is not available'

- name: Install the nightly dependencies
# Only install the nightly dependencies during the scheduled event
if: ${{ github.event_name == 'schedule' && matrix.name-suffix != '(Minimum Versions)' }}
run: |
python -m pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple --upgrade numpy pandas

# Turn all warnings to errors, except ignore the distutils deprecations and the find_spec warning
cat >> pytest.ini << EOF
filterwarnings =
error
ignore:.*distutils:DeprecationWarning
ignore:DynamicImporter.find_spec\(\) not found; falling back to find_module\(\):ImportWarning
EOF

- name: Install Matplotlib
run: |
ccache -s
Expand Down Expand Up @@ -266,3 +283,18 @@ jobs:
with:
name: "${{ matrix.python-version }} ${{ matrix.os }} ${{ matrix.name-suffix }} result images"
path: ./result_images

- name: Create issue on failure
uses: imjohnbo/issue-bot@v3
if: ${{ failure() && github.event_name == 'schedule' }}
with:
title: "[TST] Upcoming dependency test failures"
body: |
The weekly build with nightly wheels from numpy and pandas
has failed. Check the logs for any updates that need to be
made in matplotlib.

pinned: false
close-previous: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions lib/matplotlib/tests/test_axes.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -3438,6 +3438,8 @@ def test_errorbar():
ax.errorbar(x, y, yerr=[yerr_lower, 2*yerr], xerr=xerr,
fmt='o', ecolor='g', capthick=2)
ax.set_title('Mixed sym., log y')
# Force limits due to floating point slop potentially expanding the range
ax.set_ylim(1e-2, 1e1)

fig.suptitle('Variable errorbars')

Expand Down
7 changes: 4 additions & 3 deletions lib/matplotlib/tests/test_colors.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -568,14 +568,15 @@ def test_Normalize():
# Don't lose precision on longdoubles (float128 on Linux):
# for array inputs...
vals = np.array([1.2345678901, 9.8765432109], dtype=np.longdouble)
norm = mcolors.Normalize(vals.min(), vals.max())
assert_array_equal(np.asarray(norm(vals)), [0, 1])
norm = mcolors.Normalize(vals[0], vals[1])
assert norm(vals).dtype == np.longdouble
assert_array_equal(norm(vals), [0, 1])
# and for scalar ones.
eps = np.finfo(np.longdouble).resolution
norm = plt.Normalize(1, 1 + 100 * eps)
# This returns exactly 0.5 when longdouble is extended precision (80-bit),
# but only a value close to it when it is quadruple precision (128-bit).
assert 0 < norm(1 + 50 * eps) < 1
np.testing.assert_array_almost_equal_nulp(norm(1 + 50 * eps), 0.5)
Comment on lines 577 to +579

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This seems to be a bit too strict now, as it is failing on aarch64, ppc64le, and s390x, where the result is 0.50096339.

Also, on my 64-bit AMD system, which is apparently using np.float128 for np.longdouble (though I don't know if that means 80-bit internally), it seems to return 0.5 exactly, which seems the opposite of the comment.



def test_FuncNorm():
Expand Down

Back | FazBrowse Home | New Git URL