radio-astro-tools / radio-beam

A simple toolkit for reading and manipulating beams from astrophysical radio spectral data cubes.
https://radio-beam.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
26 stars 21 forks source link

Unit tests failed with Astropy v6.1.4 #129

Closed Hellseher closed 1 month ago

Hellseher commented 1 month ago

While monthly refresh packages in Guix index, I've faced with an issue: after astropy has been upgraded the dependencies chain failed as well, wich started on radio-beam.

python-radio-beam -> <...> -> python-stdatamodels

==================================== ERRORS ====================================
_______________ ERROR collecting radio_beam/tests/test_beams.py ________________
radio_beam/tests/test_beams.py:508: in <module>
    @pytest.mark.parametrize(("beams", "target_beam"), casa_commonbeam_suite())
radio_beam/tests/test_beams.py:479: in casa_commonbeam_suite
    Beam(major=4 * u.arcsec, minor=4 * u.arcsec,
radio_beam/beam.py:87: in __new__
    if u.deg.is_equivalent(pa):
/gnu/store/0phcr24wkzxd9b5l0zg62m2fwpx1i849-python-astropy-6.1.4/lib/python3.10/site-packages/astropy/units/core.py:1013: in is_equivalent
    return self._is_equivalent(other, equivalencies)
/gnu/store/0phcr24wkzxd9b5l0zg62m2fwpx1i849-python-astropy-6.1.4/lib/python3.10/site-packages/astropy/units/core.py:1024: in _is_equivalent
    if self._get_physical_type_id() == other._get_physical_type_id():
/gnu/store/0phcr24wkzxd9b5l0zg62m2fwpx1i849-python-astropy-6.1.4/lib/python3.10/site-packages/astropy/units/core.py:695: in _get_physical_type_id
    unit = self.decompose()
/gnu/store/0phcr24wkzxd9b5l0zg62m2fwpx1i849-python-astropy-6.1.4/lib/python3.10/site-packages/astropy/units/core.py:2485: in decompose
    x = CompositeUnit(
/gnu/store/0phcr24wkzxd9b5l0zg62m2fwpx1i849-python-astropy-6.1.4/lib/python3.10/site-packages/astropy/units/core.py:2358: in __init__
    raise UnitScaleError("cannot create a unit with a scale of 0.")
E   astropy.units.core.UnitScaleError: cannot create a unit with a scale of 0.
_______________ ERROR collecting radio_beam/tests/test_beams.py ________________
radio_beam/tests/test_beams.py:508: in <module>
    @pytest.mark.parametrize(("beams", "target_beam"), casa_commonbeam_suite())
radio_beam/tests/test_beams.py:479: in casa_commonbeam_suite
    Beam(major=4 * u.arcsec, minor=4 * u.arcsec,
radio_beam/beam.py:87: in __new__
    if u.deg.is_equivalent(pa):
/gnu/store/0phcr24wkzxd9b5l0zg62m2fwpx1i849-python-astropy-6.1.4/lib/python3.10/site-packages/astropy/units/core.py:1013: in is_equivalent
    return self._is_equivalent(other, equivalencies)
/gnu/store/0phcr24wkzxd9b5l0zg62m2fwpx1i849-python-astropy-6.1.4/lib/python3.10/site-packages/astropy/units/core.py:1024: in _is_equivalent
    if self._get_physical_type_id() == other._get_physical_type_id():
/gnu/store/0phcr24wkzxd9b5l0zg62m2fwpx1i849-python-astropy-6.1.4/lib/python3.10/site-packages/astropy/units/core.py:695: in _get_physical_type_id
    unit = self.decompose()
/gnu/store/0phcr24wkzxd9b5l0zg62m2fwpx1i849-python-astropy-6.1.4/lib/python3.10/site-packages/astropy/units/core.py:2485: in decompose
    x = CompositeUnit(
/gnu/store/0phcr24wkzxd9b5l0zg62m2fwpx1i849-python-astropy-6.1.4/lib/python3.10/site-packages/astropy/units/core.py:2358: in __init__
    raise UnitScaleError("cannot create a unit with a scale of 0.")
E   astropy.units.core.UnitScaleError: cannot create a unit with a scale of 0.
=============================== warnings summary ===============================
radio_beam/multiple_beams.py:345
  /tmp/guix-build-python-radio-beam-0.3.7.drv-0/radio-beam-0.3.7/radio_beam/multiple_beams.py:345: DeprecationWarning: invalid escape sequence '\e'
    '''

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
ERROR radio_beam/tests/test_beams.py - astropy.units.core.UnitScaleError: can...
ERROR radio_beam/tests/test_beams.py - astropy.units.core.UnitScaleError: can...
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
========================= 1 warning, 2 errors in 1.23s =========================

Inputs:

It looks like the fix is in review process

will it be released in this month?

Thanks, Oleg

e-koch commented 1 month ago

@Hellseher Just released v0.3.8. Let us know if there's further issues!