Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2137443 - python-astropy-healpix fails to build with hypothesis 6.56.3 or even 6.49.1
Summary: python-astropy-healpix fails to build with hypothesis 6.56.3 or even 6.49.1
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-astropy-healpix
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Christian Dersch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F38FTBFS F39FTBFS F40FTBFS 2105617 PYTHON3.12
TreeView+ depends on / blocked
 
Reported: 2022-10-24 23:16 UTC by Miro Hrončok
Modified: 2023-08-21 18:52 UTC (History)
3 users (show)

Fixed In Version: python-astropy-healpix-0.7-4.fc39
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-21 18:52:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2022-10-24 23:16:06 UTC
Description of problem:
In https://src.fedoraproject.org/rpms/python-hypothesis/pull-request/17 I'd like to update hypothesis to 6.56.3. However, python-astropy-healpix fails to build with it. I've also tried updating hypothesis to 6.49.1, but python-astropy-healpix failed there as well.

https://copr.fedorainfracloud.org/coprs/churchyard/hypothesis-6.56.3/package/python-astropy-healpix/
https://copr.fedorainfracloud.org/coprs/churchyard/hypothesis-6.49.1/package/python-astropy-healpix/

_________________________________ test_vec2pix _________________________________

    @given(nside_pow=integers(0, 29), nest=booleans(),
>          x=floats(-1, 1, allow_nan=False, allow_infinity=False).filter(lambda x: abs(x) > 1e-10),
           y=floats(-1, 1, allow_nan=False, allow_infinity=False).filter(lambda y: abs(y) > 1e-10),
           z=floats(-1, 1, allow_nan=False, allow_infinity=False).filter(lambda z: abs(z) > 1e-10))

astropy_healpix/tests/test_healpy.py:116: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

nside_pow = 2, x = 1.0, y = 1.0, z = 0.5, nest = False

    @given(nside_pow=integers(0, 29), nest=booleans(),
           x=floats(-1, 1, allow_nan=False, allow_infinity=False).filter(lambda x: abs(x) > 1e-10),
           y=floats(-1, 1, allow_nan=False, allow_infinity=False).filter(lambda y: abs(y) > 1e-10),
           z=floats(-1, 1, allow_nan=False, allow_infinity=False).filter(lambda z: abs(z) > 1e-10))
    @settings(max_examples=2000, derandomize=True)
    def test_vec2pix(nside_pow, x, y, z, nest):
        nside = 2 ** nside_pow
        ipix1 = hp_compat.vec2pix(nside, x, y, z, nest=nest)
        ipix2 = hp.vec2pix(nside, x, y, z, nest=nest)
>       assert ipix1 == ipix2
E       assert 42 == 58
E       Falsifying example: test_vec2pix(
E           nside_pow=2, nest=False, x=1.0, y=1.0, z=0.5,
E       )

astropy_healpix/tests/test_healpy.py:124: AssertionError
_________________________________ test_vec2ang _________________________________

    @given(vectors=arrays(float, (3,), elements=floats(-1, 1)).filter(not_at_origin),
>          lonlat=booleans(), ndim=integers(0, 4))

astropy_healpix/tests/test_healpy.py:210: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

vectors = array([  0.00000000e+000,   1.11137937e-162,   1.00000000e+000])
lonlat = False, ndim = 0

    @given(vectors=arrays(float, (3,), elements=floats(-1, 1)).filter(not_at_origin),
           lonlat=booleans(), ndim=integers(0, 4))
    @settings(max_examples=500, derandomize=True)
    def test_vec2ang(vectors, lonlat, ndim):
        vectors = np.broadcast_to(vectors, (2,) * ndim + (3,))
        theta1, phi1 = hp_compat.vec2ang(vectors, lonlat=lonlat)
        theta2, phi2 = hp.vec2ang(vectors, lonlat=lonlat)
        # Healpy sometimes returns NaNs for phi (somewhat incorrectly)
        phi2 = np.nan_to_num(phi2)
        assert_allclose(theta1, theta1, atol=1e-10)
>       assert_allclose(phi1, phi2, atol=1e-10)
E       AssertionError: 
E       Not equal to tolerance rtol=1e-07, atol=1e-10
E       
E       Mismatched elements: 1 / 1 (100%)
E       Max absolute difference: 1.5707963267948966
E       Max relative difference: 1.0
E        x: array([ 0.])
E        y: array([ 1.570796])
E       Falsifying example: test_vec2ang(
E           vectors=array([  0.00000000e+000,   1.11137937e-162,   1.00000000e+000]),
E           lonlat=False,
E           ndim=0,
E       )

astropy_healpix/tests/test_healpy.py:219: AssertionError



Version-Release number of selected component: 0.7-1


How reproducible: consistently


Steps to Reproduce:
1. fetch hypothesis update from the PR or one of the coprs linked above
2. build python-astropy-healpix from rawhide dist-git

Actual results: build fails


Expected results: build succeeds


Additional info:
Please let me know if I can ship the update, or if you'd like to deep dive into the failure before I do that.

Comment 1 Miro Hrončok 2022-11-08 14:47:20 UTC
No response, so I'm proceeding with the hypothesis update.

Comment 2 Ben Cotton 2023-02-07 14:57:45 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.

Comment 3 Mamoru TASAKA 2023-04-06 04:58:07 UTC
https://github.com/astropy/astropy-healpix/issues/183
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026012

For now, Debian just disabled failing tests.


Note You need to log in before you can comment on or make changes to this bug.