weaverba137 / pydl

Library of IDL astronomy routines converted to Python.
BSD 3-Clause "New" or "Revised" License
28 stars 16 forks source link

[1.0.0rc2] CI failure with astropy-6.0: test_munu_to_radec fails with ConvertError #75

Closed olebole closed 9 months ago

olebole commented 9 months ago

When running the CI tests with Astropy-6.0, I get the following failure:

______________________________ test_munu_to_radec ______________________________

    def test_munu_to_radec():
        munu = SDSSMuNu(mu=0.0*u.deg, nu=0.0*u.deg, stripe=10)
>       radec = munu.transform_to(ICRS)

/usr/lib/python3/dist-packages/pydl/pydlutils/tests/test_coord.py:17: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <SDSSMuNu Coordinate (stripe=10, node=95.0 deg): (mu, nu) in deg
    (0., 0.)>
new_frame = <class 'astropy.coordinates.builtin_frames.icrs.ICRS'>

    def transform_to(self, new_frame):
        """…"""
        from .errors import ConvertError

        if self._data is None:
            raise ValueError("Cannot transform a frame with no data")

        if (
            getattr(self.data, "differentials", None)
            and hasattr(self, "obstime")
            and hasattr(new_frame, "obstime")
            and np.any(self.obstime != new_frame.obstime)
        ):
            raise NotImplementedError(
                "You cannot transform a frame that has velocities to another frame at a"
                " different obstime. If you think this should (or should not) be"
                " possible, please comment at"
                " https://github.com/astropy/astropy/issues/6280"
            )

        if hasattr(new_frame, "_sky_coord_frame"):
            # Input new_frame is not a frame instance or class and is most
            # likely a SkyCoord object.
            new_frame = new_frame._sky_coord_frame

        trans = frame_transform_graph.get_transform(self.__class__, new_frame.__class__)
        if trans is None:
            if new_frame is self.__class__:
                # no special transform needed, but should update frame info
                return new_frame.realize_frame(self.data)
            msg = "Cannot transform from {0} to {1}"
>           raise ConvertError(msg.format(self.__class__, new_frame.__class__))
E           astropy.coordinates.errors.ConvertError: Cannot transform from <class 'pydl.pydlutils.coord.SDSSMuNu'> to <class 'abc.ABCMeta'>

/usr/lib/python3/dist-packages/astropy/coordinates/baseframe.py:1272: ConvertError

This is a regression; it did not happen with astropy-5.3.2. Fuill test log here.

weaverba137 commented 9 months ago

@olebole, I can't reproduce this on main or with tag 1.0.0. Here is a very recent test with a very similar configuration that does not show this error. If you can confirm this soon, that's great, but if I don't hear from you, I will assume this is already fixed.

olebole commented 9 months ago

I can confirm that it works with tag 1.0.0; I didn't find this tag before. Thank you for the information!

weaverba137 commented 9 months ago

That's great! The tag didn't get created until today because of holidays. I will add 1.0.0 to PyPI very soon.