Bug#945346: python-skbio ftbfs in unstable

2019-11-30 Thread Andreas Tille
Control: tags -1 help
Control: tags -1 upstream
Control: forwarded -1 https://github.com/biocore/scikit-bio/issues/1681



Bug#945346: python-skbio ftbfs in unstable

2019-11-23 Thread Matthias Klose
Package: src:python-skbio
Version: 0.5.5-2
Severity: serious
Tags: sid bullseye
User: debian-pyt...@lists.debian.org
Usertags: python3.8

python-skbio ftbfs in unstable, two failing tests:

==
ERROR: test_munging_invalid_type_to_self_type
(skbio.sequence.tests.test_sequence.TestDistance)
--
Traceback (most recent call last):
  File
"/<>/.pybuild/cpython3_3.8_skbio/build/skbio/sequence/tests/test_sequence.py",
line 2369, in test_munging_invalid_type_to_self_type
Sequence("ACGT").distance(42)
  File
"/<>/.pybuild/cpython3_3.8_skbio/build/skbio/sequence/_sequence.py",
line 1539, in distance
other = self._munge_to_self_type(other, 'distance')
  File
"/<>/.pybuild/cpython3_3.8_skbio/build/skbio/sequence/_sequence.py",
line 2161, in _munge_to_self_type
return self.__class__(other)
  File
"/<>/.pybuild/cpython3_3.8_skbio/build/skbio/sequence/_sequence.py",
line 622, in __init__
s = np.frombuffer(sequence, dtype=np.uint8)
TypeError: a bytes-like object is required, not 'int'

==
ERROR: test_init_invalid_sequence 
(skbio.sequence.tests.test_sequence.TestSequence)
--
Traceback (most recent call last):
  File
"/<>/.pybuild/cpython3_3.8_skbio/build/skbio/sequence/tests/test_sequence.py",
line 465, in test_init_invalid_sequence
Sequence(('a', 'b', 'c'))
  File
"/<>/.pybuild/cpython3_3.8_skbio/build/skbio/sequence/_sequence.py",
line 622, in __init__
s = np.frombuffer(sequence, dtype=np.uint8)
TypeError: a bytes-like object is required, not 'tuple'

==
FAIL: test_no_variation_pearson 
(skbio.stats.distance.tests.test_mantel.MantelTests)
--
Traceback (most recent call last):
  File
"/<>/.pybuild/cpython3_3.8_skbio/build/skbio/stats/distance/tests/test_mantel.py",
line 250, in test_no_variation_pearson
npt.assert_equal(obs, (0.0, 1.0, 3))
  File "/usr/lib/python3/dist-packages/numpy/testing/_private/utils.py", line
355, in assert_equal
assert_equal(actual[k], desired[k], 'item=%r\n%s' % (k, err_msg), verbose)
  File "/usr/lib/python3/dist-packages/numpy/testing/_private/utils.py", line
427, in assert_equal
raise AssertionError(msg)
AssertionError:
Items are not equal:
item=0

 ACTUAL: nan
 DESIRED: 0.0

==
FAIL: test_one_sided_less (skbio.stats.distance.tests.test_mantel.MantelTests)
--
Traceback (most recent call last):
  File
"/<>/.pybuild/cpython3_3.8_skbio/build/skbio/stats/distance/tests/test_mantel.py",
line 189, in test_one_sided_less
self.assertEqual(obs, (1, 1, 3))
AssertionError: Tuples differ: (0.9998, 1.0, 3) != (1, 1, 3)

First differing element 0:
0.9998
1

- (0.9998, 1.0, 3)
+ (1, 1, 3)

==
FAIL: Test against a reference implementation from R's ape package
--
Traceback (most recent call last):
  File
"/<>/.pybuild/cpython3_3.8_skbio/build/skbio/stats/ordination/tests/test_principal_coordinate_analysis.py",
line 250, in test_pcoa_biplot_from_ape
assert_ordination_results_equal(obs, exp, ignore_directionality=True,
  File
"/<>/.pybuild/cpython3_3.8_skbio/build/skbio/util/_testing.py",
line 126, in assert_ordination_results_equal
_assert_frame_equal(left.features, right.features,
  File
"/<>/.pybuild/cpython3_3.8_skbio/build/skbio/util/_testing.py",
line 171, in _assert_frame_equal
npt.assert_almost_equal(left_values, right_values, decimal=decimal)
  File "/usr/lib/python3/dist-packages/numpy/testing/_private/utils.py", line
584, in assert_almost_equal
return assert_array_almost_equal(actual, desired, decimal, err_msg)
  File "/usr/lib/python3/dist-packages/numpy/testing/_private/utils.py", line
1027, in assert_array_almost_equal
assert_array_compare(compare, x, y, err_msg=err_msg, verbose=verbose,
  File "/usr/lib/python3/dist-packages/numpy/testing/_private/utils.py", line
769, in assert_array_compare
flagged = func_assert_same_pos(x, y, func=isnan, hasval='nan')
  File "/usr/lib/python3/dist-packages/numpy/testing/_private/utils.py", line
745, in func_assert_same_pos
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 7 decimals

x and y nan location mismatch:
 x: array([[-2.5170346e-02, -3.8742000e-02,  3.7030794e-02, -1.8248587e-02,
-1.2974103e-03,  8.1410679e-04, -1.7370121e-02,  3.6121106e-02,
   nan],...
 y: array([[-2.5170346e-02, -3.8742000e-02,  3.7030794e-02, -1.8248587e-02,