ANTsX / ANTsPy

A fast medical imaging analysis library in Python with algorithms for registration, segmentation, and more.
https://antspyx.readthedocs.io
Apache License 2.0
638 stars 162 forks source link

No module named 'ants.lib.addNoiseToImage' in python 3.9 on MacOS latest #430

Closed Remi-Gau closed 1 year ago

Remi-Gau commented 1 year ago

Describe the bug

The module 'ants.lib.addNoiseToImage' cannot be found in python 3.9 on MacOS latest in github CI.

This does not affect other OS I tested (ubuntu latest) and it seems that this module is found with MacOS latest for python 3.8 and 3.10.

Context

See this workflow error: https://github.com/cpp-lln-lab/bidsMReye/actions/runs/4171866669/jobs/7222509601#step:5:114

This seems to be due to a recent change as this workflow passed last week with wheel:

antspyx-0.3.5-cp39-cp39-macosx_10_15_x86_64.whl

https://github.com/cpp-lln-lab/bidsMReye/actions/runs/4108813040/jobs/7089935062

cookpa commented 1 year ago

The cp39 wheel seems OK on Mac OS 12.6.3 using the latest artifact from the build_wheels action

https://github.com/ANTsX/ANTsPy/actions/runs/4164594139

I did

% conda create -n antspycp39 python=3.9
% conda activate antspycp39 
% pip install antspyx-0.3.7-cp39-cp39-macosx_10_9_x86_64.whl

Then this works

>>> import ants
>>> import numpy as np
>>> image = ants.image_read(ants.get_ants_data('r16'))
>>> image_n4 = ants.n4_bias_field_correction(image)
>>> noise_image = ants.add_noise_to_image(image, 'additivegaussian', (0.0, 1.0))
>>> 

On PyPI, it looks like the wheel antspyx-0.3.7-cp39-cp39-macosx_11_0_x86_64.whl is broken (look at the size)

image

https://pypi.org/project/antspyx/0.3.7/#modal-close

cookpa commented 1 year ago

@stnava what's the current workflow to update PyPI? Is it through cirrus now?

stnava commented 1 year ago

I should delete the "broken" one - that slipped in accidentally.

the wheels are from the GitHub artifacts generated by cirrus. but I generate the sdist and other package metadata locally before uploading to pypi.

it's all painful b/c we are constantly running out of space (on pypi) as we build for more platforms and add functionality.

cookpa commented 1 year ago

OK got it, thanks. Have you tried asking for more space? It says in their help they can sometimes accomodate larger projects

https://pypi.org/help/#project-size-limit

stnava commented 1 year ago

Yes, we have been granted extra space two times

On Tue, Feb 14, 2023 at 4:31 PM Philip Cook @.***> wrote:

OK got it, thanks. Have you tried asking for more space? It says in their help they can sometimes accomodate larger projects

https://pypi.org/help/#project-size-limit

— Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTsPy/issues/430#issuecomment-1430405040, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPE7UXZAW4SG56O6IHXYLWXP2SJANCNFSM6AAAAAAU3JF3OA . You are receiving this because you were mentioned.Message ID: @.***>

--

brian