Bug#743554: python-astropy: FTBFS on all buildds except on amd64 and kfreebsd-amd64
Sebastian Ramacher
sramacher at debian.org
Thu Apr 3 18:58:15 UTC 2014
Source: python-astropy
Version: 0.3.1+dfsg-1
Severity: serious
Justification: fails to build from source
Tags: sid jessie
python-astropy failed to build on all non-amd64 buildds. On 32 bit
architectures it failed with:
| =================================== FAILURES ===================================
| ___________________ TestChecksumFunctions.test_image_create ____________________
|
| self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x59786d2c>
|
| def test_image_create(self):
| n = np.arange(100)
| hdu = fits.PrimaryHDU(n)
| hdu.writeto(self.temp('tmp.fits'), clobber=True, checksum=True)
| with fits.open(self.temp('tmp.fits'), checksum=True) as hdul:
| assert (hdu.data == hdul[0].data).all()
| assert 'CHECKSUM' in hdul[0].header
| assert 'DATASUM' in hdul[0].header
|
| if not sys.platform.startswith('win32'):
| > assert hdul[0].header['CHECKSUM'] == 'ZHMkeGKjZGKjbGKj'
| E assert 'ZHLkeHLjZHLjbHLj' == 'ZHMkeGKjZGKjbGKj'
| E - ZHLkeHLjZHLjbHLj
| E + ZHMkeGKjZGKjbGKj
|
| astropy/io/fits/tests/test_checksum.py:53: AssertionError
| _______________ TestChecksumFunctions.test_nonstandard_checksum ________________
|
| self = <astropy.io.fits.tests.test_checksum.TestChecksumFunctions object at 0x594f02ec>
|
| def test_nonstandard_checksum(self):
| hdu = fits.PrimaryHDU(np.arange(10.0 ** 6))
| hdu.writeto(self.temp('tmp.fits'), clobber=True,
| checksum='nonstandard')
| del hdu
| with fits.open(self.temp('tmp.fits'), checksum='nonstandard') as hdul:
| assert 'CHECKSUM' in hdul[0].header
| assert 'DATASUM' in hdul[0].header
|
| if not sys.platform.startswith('win32'):
| > assert hdul[0].header['CHECKSUM'] == 'jD4Am942jC48j948'
| E assert 'hA49j948hA48h948' == 'jD4Am942jC48j948'
| E - hA49j948hA48h948
| E + jD4Am942jC48j948
|
| astropy/io/fits/tests/test_checksum.py:66: AssertionError
| = 2 failed, 4930 passed, 252 skipped, 10 xfailed, 14 xpassed in 307.72 seconds =
For a fuill build log see
https://buildd.debian.org/status/fetch.php?pkg=python-astropy&arch=i386&ver=0.3.1+dfsg-1&stamp=1396458110
On s390x it failed with:
| =================================== FAILURES ===================================
| ____________________ test_composite_static_matrix_transform ____________________
|
| def test_composite_static_matrix_transform():
| """
| Checks to make sure that CompositeStaticMatrixTransform
| correctly combines multiple transformations
| """
| half_sqrt_two = 0.5*np.sqrt(2)
| forwards_45_mat = np.array([[half_sqrt_two, -1*half_sqrt_two, 0],
| [half_sqrt_two, half_sqrt_two, 0],
| [0, 0, 1]])
| backwards_45_mat = forwards_45_mat.T
| id_mat = np.identity(3)
|
| id_transform = t.CompositeStaticMatrixTransform(ICRS, ICRS,
| [forwards_45_mat,
| backwards_45_mat])
|
| > npt.assert_allclose(id_transform.matrix, id_mat)
|
| astropy/coordinates/tests/test_transformations.py:329:
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
| actual = array([[ 1.00000000e+00, 4.26642159e-17, 0.00000000e+00],
| [ 4.266....00000000e+00],
| [ 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]])
| desired = array([[ 1., 0., 0.],
| [ 0., 1., 0.],
| [ 0., 0., 1.]])
| rtol = 1e-07, atol = 0, err_msg = '', verbose = True
|
| def assert_allclose(actual, desired, rtol=1e-7, atol=0,
| err_msg='', verbose=True):
| """
| Raise an assertion if two objects are not equal up to desired tolerance.
|
| The test is equivalent to ``allclose(actual, desired, rtol, atol)``.
| It compares the difference between `actual` and `desired` to
| ``atol + rtol * abs(desired)``.
|
| .. versionadded:: 1.5.0
|
| Parameters
| ----------
| actual : array_like
| Array obtained.
| desired : array_like
| Array desired.
| rtol : float, optional
| Relative tolerance.
| atol : float, optional
| Absolute tolerance.
| err_msg : str, optional
| The error message to be printed in case of failure.
| verbose : bool, optional
| If True, the conflicting values are appended to the error message.
|
| Raises
| ------
| AssertionError
| If actual and desired are not equal up to specified precision.
|
| See Also
| --------
| assert_array_almost_equal_nulp, assert_array_max_ulp
|
| Examples
| --------
| >>> x = [1e-5, 1e-3, 1e-1]
| >>> y = np.arccos(np.cos(x))
| >>> assert_allclose(x, y, rtol=1e-5, atol=0)
|
| """
| import numpy as np
| def compare(x, y):
| return np.allclose(x, y, rtol=rtol, atol=atol)
|
| actual, desired = np.asanyarray(actual), np.asanyarray(desired)
| header = 'Not equal to tolerance rtol=%g, atol=%g' % (rtol, atol)
| assert_array_compare(compare, actual, desired, err_msg=str(err_msg),
| > verbose=verbose, header=header)
|
| /usr/lib/python2.7/dist-packages/numpy/testing/utils.py:1183:
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
| comparison = <function compare at 0x200059b3c88>
| x = array([[ 1.00000000e+00, 4.26642159e-17, 0.00000000e+00],
| [ 4.266....00000000e+00],
| [ 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]])
| y = array([[ 1., 0., 0.],
| [ 0., 1., 0.],
| [ 0., 0., 1.]])
| err_msg = '', verbose = True
| header = 'Not equal to tolerance rtol=1e-07, atol=0'
|
| def assert_array_compare(comparison, x, y, err_msg='', verbose=True,
| header=''):
| from numpy.core import array, isnan, isinf, any, all, inf
| x = array(x, copy=False, subok=True)
| y = array(y, copy=False, subok=True)
|
| def isnumber(x):
| return x.dtype.char in '?bhilqpBHILQPefdgFDG'
|
| def chk_same_position(x_id, y_id, hasval='nan'):
| """Handling nan/inf: check that x and y have the nan/inf at the same
| locations."""
| try:
| assert_array_equal(x_id, y_id)
| except AssertionError:
| msg = build_err_msg([x, y],
| err_msg + '\nx and y %s location mismatch:' \
| % (hasval), verbose=verbose, header=header,
| names=('x', 'y'))
| raise AssertionError(msg)
|
| try:
| cond = (x.shape==() or y.shape==()) or x.shape == y.shape
| if not cond:
| msg = build_err_msg([x, y],
| err_msg
| + '\n(shapes %s, %s mismatch)' % (x.shape,
| y.shape),
| verbose=verbose, header=header,
| names=('x', 'y'))
| if not cond :
| raise AssertionError(msg)
|
| if isnumber(x) and isnumber(y):
| x_isnan, y_isnan = isnan(x), isnan(y)
| x_isinf, y_isinf = isinf(x), isinf(y)
|
| # Validate that the special values are in the same place
| if any(x_isnan) or any(y_isnan):
| chk_same_position(x_isnan, y_isnan, hasval='nan')
| if any(x_isinf) or any(y_isinf):
| # Check +inf and -inf separately, since they are different
| chk_same_position(x == +inf, y == +inf, hasval='+inf')
| chk_same_position(x == -inf, y == -inf, hasval='-inf')
|
| # Combine all the special values
| x_id, y_id = x_isnan, y_isnan
| x_id |= x_isinf
| y_id |= y_isinf
|
| # Only do the comparison if actual values are left
| if all(x_id):
| return
|
| if any(x_id):
| val = comparison(x[~x_id], y[~y_id])
| else:
| val = comparison(x, y)
| else:
| val = comparison(x, y)
|
| if isinstance(val, bool):
| cond = val
| reduced = [0]
| else:
| reduced = val.ravel()
| cond = reduced.all()
| reduced = reduced.tolist()
| if not cond:
| match = 100-100.0*reduced.count(1)/len(reduced)
| msg = build_err_msg([x, y],
| err_msg
| + '\n(mismatch %s%%)' % (match,),
| verbose=verbose, header=header,
| names=('x', 'y'))
| if not cond :
| > raise AssertionError(msg)
| E AssertionError:
| E Not equal to tolerance rtol=1e-07, atol=0
| E
| E (mismatch 100.0%)
| E x: array([[ 1.00000000e+00, 4.26642159e-17, 0.00000000e+00],
| E [ 4.26642159e-17, 1.00000000e+00, 0.00000000e+00],
| E [ 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]])
| E y: array([[ 1., 0., 0.],
| E [ 0., 1., 0.],
| E [ 0., 0., 1.]])
|
| /usr/lib/python2.7/dist-packages/numpy/testing/utils.py:644: AssertionError
| = 1 failed, 4931 passed, 252 skipped, 19 xfailed, 5 xpassed in 213.22 seconds ==
For the full build log see
https://buildd.debian.org/status/fetch.php?pkg=python-astropy&arch=s390x&ver=0.3.1+dfsg-1&stamp=1396457594
On powerpc it failed with both errors.
Regards
--
Sebastian Ramacher
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20140403/da94bce3/attachment-0001.sig>
More information about the debian-science-maintainers
mailing list