sunpy / ndcube

A base package for multi-dimensional contiguous and non-contiguous coordinate-aware arrays.
http://docs.sunpy.org/projects/ndcube/
BSD 2-Clause "Simplified" License
44 stars 48 forks source link

[2.2.2] test_resampled_wcs.py::test_2d fails with Astropy 6.1.3 #758

Closed olebole closed 1 month ago

olebole commented 2 months ago

Describe the bug

When running with the recently released Astropy 6.1.3 on Debian unstable, I see the following failure:

_______________________ test_2d[celestial_2d_ape14_wcs] ________________________

celestial_wcs = <astropy.wcs.wcsapi.conftest.Celestial2DLowLevelWCS object at 0x7f313011b8c0>

    @pytest.mark.parametrize('celestial_wcs',
                             ['celestial_2d_ape14_wcs', 'celestial_2d_fitswcs'],
                             indirect=True)
    def test_2d(celestial_wcs):
[...]    
        celestial = wcs_hl.pixel_to_world(*pixel_array)
        assert isinstance(celestial, SkyCoord)
        assert_quantity_allclose(celestial.ra, world_array[0] * u.deg)
        assert_quantity_allclose(celestial.dec, world_array[1] * u.deg)

        EXPECTED_2D_REPR = EXPECTED_2D_REPR_NUMPY2 if np.__version__ >= '2.0.0' else EXPECTED_2D_REPR_NUMPY1
>       assert str(wcs) == EXPECTED_2D_REPR
E       AssertionError: assert 'ResampledLow...  1  yes  yes' == 'ResampledLow...  1  yes  yes'
E         
E         Skipping 112 identical leading characters in diff, use -v to show
E         - order): (2.3333333333333335, 15.0)
E         + order): (2, 15)
E           
E           Pixel Dim  Axis Name  Data size  Bounds
E                   0  None              15  (-2.5, 12.5)...
E         
E         ...Full output truncated (12 lines hidden), use '-vv' to show

../../../ndcube/wcs/wrappers/tests/test_resampled_wcs.py:119: AssertionError

This happens for both celestial_wcs parameters. Full test log

This is a regression by the Astropy update; with Astropy 6.1.2 the tests pass.

To Reproduce

No response

Screenshots

No response

System Details

I tested ndcube 2.2.0 from Debian testing; however this also when I try to update the package to 2.2.2.

Installation method

Linux package manager

Cadair commented 1 month ago

Thanks @olebole I think this will be fixed in the shortly-to-be-release 2.2.3 and has been fixed on main for a bit.