Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpin matplotlib to support >=2.0 #3019

Merged
merged 99 commits into from
May 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
d374f01
unpin mpl
bjlittle May 3, 2018
8c2e6fb
fix format_array
bjlittle May 3, 2018
e4e17f1
correct skip test skip message
bjlittle May 3, 2018
330f78e
tidy format_array
bjlittle May 16, 2018
ff88152
test_collapsed cml
bjlittle May 16, 2018
83845e8
test_hybrid_height cml
bjlittle May 16, 2018
4edea6b
test_hybrid_height_cubes cml
bjlittle May 16, 2018
94fa447
test_hybrid_height cml
bjlittle May 16, 2018
4d6be6f
test_cube cml
bjlittle May 16, 2018
bf962fc
test_collapse_all_dims cml
bjlittle May 16, 2018
0b82e80
test_transposed cml
bjlittle May 16, 2018
0c7c5cc
test_slice cml
bjlittle May 16, 2018
9908326
test_collapse_zeroth_dim cml
bjlittle May 16, 2018
220c1db
test_collapse_middle_dim cml
bjlittle May 16, 2018
5373ace
test_collapse_last_dims cml
bjlittle May 16, 2018
15a90d0
test_transposed cml
bjlittle May 16, 2018
9189e3a
test_slice cml
bjlittle May 16, 2018
9c6da6b
test_collapse_zeroth_dim cml
bjlittle May 16, 2018
547021b
test_collapse_middle_dim cml
bjlittle May 16, 2018
c11ff00
test_collapse_last_dims cml
bjlittle May 16, 2018
6fa9aba
test_collapse_all_dims cml
bjlittle May 16, 2018
ec41286
test_transposed cml
bjlittle May 17, 2018
8a91ce9
test_slice cml
bjlittle May 17, 2018
909e5bf
test_collapse_zeroth_dim cml
bjlittle May 17, 2018
374c269
test_collapse_middle_dim cml
bjlittle May 17, 2018
d0eb638
test_collapse_last_dims cml
bjlittle May 17, 2018
2ba0e5e
test_collapse_all_dims cml
bjlittle May 17, 2018
f4b7d49
test_transposed cml
bjlittle May 17, 2018
dd99372
test_slice cml
bjlittle May 17, 2018
9d74f27
test_collapse_zeroth_dim cml
bjlittle May 17, 2018
5d13998
test_collapse_middle_dim cml
bjlittle May 17, 2018
33f807f
test_collapse_last_dims cml
bjlittle May 17, 2018
a71459e
test_collapse_all_dims cml
bjlittle May 17, 2018
a570742
test_transposed_src cml
bjlittle May 17, 2018
157ec03
test_grid_subset_missing_data_aux cml
bjlittle May 17, 2018
e51b862
test_grid_subset_missing_data_2 cml
bjlittle May 17, 2018
cf8183b
test_grid_subset_missing_data_1 cml
bjlittle May 17, 2018
42d20d8
test_grid_subset_anon cml
bjlittle May 17, 2018
d3f792a
test_grid_partial_overlap cml
bjlittle May 17, 2018
e78405f
test_grid_no_overlap cml
bjlittle May 17, 2018
b29c552
test_circular_src_and_grid cml
bjlittle May 17, 2018
f1a515e
test_circular_src__masked_missingmask cml
bjlittle May 17, 2018
a921c45
test_circular_src cml
bjlittle May 17, 2018
578dcbc
test_metadata_wrapped cml
bjlittle May 17, 2018
f08bfbc
test_metadata cml
bjlittle May 17, 2018
c2f58db
test_cube_slice_with_transpose cml
bjlittle May 17, 2018
b2e2973
test_cube_slice_all_dimensions cml
bjlittle May 17, 2018
6936644
test_ellipsis cml
bjlittle May 17, 2018
36e31ba
test_cube_indexing_reverse_coords cml
bjlittle May 17, 2018
3080045
test_cube_indexing_1d_multi_slice2 cml
bjlittle May 17, 2018
bb0917a
test_cube_extract_by_coord_advanced cml
bjlittle May 17, 2018
36f3e31
test_concat_3d_simple cml
bjlittle May 17, 2018
1519bfb
test_concat_2x2d_aux_xy_bounds cml
bjlittle May 17, 2018
c82d2fa
test_transpose cml
bjlittle May 17, 2018
ea9c419
test_removing_sigma cml
bjlittle May 17, 2018
4060a31
test_no_orography cml
bjlittle May 17, 2018
b06a7f4
test_extended_proxy_data cml
bjlittle May 17, 2018
143c509
test_simple_multidim_merge cml
bjlittle May 17, 2018
f6e98ee
test_colpex cml
bjlittle May 17, 2018
838afd2
test_netcdf_save_ndim_auxiliary cml
bjlittle May 17, 2018
7b16d44
test_netcdf_hybrid_height cml
bjlittle May 17, 2018
764287a
test_load_tmerc_grid_and_clim_bounds cml
bjlittle May 17, 2018
46b974a
test_load_stereographic_grid cml
bjlittle May 17, 2018
27aa953
test_load_rotated_xyt_precipitation cml
bjlittle May 17, 2018
f524eeb
test_load_rotated_xy_land cml
bjlittle May 17, 2018
f555333
test_load_merc_grid cml
bjlittle May 17, 2018
082ba81
test_load_lcc_grid cml
bjlittle May 17, 2018
060190a
test_cubelist_pickle cml
bjlittle May 17, 2018
c055f1e
test_pp_save_rules cml
bjlittle May 17, 2018
adb51be
test_pp_save_rules cml
bjlittle May 17, 2018
66415da
test_non_standard_cross_sections cml
bjlittle May 17, 2018
cc9576d
test_pp_append_lists cml
bjlittle May 17, 2018
ded76dc
test_full_file cml
bjlittle May 17, 2018
23e1ef0
test_wgdos cml
bjlittle May 17, 2018
2e08272
test_lots_of_extra_data cml
bjlittle May 17, 2018
5c618eb
test_load_stereographic_grid cml
bjlittle May 17, 2018
84cf9b4
test_rle cml
bjlittle May 17, 2018
4916a82
test_full_file cml
bjlittle May 17, 2018
35cf973
test_000003000000_03_236_008320_1990_12_01_00_00_b_pp cml
bjlittle May 22, 2018
3aaed92
test_000003000000_03_236_004224_1990_12_01_00_00_b_pp cml
bjlittle May 22, 2018
ebe8cc8
test_000003000000_03_236_000128_1990_12_01_00_00_b_pp cml
bjlittle May 22, 2018
fc05b90
test_full_file cml
bjlittle May 22, 2018
83d506b
test_missing_data MaskedConstant
bjlittle May 22, 2018
b49b289
update .gitignore
bjlittle May 22, 2018
6bf5d9f
repin mpl, force unpin np
bjlittle May 22, 2018
fbfe0e1
revert: can't force np 1.14.3 and mpl 1.5.3
bjlittle May 22, 2018
c19188e
working doctests
bjlittle May 22, 2018
f4cb02e
standard figsize
bjlittle May 25, 2018
f88a90e
add noqa
bjlittle May 25, 2018
e7cd270
fix mpl DeprecationWarning
bjlittle May 25, 2018
7d87cd0
conda list --explicit
bjlittle May 25, 2018
fdeeeb7
fix default images
bjlittle May 26, 2018
eaeda68
fix example tests
bjlittle May 27, 2018
1d9999f
add citation graphic test
bjlittle May 28, 2018
65087d8
fix string coord ticks
bjlittle May 29, 2018
bb733c1
fix test_zx and test_tx scatter
bjlittle May 30, 2018
a468646
fix test_CellMeasure
bjlittle May 30, 2018
1e43862
remove ignored contourf linewidth kwarg
bjlittle May 30, 2018
d97dfd0
travis explicit conda env install
bjlittle May 30, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,7 @@
*.py[co] *.py[co]


# Packages # Packages
*.egg *.egg?
*.egg-info *.egg-info
dist dist
build build
Expand Down Expand Up @@ -32,6 +32,7 @@ lib/iris/std_names.py
# Iris test result files # Iris test result files
lib/iris/tests/result_image_comparison/ lib/iris/tests/result_image_comparison/
iris_image_test_output/ iris_image_test_output/
*.ESMF_LogFile


# Iris test lock file # Iris test lock file
lib/iris/tests/results/imagerepo.lock lib/iris/tests/results/imagerepo.lock
Expand Down
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -76,13 +76,14 @@ install:
CONDA_REQS_FILE=conda-requirements.txt; CONDA_REQS_FILE=conda-requirements.txt;
python requirements/gen_conda_requirements.py ${CONDA_REQS_FLAGS} --groups ${CONDA_REQS_GROUPS} > ${CONDA_REQS_FILE}; python requirements/gen_conda_requirements.py ${CONDA_REQS_FLAGS} --groups ${CONDA_REQS_GROUPS} > ${CONDA_REQS_FILE};
cat ${CONDA_REQS_FILE}; cat ${CONDA_REQS_FILE};
conda install --quiet --file ${CONDA_REQS_FILE}; conda install --quiet -n $ENV_NAME --file ${CONDA_REQS_FILE};


- PREFIX=$HOME/miniconda/envs/$ENV_NAME - PREFIX=$HOME/miniconda/envs/$ENV_NAME


# Output debug info # Output debug info
- > - >
conda list; conda list -n $ENV_NAME;
conda list -n $ENV_NAME --explicit;
conda info -a; conda info -a;


# Pre-load Natural Earth data to avoid multiple, overlapping downloads. # Pre-load Natural Earth data to avoid multiple, overlapping downloads.
Expand Down Expand Up @@ -111,7 +112,7 @@ install:
# JUST FOR NOW : Install latest version of iris-grib. # JUST FOR NOW : Install latest version of iris-grib.
# TODO : remove when iris doesn't do an integration test requiring iris-grib. # TODO : remove when iris doesn't do an integration test requiring iris-grib.
- if [[ "$TEST_MINIMAL" != true && ${TRAVIS_PYTHON_VERSION} == 2* ]]; then - if [[ "$TEST_MINIMAL" != true && ${TRAVIS_PYTHON_VERSION} == 2* ]]; then
conda install python-ecmwf_grib; conda install --quiet -n $ENV_NAME python-ecmwf_grib;
pip install git+https://github.com/SciTools/iris-grib.git@v0.11.0; pip install git+https://github.com/SciTools/iris-grib.git@v0.11.0;
fi fi


Expand Down
5 changes: 2 additions & 3 deletions docs/iris/example_code/Meteorology/COP_maps.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ def main():
# Add the first subplot showing the E1 scenario # Add the first subplot showing the E1 scenario
plt.subplot(121) plt.subplot(121)
plt.title('HadGEM2 E1 Scenario', fontsize=10) plt.title('HadGEM2 E1 Scenario', fontsize=10)
iplt.contourf(delta_e1, levels, colors=colors, linewidth=0, iplt.contourf(delta_e1, levels, colors=colors, extend='both')
extend='both')
plt.gca().coastlines() plt.gca().coastlines()
# get the current axes' subplot for use later on # get the current axes' subplot for use later on
plt1_ax = plt.gca() plt1_ax = plt.gca()
Expand All @@ -114,7 +113,7 @@ def main():
plt.subplot(122) plt.subplot(122)
plt.title('HadGEM2 A1B-Image Scenario', fontsize=10) plt.title('HadGEM2 A1B-Image Scenario', fontsize=10)
contour_result = iplt.contourf(delta_a1b, levels, colors=colors, contour_result = iplt.contourf(delta_a1b, levels, colors=colors,
linewidth=0, extend='both') extend='both')
Copy link
Member

Choose a reason for hiding this comment

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

Would be interested to see that this is the right thing to do. Will dig a little.

plt.gca().coastlines() plt.gca().coastlines()
# get the current axes' subplot for use later on # get the current axes' subplot for use later on
plt2_ax = plt.gca() plt2_ax = plt.gca()
Expand Down
8 changes: 4 additions & 4 deletions docs/iris/src/userguide/cube_statistics.rst
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ we can pass the coordinate name and the aggregation definition to the
altitude - x x altitude - x x
Scalar coordinates: Scalar coordinates:
forecast_reference_time: 2009-11-19 04:00:00 forecast_reference_time: 2009-11-19 04:00:00
level_height: 696.667 m, bound=(0.0, 1393.33) m level_height: 696.6666 m, bound=(0.0, 1393.3333) m
model_level_number: 10, bound=(1, 19) model_level_number: 10, bound=(1, 19)
sigma: 0.92293, bound=(0.84586, 1.0) sigma: 0.92292976, bound=(0.8458596, 1.0)
Attributes: Attributes:
STASH: m01s00i004 STASH: m01s00i004
source: Data from Met Office Unified Model source: Data from Met Office Unified Model
Expand Down Expand Up @@ -139,8 +139,8 @@ These areas can now be passed to the ``collapsed`` method as weights:
altitude - x altitude - x
Scalar coordinates: Scalar coordinates:
forecast_reference_time: 2009-11-19 04:00:00 forecast_reference_time: 2009-11-19 04:00:00
grid_latitude: 1.51455 degrees, bound=(0.1443, 2.8848) degrees grid_latitude: 1.5145501 degrees, bound=(0.14430022, 2.8848) degrees
grid_longitude: 358.749 degrees, bound=(357.494, 360.005) degrees grid_longitude: 358.74948 degrees, bound=(357.494, 360.00497) degrees
surface_altitude: 399.625 m, bound=(-14.0, 813.25) m surface_altitude: 399.625 m, bound=(-14.0, 813.25) m
Attributes: Attributes:
STASH: m01s00i004 STASH: m01s00i004
Expand Down
10 changes: 5 additions & 5 deletions docs/iris/src/userguide/interpolation_and_regridding.rst
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ This cube has a "hybrid-height" vertical coordinate system, meaning that the ver
coordinate is unevenly spaced in altitude: coordinate is unevenly spaced in altitude:


>>> print(column.coord('altitude').points) >>> print(column.coord('altitude').points)
[ 418.69836426 434.57049561 456.79278564 485.3664856 520.29327393 [ 418.69836 434.5705 456.7928 485.3665 520.2933 561.5752
561.57519531 609.21447754 663.21411133 723.57696533 790.30664062 609.2145 663.2141 723.57697 790.30664 863.4072 942.8823
863.40722656 942.88232422 1028.73706055 1120.97644043 1219.60510254] 1028.737 1120.9764 1219.6051 ]


We could regularise the vertical coordinate by defining 10 equally spaced altitude We could regularise the vertical coordinate by defining 10 equally spaced altitude
sample points between 400 and 1250 and interpolating our vertical coordinate onto sample points between 400 and 1250 and interpolating our vertical coordinate onto
Expand Down Expand Up @@ -177,8 +177,8 @@ For example, to mask values that lie beyond the range of the original data:
>>> scheme = iris.analysis.Linear(extrapolation_mode='mask') >>> scheme = iris.analysis.Linear(extrapolation_mode='mask')
>>> new_column = column.interpolate(sample_points, scheme) >>> new_column = column.interpolate(sample_points, scheme)
>>> print(new_column.coord('altitude').points) >>> print(new_column.coord('altitude').points)
[ nan 494.44451904 588.88891602 683.33325195 777.77783203 [ nan 494.44452 588.8889 683.33325 777.77783 872.2222
872.222229 966.66674805 1061.11108398 1155.55541992 nan] 966.66675 1061.1111 1155.5554 nan]




.. _caching_an_interpolator: .. _caching_an_interpolator:
Expand Down
4 changes: 2 additions & 2 deletions docs/iris/src/userguide/subsetting_a_cube.rst
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ same way as loading with constraints:
Scalar coordinates: Scalar coordinates:
forecast_period: 6.0 hours forecast_period: 6.0 hours
forecast_reference_time: 2009-11-19 04:00:00 forecast_reference_time: 2009-11-19 04:00:00
level_height: 395.0 m, bound=(360.0, 433.333) m level_height: 395.0 m, bound=(360.0, 433.3332) m
model_level_number: 10 model_level_number: 10
sigma: 0.954993, bound=(0.958939, 0.95068) sigma: 0.9549927, bound=(0.9589389, 0.95068014)
time: 2009-11-19 10:00:00 time: 2009-11-19 10:00:00
Attributes: Attributes:
STASH: m01s00i004 STASH: m01s00i004
Expand Down
2 changes: 1 addition & 1 deletion docs/iris/src/whitepapers/um_files_loading.rst
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ For example:
>>> # Show grid details and first 5 longitude values. >>> # Show grid details and first 5 longitude values.
>>> print(' '.join(str(_) for _ in (field.lbcode, field.lbnpt, field.bzx, >>> print(' '.join(str(_) for _ in (field.lbcode, field.lbnpt, field.bzx,
... field.bdx))) ... field.bdx)))
1 96 -3.75 3.75 1 96 -3.749999 3.749999
>>> print(field.bzx + field.bdx * np.arange(1, 6)) >>> print(field.bzx + field.bdx * np.arange(1, 6))
[ 0. 3.75 7.5 11.25 15. ] [ 0. 3.75 7.5 11.25 15. ]
>>> >>>
Expand Down
Empty file modified lib/iris/cube.py
Whitespace-only changes.
2 changes: 1 addition & 1 deletion lib/iris/experimental/regrid.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def _weighted_mean_with_mdtol(data, weights, axis=None, mdtol=0):
weights_sum = weights.sum(axis=axis) weights_sum = weights.sum(axis=axis)
frac_masked = 1 - np.true_divide(unmasked_weights_sum, weights_sum) frac_masked = 1 - np.true_divide(unmasked_weights_sum, weights_sum)
mask_pt = frac_masked > mdtol mask_pt = frac_masked > mdtol
if np.any(mask_pt): if np.any(mask_pt) and not isinstance(res, ma.core.MaskedConstant):
Copy link
Member Author

@bjlittle bjlittle May 22, 2018

Choose a reason for hiding this comment

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

A slight behaviour change between numpy versions 1.13.3 and 1.14.3 - you can no longer change the mask of a MaskedConstant. This makes total sense, and numpy have quite rightly made this stricter.

Our test was abusing this convenience prior to 1.14.3...

>>> import numpy as np
>>> np.__version__
'1.14.3'
>>> import numpy.ma as ma
>>> a = ma.array([1.0], mask=True)
>>> m = a[0]
>>> type(m)
<class 'numpy.ma.core.MaskedConstant'>
>>> m.mask |= True
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: output array is read-only

as opposed to

>>> import numpy as np
>>> np.__version__
'1.13.3'
>>> import numpy.ma as ma
>>> a = ma.array([1.0], mask=True)
>>> m = a[0]
>>> type(m)
<class 'numpy.ma.core.MaskedConstant'>
>>> m.mask |= True
>>> m
masked
>>> m.mask |= False
>>> m
masked

if np.isscalar(res): if np.isscalar(res):
res = ma.masked res = ma.masked
elif ma.isMaskedArray(res): elif ma.isMaskedArray(res):
Expand Down
12 changes: 9 additions & 3 deletions lib/iris/plot.py
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) British Crown Copyright 2010 - 2017, Met Office # (C) British Crown Copyright 2010 - 2018, Met Office
# #
# This file is part of Iris. # This file is part of Iris.
# #
Expand Down Expand Up @@ -34,10 +34,10 @@
import matplotlib.axes import matplotlib.axes
import matplotlib.collections as mpl_collections import matplotlib.collections as mpl_collections
import matplotlib.dates as mpl_dates import matplotlib.dates as mpl_dates
import matplotlib.transforms as mpl_transforms
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from matplotlib.offsetbox import AnchoredText
import matplotlib.ticker as mpl_ticker import matplotlib.ticker as mpl_ticker
from mpl_toolkits.axes_grid.anchored_artists import AnchoredText import matplotlib.transforms as mpl_transforms
import netcdftime import netcdftime
import numpy as np import numpy as np
import numpy.ma as ma import numpy.ma as ma
Expand Down Expand Up @@ -343,6 +343,12 @@ def _draw_2d_from_points(draw_method_name, arg_func, cube, *args, **kwargs):
data = cube.data data = cube.data
if plot_defn.transpose: if plot_defn.transpose:
data = data.T data = data.T
# Also transpose the scatter marker color array,
# as now mpl 2.x does not do this for free.
if draw_method_name == 'scatter' and 'c' in kwargs:
c = kwargs['c']
if hasattr(c, 'T') and cube.data.shape == c.shape:
kwargs['c'] = c.T


# Obtain U and V coordinates # Obtain U and V coordinates
v_coord, u_coord = plot_defn.coords v_coord, u_coord = plot_defn.coords
Expand Down
7 changes: 5 additions & 2 deletions lib/iris/tests/__init__.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
import matplotlib import matplotlib
matplotlib.use('agg') matplotlib.use('agg')
matplotlib.rcdefaults() matplotlib.rcdefaults()
# Standardise the figure size across matplotlib versions.
# This permits matplotlib png image comparison.
matplotlib.rcParams['figure.figsize'] = [8.0, 6.0]
import matplotlib.testing.compare as mcompare import matplotlib.testing.compare as mcompare
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
except ImportError: except ImportError:
Expand Down Expand Up @@ -835,7 +838,7 @@ def _create_missing():
'for test {}.') 'for test {}.')
msg = msg.format(phash, distances, unique_id) msg = msg.format(phash, distances, unique_id)
if _DISPLAY_FIGURES: if _DISPLAY_FIGURES:
emsg = 'Image comparion would have failed: {}' emsg = 'Image comparison would have failed: {}'
print(emsg.format(msg)) print(emsg.format(msg))
else: else:
emsg = 'Image comparison failed: {}' emsg = 'Image comparison failed: {}'
Expand Down Expand Up @@ -1174,7 +1177,7 @@ class MyPlotTests(test.GraphicsTest):




skip_sample_data = unittest.skipIf(not SAMPLE_DATA_AVAILABLE, skip_sample_data = unittest.skipIf(not SAMPLE_DATA_AVAILABLE,
('Test(s) require "iris_sample_data", ' ('Test(s) require "iris-sample-data", '
Copy link
Member

Choose a reason for hiding this comment

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

🤣

'which is not available.')) 'which is not available.'))




Expand Down
29 changes: 15 additions & 14 deletions lib/iris/tests/idiff.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -35,23 +35,24 @@
import sys import sys
import warnings import warnings


from PIL import Image
import filelock
import imagehash
import matplotlib.pyplot as plt
import matplotlib.image as mimg
import matplotlib.testing.compare as mcompare
from matplotlib.testing.exceptions import ImageComparisonFailure
import matplotlib.widgets as mwidget
import numpy as np
import requests

# Force iris.tests to use the ```tkagg``` backend by using the '-d' # Force iris.tests to use the ```tkagg``` backend by using the '-d'
# command-line argument as idiff is an interactive tool that requires a # command-line argument as idiff is an interactive tool that requires a
# gui interface. # gui interface.
sys.argv.append('-d') sys.argv.append('-d')
import iris.tests import iris.tests # noqa
import iris.util as iutil
from PIL import Image # noqa
import filelock # noqa
import imagehash # noqa
import matplotlib.pyplot as plt # noqa
import matplotlib.image as mimg # noqa
import matplotlib.testing.compare as mcompare # noqa
from matplotlib.testing.exceptions import ImageComparisonFailure # noqa
import matplotlib.widgets as mwidget # noqa
import numpy as np # noqa
import requests # noqa

import iris.util as iutil # noqa




_POSTFIX_DIFF = '-failed-diff.png' _POSTFIX_DIFF = '-failed-diff.png'
Expand Down Expand Up @@ -246,7 +247,7 @@ def step_over_diffs(result_dir, action, display=True):
if isinstance(e, ValueError) or \ if isinstance(e, ValueError) or \
isinstance(e, ImageComparisonFailure): isinstance(e, ImageComparisonFailure):
print('Could not compare {}: {}'.format(result_fname, print('Could not compare {}: {}'.format(result_fname,
e.message)) e))
continue continue
else: else:
# Propagate the exception, keeping the stack trace # Propagate the exception, keeping the stack trace
Expand Down
Whitespace-only changes.
Loading