sgkit-dev / bio2zarr

Convert bioinformatics file formats to Zarr
Apache License 2.0
26 stars 7 forks source link

Run CI on macos-14 (ARM) #216

Closed jeromekelleher closed 4 months ago

jeromekelleher commented 5 months ago

Basic attempt at #215 to see what breaks

jeromekelleher commented 5 months ago

Hit into immediate problems here with cyvcf2:

==================================== ERRORS ====================================
19
______________________ ERROR collecting tests/test_cli.py ______________________
20
ImportError while importing test module '/Users/runner/work/bio2zarr/bio2zarr/tests/test_cli.py'.
21
Hint: make sure your test modules/packages have valid Python names.
22
Traceback:
23
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py:126: in import_module
24
    return _bootstrap._gcd_import(name[level:], package, level)
25
tests/test_cli.py:9: in <module>
26
    from bio2zarr import __main__ as main
27
bio2zarr/__main__.py:3: in <module>
28
    from . import cli
29
bio2zarr/cli.py:11: in <module>
30
    from . import plink, provenance, vcf2zarr, vcf_utils
31
bio2zarr/vcf2zarr/__init__.py:1: in <module>
32
    from .icf import (
33
bio2zarr/vcf2zarr/icf.py:16: in <module>
34
    from .. import constants, core, provenance, vcf_utils
35
bio2zarr/vcf_utils.py:11: in <module>
36
    import cyvcf2
37
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cyvcf2/__init__.py:1: in <module>
38
    from .cyvcf2 import (VCF, Variant, Writer, r_ as r_unphased, par_relatedness,
39
E   ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cyvcf2/cyvcf2.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_bcf_float_missing'
jeromekelleher commented 5 months ago

@tomwhite - how do you get cyvcf2 running on ARM? Did we get around this by using conda packages on sgkit?

tomwhite commented 5 months ago

There have been macos arm packages for cyvcf2 for a while now (https://github.com/sgkit-dev/sgkit/issues/655#issuecomment-953691531), so installing using pip should work.

Bioconda doesn't have macos arm packages unfortunately (see https://anaconda.org/bioconda/cyvcf2).

(BTW I often use Rosetta to emulate intel to avoid these errors.)

jeromekelleher commented 4 months ago

I've been thrashing around a bit here to see if I can get cyvcf2 working @tomwhite - basically, the binary packages don't seem to work because of the symbol resolution problem, and compiling doesn't seem to be an easy option either.

Any suggestions?

coveralls commented 4 months ago

Coverage Status

coverage: 98.874%. remained the same when pulling f122d3317716df24b98893caede7fa859be030c3 on jeromekelleher:run-on-arm into c2fde100a4649d5a866c0eb0e7c70bc10188838c on sgkit-dev:main.