arvkevi / ezancestry

Easy genetic ancestry predictions in Python
https://ezancestry.streamlit.app
MIT License
56 stars 11 forks source link

Test failures with Python 3.10 #60

Closed apriha closed 4 months ago

apriha commented 2 years ago

snps cron test jobs with ezancestry recently started failing on Github Actions Python 3.10 setups:

Last working build (06/18/2022): https://github.com/apriha/snps/actions/runs/2522809062 First broken build (06/25/2022): https://github.com/apriha/snps/actions/runs/2563003443

Here is an example of the error:

 =================================== FAILURES ===================================
 ____________________________ TestSnps.test_ancestry ____________________________
 __init__.pxd:942: in numpy.import_array
     ???
 E   RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf

 During handling of the above exception, another exception occurred:
 tests/test_snps.py:486: in test_ancestry
     self._make_ancestry_assertions(s.predict_ancestry())
 /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/snps/snps.py:1683: in predict_ancestry
     from ezancestry.commands import predict
 /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/ezancestry/commands.py:10: in <module>
     from sklearn.model_selection import train_test_split
 /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/sklearn/__init__.py:82: in <module>
     from .base import clone
 /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/sklearn/base.py:17: in <module>
     from .utils import _IS_32BIT
 /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/sklearn/utils/__init__.py:22: in <module>
     from .murmurhash import murmurhash3_32
 sklearn/utils/murmurhash.pyx:27: in init sklearn.utils.murmurhash
     ???
 __init__.pxd:944: in numpy.import_array
     ???
 E   ImportError: numpy.core.multiarray failed to import

I tried fixing this build by installing different combinations of dependencies (new versions of numpy and pandas were released on 06/22/2022 and 06/23/2022, respectively), but no luck yet.

apriha commented 4 months ago

Resolved by https://github.com/apriha/snps/pull/171