Package: src:specutils
Version: 2.2.0-1
Severity: serious
Tags: ftbfs forky sid

Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202601/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:specutils, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --with python3 --buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
I: pybuild base:384: python3.14 setup.py clean 
/usr/lib/python3/dist-packages/setuptools/dist.py:759: 
SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        
********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX 
license expression:

        License :: OSI Approved :: BSD License

        See 
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license 
for details.
        
********************************************************************************


[... snipped ...]

..........................s.............................................
 [ 49%]
..........................................................ssssssssssssss
 [ 60%]
s.ssssssssssssssssssssssssssssssssssssssssssssssssss
                     [ 67%]
specutils/tests/test_manipulation.py ...        
                         [ 68%]
specutils/tests/test_model_replace.py 
.....                         
     [ 68%]
specutils/tests/test_region_extract.py 
..................
                [ 71%]
specutils/tests/test_regions.py 
................
                         [ 73%]
specutils/tests/test_resample.py 
..............xFF....
                   [ 76%]
specutils/tests/test_slicing.py ....   
                                  [ 77%]
specutils/tests/test_smoothing.py 
........................
               [ 80%]
specutils/tests/test_spectral_axis.py 
s.................................
 [ 85%]
.......................
                                                  [ 89%]
specutils/tests/test_spectral_region.py ..               
                [ 89%]
specutils/tests/test_spectrum1d.py 
.........FF.............s........
     [ 94%]
specutils/tests/test_spectrum1d_unit_pix2.py ..          
                [ 94%]
specutils/tests/test_spectrum_collection.py 
.........
                    [ 95%]
specutils/tests/test_template_comparison.py 
.............
                [ 97%]
specutils/tests/test_unc.py .x.                 
                         [ 97%]
specutils/tests/test_utils.py 
..............
                             [100%]

=================================== FAILURES ===================================
__________ test_resample_different_units[LinearInterpolatedResampler] 
__________

all_resamplers = <class 
'specutils.manipulation.resample.LinearInterpolatedResampler'>

    def 
test_resample_different_units(all_resamplers):
        input_spectrum = Spectrum(spectral_axis=[5000, 
6000, 7000] * u.AA,
                                    flux=[1, 2, 
3] * u.mJy)
        resampler = 
all_resamplers("nan_fill")
        if all_resamplers == 
FluxConservingResampler:
            pytest.xfail('flux conserving resampler cannot 
yet handle differing units')
    
        resamp_grid = [5500, 
6500]*u.nm
        resampled = resampler(input_spectrum, resamp_grid)
        assert np.all(np.isnan(resampled.flux))
    
        resamp_grid = [550, 
650]*u.nm
        resampled = resampler(input_spectrum, resamp_grid)
        assert not 
np.any(np.isnan(resampled.flux))
    
        resamp_grid = [550, 
650]*u.nm
        resampled = resampler(input_spectrum, resamp_grid)
    
        # Test conversion to velocity grid
        rest_wavelength = 656.2 * u.nm
        wavelengths = np.linspace(640, 672, 
10) * u.nm
        flux = np.ones(10) * u.mJy
        spec1d = Spectrum(spectral_axis=wavelengths, 
velocity_convention="optical", 
flux=flux)
        spec1d.spectral_axis.doppler_rest = rest_wavelength
    
        velocities = np.linspace(-1000, 1000, 
5) * u.km/u.s
        velocity_grid = SpectralAxis(velocities, 
doppler_rest=rest_wavelength,
                                     
doppler_convention="optical")
>       velocity_binned = resampler(spec1d, velocity_grid)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

specutils/tests/test_resample.py:230: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
specutils/manipulation/resample.py:36: in __call__
    return self.resample1d(orig_spectrum, 
fin_spec_axis)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
specutils/manipulation/resample.py:385: in resample1d
    return 
Spectrum(spectral_axis=fin_spec_axis,
specutils/spectra/spectrum.py:339: in __init__
    wcs = 
gwcs_from_array(self._spectral_axis,
specutils/utils/wcs_utils.py:295: in gwcs_from_array
    spectral_frame = cf.SpectralFrame(unit=array.unit, 
axes_order=(spectral_axis_index,),
/usr/lib/python3/dist-packages/gwcs/coordinate_frames/_spectral.py:44:
 in __init__
    pht = axis_physical_types or 
self._default_axis_physical_types(unit)
                                 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'SpectralFrame' object has no attribute '_name'") 
raised in repr()] SpectralFrame object at 0x7fc1cc6e1940>
unit = [Unit("km / s")]

    def 
_default_axis_physical_types(self, 
unit):
        if unit[0].physical_type == 
"frequency":
            return 
("em.freq",)
        if unit[0].physical_type == 
"length":
            return 
("em.wl",)
        if unit[0].physical_type == 
"energy":
            return 
("em.energy",)
        if unit[0].physical_type == 
"speed":
>           warnings.warn(
                "Physical type may be ambiguous. Consider 
"
                "setting the physical type explicitly as 
"
                "either 
'spect.dopplerVeloc.optical'
 or "
                
"'spect.dopplerVeloc.radio'."
            )
E           UserWarning: Physical type may be ambiguous. Consider 
setting the physical type explicitly as either 'spect.dopplerVeloc.optical' or 
'spect.dopplerVeloc.radio'.

/usr/lib/python3/dist-packages/gwcs/coordinate_frames/_spectral.py:65:
 UserWarning
__________ test_resample_different_units[SplineInterpolatedResampler] 
__________

all_resamplers = <class 
'specutils.manipulation.resample.SplineInterpolatedResampler'>

    def 
test_resample_different_units(all_resamplers):
        input_spectrum = Spectrum(spectral_axis=[5000, 
6000, 7000] * u.AA,
                                    flux=[1, 2, 
3] * u.mJy)
        resampler = 
all_resamplers("nan_fill")
        if all_resamplers == 
FluxConservingResampler:
            pytest.xfail('flux conserving resampler cannot 
yet handle differing units')
    
        resamp_grid = [5500, 
6500]*u.nm
        resampled = resampler(input_spectrum, resamp_grid)
        assert np.all(np.isnan(resampled.flux))
    
        resamp_grid = [550, 
650]*u.nm
        resampled = resampler(input_spectrum, resamp_grid)
        assert not 
np.any(np.isnan(resampled.flux))
    
        resamp_grid = [550, 
650]*u.nm
        resampled = resampler(input_spectrum, resamp_grid)
    
        # Test conversion to velocity grid
        rest_wavelength = 656.2 * u.nm
        wavelengths = np.linspace(640, 672, 
10) * u.nm
        flux = np.ones(10) * u.mJy
        spec1d = Spectrum(spectral_axis=wavelengths, 
velocity_convention="optical", 
flux=flux)
        spec1d.spectral_axis.doppler_rest = rest_wavelength
    
        velocities = np.linspace(-1000, 1000, 
5) * u.km/u.s
        velocity_grid = SpectralAxis(velocities, 
doppler_rest=rest_wavelength,
                                     
doppler_convention="optical")
>       velocity_binned = resampler(spec1d, velocity_grid)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

specutils/tests/test_resample.py:230: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
specutils/manipulation/resample.py:36: in __call__
    return self.resample1d(orig_spectrum, 
fin_spec_axis)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
specutils/manipulation/resample.py:478: in resample1d
    return 
Spectrum(spectral_axis=fin_spec_axis,
specutils/spectra/spectrum.py:339: in __init__
    wcs = 
gwcs_from_array(self._spectral_axis,
specutils/utils/wcs_utils.py:295: in gwcs_from_array
    spectral_frame = cf.SpectralFrame(unit=array.unit, 
axes_order=(spectral_axis_index,),
/usr/lib/python3/dist-packages/gwcs/coordinate_frames/_spectral.py:44:
 in __init__
    pht = axis_physical_types or 
self._default_axis_physical_types(unit)
                                 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'SpectralFrame' object has no attribute '_name'") 
raised in repr()] SpectralFrame object at 0x7fc1cd2a15c0>
unit = [Unit("km / s")]

    def 
_default_axis_physical_types(self, 
unit):
        if unit[0].physical_type == 
"frequency":
            return 
("em.freq",)
        if unit[0].physical_type == 
"length":
            return 
("em.wl",)
        if unit[0].physical_type == 
"energy":
            return 
("em.energy",)
        if unit[0].physical_type == 
"speed":
>           warnings.warn(
                "Physical type may be ambiguous. Consider 
"
                "setting the physical type explicitly as 
"
                "either 
'spect.dopplerVeloc.optical'
 or "
                
"'spect.dopplerVeloc.radio'."
            )
E           UserWarning: Physical type may be ambiguous. Consider 
setting the physical type explicitly as either 'spect.dopplerVeloc.optical' or 
'spect.dopplerVeloc.radio'.

/usr/lib/python3/dist-packages/gwcs/coordinate_frames/_spectral.py:65:
 UserWarning
________________________ test_spectral_axis_conversions 
________________________

    def 
test_spectral_axis_conversions():
        # By default the spectral axis units should be set to 
angstroms
        spec = Spectrum(flux=np.array([26.0, 
44.5]) * u.Jy,
                          spectral_axis=np.array([400, 
500]) * u.AA)
    
        assert np.all(spec.spectral_axis == 
np.array([400, 500]) * 
u.angstrom)
        assert spec.spectral_axis.unit == 
u.angstrom
    
        flux = np.ones(49) * u.Jy
        spec = Spectrum(spectral_axis=np.arange(flux.size) * u.AA, 
flux=flux)
    
        assert spec.wavelength.unit == u.AA
    
        spec = Spectrum(spectral_axis=np.arange(1, 
50) * u.nm, flux=flux)
    
        assert spec.frequency.unit == u.GHz
    
        with 
pytest.raises(ValueError):
            spec.velocity
    
        spec = Spectrum(spectral_axis=np.arange(100, 
150) * u.nm, flux=flux)
    
>       new_spec = spec.with_spectral_axis_unit(u.km / u.s, 
> rest_value=125 * u.um,
                                                
velocity_convention="relativistic")

specutils/tests/test_spectrum1d.py:186: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
specutils/spectra/spectrum_mixin.py:245: in with_spectral_axis_unit
    return 
self.__class__(flux=self.flux, 
spectral_axis=new_spectral_axis, meta=meta,
specutils/spectra/spectrum.py:339: in __init__
    wcs = 
gwcs_from_array(self._spectral_axis,
specutils/utils/wcs_utils.py:295: in gwcs_from_array
    spectral_frame = cf.SpectralFrame(unit=array.unit, 
axes_order=(spectral_axis_index,),
/usr/lib/python3/dist-packages/gwcs/coordinate_frames/_spectral.py:44:
 in __init__
    pht = axis_physical_types or 
self._default_axis_physical_types(unit)
                                 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'SpectralFrame' object has no attribute '_name'") 
raised in repr()] SpectralFrame object at 0x7fc1cc6b5080>
unit = [Unit("km / s")]

    def 
_default_axis_physical_types(self, 
unit):
        if unit[0].physical_type == 
"frequency":
            return 
("em.freq",)
        if unit[0].physical_type == 
"length":
            return 
("em.wl",)
        if unit[0].physical_type == 
"energy":
            return 
("em.energy",)
        if unit[0].physical_type == 
"speed":
>           warnings.warn(
                "Physical type may be ambiguous. Consider 
"
                "setting the physical type explicitly as 
"
                "either 
'spect.dopplerVeloc.optical'
 or "
                
"'spect.dopplerVeloc.radio'."
            )
E           UserWarning: Physical type may be ambiguous. Consider 
setting the physical type explicitly as either 'spect.dopplerVeloc.optical' or 
'spect.dopplerVeloc.radio'.

/usr/lib/python3/dist-packages/gwcs/coordinate_frames/_spectral.py:65:
 UserWarning
___________________ test_spectral_axis_and_flux_conversions 
____________________

    def 
test_spectral_axis_and_flux_conversions():
        """A little bit from both sets of 
tests."""
        spec = Spectrum(spectral_axis=np.arange(100, 
150) * u.nm,
                          flux=np.ones(49) * 
u.Jy)
    
>       new_spec = spec.with_spectral_axis_and_flux_units(
            u.km / u.s, u.uJy, rest_value=125 * u.um, 
velocity_convention="relativistic")

specutils/tests/test_spectrum1d.py:213: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
specutils/spectra/spectrum_mixin.py:260: in 
with_spectral_axis_and_flux_units
    new_spec = self.with_spectral_axis_unit(
specutils/spectra/spectrum_mixin.py:245: in with_spectral_axis_unit
    return 
self.__class__(flux=self.flux, 
spectral_axis=new_spectral_axis, meta=meta,
specutils/spectra/spectrum.py:339: in __init__
    wcs = 
gwcs_from_array(self._spectral_axis,
specutils/utils/wcs_utils.py:295: in gwcs_from_array
    spectral_frame = cf.SpectralFrame(unit=array.unit, 
axes_order=(spectral_axis_index,),
/usr/lib/python3/dist-packages/gwcs/coordinate_frames/_spectral.py:44:
 in __init__
    pht = axis_physical_types or 
self._default_axis_physical_types(unit)
                                 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'SpectralFrame' object has no attribute '_name'") 
raised in repr()] SpectralFrame object at 0x7fc1cc6772a0>
unit = [Unit("km / s")]

    def 
_default_axis_physical_types(self, 
unit):
        if unit[0].physical_type == 
"frequency":
            return 
("em.freq",)
        if unit[0].physical_type == 
"length":
            return 
("em.wl",)
        if unit[0].physical_type == 
"energy":
            return 
("em.energy",)
        if unit[0].physical_type == 
"speed":
>           warnings.warn(
                "Physical type may be ambiguous. Consider 
"
                "setting the physical type explicitly as 
"
                "either 
'spect.dopplerVeloc.optical'
 or "
                
"'spect.dopplerVeloc.radio'."
            )
E           UserWarning: Physical type may be ambiguous. Consider 
setting the physical type explicitly as either 'spect.dopplerVeloc.optical' or 
'spect.dopplerVeloc.radio'.

/usr/lib/python3/dist-packages/gwcs/coordinate_frames/_spectral.py:65:
 UserWarning
=========================== short test summary info 
============================
FAILED 
specutils/tests/test_resample.py::test_resample_different_units[LinearInterpolatedResampler]
 - UserWarning: Physical type may be ambiguous. Consider setting the physical 
...
FAILED 
specutils/tests/test_resample.py::test_resample_different_units[SplineInterpolatedResampler]
 - UserWarning: Physical type may be ambiguous. Consider setting the physical 
...
FAILED 
specutils/tests/test_spectrum1d.py::test_spectral_axis_conversions - 
UserWarning: Physical type may be ambiguous. Consider setting the physical ...
FAILED 
specutils/tests/test_spectrum1d.py::test_spectral_axis_and_flux_conversions
 - UserWarning: Physical type may be ambiguous. Consider setting the physical 
...
============ 4 failed, 549 passed, 133 
skipped, 9 xfailed in 15.36s ============
E: pybuild pybuild:483: test: plugin distutils failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; python3.13 -m pytest 
--remote-data=none --doctest-rst
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.14 
3.13" returned exit code 13
make: *** [debian/rules:9: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit 
status 2
--------------------------------------------------------------------------------

Reply via email to