[Debian-med-packaging] Bug#944042: Help needed to adapt python-skbio to Python3(?) / Pandas

Andreas Tille andreas at an3as.eu
Thu Nov 14 12:28:10 GMT 2019


Control: tags -1 help
Control: tags -1 upstream
Control: forwarded -1 https://github.com/biocore/scikit-bio/issues/1678

Hi Rebecca,

thanks a lot for working on the Pandas migration.

On Wed, Nov 13, 2019 at 10:19:56PM +0000, Rebecca N. Palmer wrote:
> The ones that are blocking pandas [1] are python-skbio,
> 
> [1] https://qa.debian.org/excuses.php?package=pandas (cnvkit since fixed)

I've checked the issue with some patch from upstream[1] but failed.  I
also tried to build HEAD from upstream which also leaves three remaining
errors which I reported in issue #1678[2]:


======================================================================
ERROR: test_munging_invalid_type_to_self_type (skbio.sequence.tests.test_sequence.TestDistance)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/python-skbio-0.5.5a/.pybuild/cpython3_3.7_skbio/build/skbio/sequence/tests/test_sequence.py", line 2369, in test_munging_invalid_type_to_self_type
    Sequence("ACGT").distance(42)
  File "/build/python-skbio-0.5.5a/.pybuild/cpython3_3.7_skbio/build/skbio/sequence/_sequence.py", line 1539, in distance
    other = self._munge_to_self_type(other, 'distance')
  File "/build/python-skbio-0.5.5a/.pybuild/cpython3_3.7_skbio/build/skbio/sequence/_sequence.py", line 2161, in _munge_to_self_type
    return self.__class__(other)
  File "/build/python-skbio-0.5.5a/.pybuild/cpython3_3.7_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 "/build/python-skbio-0.5.5a/.pybuild/cpython3_3.7_skbio/build/skbio/sequence/tests/test_sequence.py", line 465, in test_init_invalid_sequence
    Sequence(('a', 'b', 'c'))
  File "/build/python-skbio-0.5.5a/.pybuild/cpython3_3.7_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 "/build/python-skbio-0.5.5a/.pybuild/cpython3_3.7_skbio/build/skbio/stats/distance/tests/test_mantel.py", line 247, in test_no_variation_pearson
    npt.assert_equal(obs, (np.nan, np.nan, 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: 0.0
 DESIRED: nan

----------------------------------------------------------------------
Ran 2352 tests in 44.011s

FAILED (SKIP=30, errors=2, failures=1)


I somehow suspect that the two errors above might be caused by a broken
Python3 conversion - any help to fix this would be welcome.

Kind regards

       Andreas.

[1] https://github.com/biocore/scikit-bio/commit/9c061da7e2746aee403b41621f71b118ce5c52f8
[2] https://github.com/biocore/scikit-bio/issues/1678

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list