reproject icon indicating copy to clipboard operation
reproject copied to clipboard

Testing errors in test_reproject_parallel_broadcasting with reproject 1.5.0 and python 3.14/numpy 2.3.2

Open sergiopasra opened this issue 3 months ago • 2 comments

Hello, I'm seeing some errors in pytest when building reproject 1.5.0 inside the Fedora build system.

The errors appear due to a missing string: 'Broadcasting is being used' Could if be due to a change in numpy?

============================= test session starts ==============================
platform linux -- Python 3.14.0rc2, pytest-8.3.5, pluggy-1.6.0

Running tests with reproject version 0.15.0.
Running tests in reproject.

Date: 2025-09-09T10:23:08

Platform: Linux-6.15.9-101.fc41.x86_64-x86_64-with-glibc2.42.9000

Executable: /usr/bin/python3

Full Python Version: 
3.14.0rc2 (main, Aug 14 2025, 00:00:00) [GCC 15.2.1 20250808 (Red Hat 15.2.1-1)]

encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15

Package versions: 
Numpy: 2.3.2
Scipy: 1.15.3
Astropy: 7.1.0
astropy-healpix: 1.1.2
Cython: 3.1.3

Using Astropy options: remote_data: none.

=================================== FAILURES ===================================
__________________ test_reproject_parallel_broadcasting[None] __________________

caplog = <_pytest.logging.LogCaptureFixture object at 0x7fea71172120>
dask_method = None

    def test_reproject_parallel_broadcasting(caplog, dask_method):
    
        # Unit test for reprojecting using parallelization along broadcasted
        # dimensions
    
        array_in = np.ones((350, 250, 150))
        wcs_in = WCS(naxis=2)
        wcs_out = WCS(naxis=2)
    
        # By default if we give a block size that is only in the WCS dimensions,
        # the data has a single chunk in the broadcasted dimensions
    
        array1 = reproject_interp(
            (array_in, wcs_in),
            wcs_out,
            shape_out=(300, 300),
            parallel=1,
            return_footprint=False,
            block_size=(100, 100),
            return_type="dask",
            dask_method=dask_method,
        )
    
        assert array1.chunksize == (350, 100, 100)
    
>       assert "Broadcasting is being used" in caplog.text
E       AssertionError: assert 'Broadcasting is being used' in ''
E        +  where '' = <_pytest.logging.LogCaptureFixture object at 0x7fea71172120>.text

reproject/interpolation/tests/test_core.py:1024: AssertionError
_________________ test_reproject_parallel_broadcasting[memmap] _________________

caplog = <_pytest.logging.LogCaptureFixture object at 0x7fea64fb4f50>
dask_method = 'memmap'

    def test_reproject_parallel_broadcasting(caplog, dask_method):
    
        # Unit test for reprojecting using parallelization along broadcasted
        # dimensions
    
        array_in = np.ones((350, 250, 150))
        wcs_in = WCS(naxis=2)
        wcs_out = WCS(naxis=2)
    
        # By default if we give a block size that is only in the WCS dimensions,
        # the data has a single chunk in the broadcasted dimensions
    
        array1 = reproject_interp(
            (array_in, wcs_in),
            wcs_out,
            shape_out=(300, 300),
            parallel=1,
            return_footprint=False,
            block_size=(100, 100),
            return_type="dask",
            dask_method=dask_method,
        )
    
        assert array1.chunksize == (350, 100, 100)
    
>       assert "Broadcasting is being used" in caplog.text
E       AssertionError: assert 'Broadcasting is being used' in ''
E        +  where '' = <_pytest.logging.LogCaptureFixture object at 0x7fea64fb4f50>.text

reproject/interpolation/tests/test_core.py:1024: AssertionError
__________________ test_reproject_parallel_broadcasting[none] __________________

caplog = <_pytest.logging.LogCaptureFixture object at 0x7fea64fb5a90>
dask_method = 'none'

    def test_reproject_parallel_broadcasting(caplog, dask_method):
    
        # Unit test for reprojecting using parallelization along broadcasted
        # dimensions
    
        array_in = np.ones((350, 250, 150))
        wcs_in = WCS(naxis=2)
        wcs_out = WCS(naxis=2)
    
        # By default if we give a block size that is only in the WCS dimensions,
        # the data has a single chunk in the broadcasted dimensions
    
        array1 = reproject_interp(
            (array_in, wcs_in),
            wcs_out,
            shape_out=(300, 300),
            parallel=1,
            return_footprint=False,
            block_size=(100, 100),
            return_type="dask",
            dask_method=dask_method,
        )
    
        assert array1.chunksize == (350, 100, 100)
    
>       assert "Broadcasting is being used" in caplog.text
E       AssertionError: assert 'Broadcasting is being used' in ''
E        +  where '' = <_pytest.logging.LogCaptureFixture object at 0x7fea64fb5a90>.text

reproject/interpolation/tests/test_core.py:1024: AssertionError
=========================== short test summary info ============================

sergiopasra avatar Sep 09 '25 09:09 sergiopasra

Testing with python 3.13 shows no errors, so perhaps its a python 3.14 issue

sergiopasra avatar Sep 10 '25 09:09 sergiopasra

Ok thanks, that's helpful! I think step 1 will be to add Python 3.14 to the CI here. I will see if I can do that this week at some point.

astrofrog avatar Sep 10 '25 10:09 astrofrog