FTBFS due to legacy resampler code (and a buggy test (and a new xarray version))

Bug #2044216 reported by Aaron Rainbolt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
satpy (Ubuntu)
Fix Released
High
Aaron Rainbolt

Bug Description

Legacy resampler code in the satpy package is causing an FTBFS due to a failed `_fornav` import.

```
dh_auto_test -O--buildsystem=pybuild
I: pybuild base:310: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_satpy/build; python3.12 -m pytest -k " not test_retrieve and not test_offline_retrieve and not test_retrieve_all and not test_download_script and not test_start_time and not test_end_time and not test_mimic_TPW2_nc and not TestAngleGeneration and not test_get_luts and not test_convert_remote_files_to_fsspec_fsfile and not test_convert_remote_files_to_fsspec_filename_dict and not test_convert_remote_files_to_fsspec_mixed_sources and not test_get_satpos_from_satname and not test_distributed and not test_rayleigh_corrector and not test_rayleigh_with_angles and not test_float_write_with_unit_conversion and not test_aggregate and not test_median and not test_no_downloads_in_tests and not test_colorize_with_interpolation and not test_colorize" --ignore=satpy/tests/reader_tests/test_insat3d_img_l1b_h5.py --ignore=satpy/tests/reader_tests/gms/test_gms5_vissr_l1b.py --ignore=satpy/tests/reader_tests/gms/test_gms5_vissr_navigation.py satpy/tests
ImportError while loading conftest '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_satpy/build/satpy/conftest.py'.
satpy/__init__.py:29: in <module>
    from satpy.dataset import DataID, DataQuery # noqa
satpy/dataset/__init__.py:23: in <module>
    from .metadata import combine_metadata # noqa
satpy/dataset/metadata.py:27: in <module>
    from satpy.writers.utils import flatten_dict
satpy/writers/__init__.py:37: in <module>
    from satpy.resample import get_area_def
satpy/resample.py:156: in <module>
    from pyresample.ewa import fornav, ll2cr
/usr/lib/python3/dist-packages/pyresample/ewa/__init__.py:69: in <module>
    from .ewa import fornav, ll2cr # noqa
/usr/lib/python3/dist-packages/pyresample/ewa/ewa.py:24: in <module>
    from pyresample.ewa import _fornav, _ll2cr
E ImportError: cannot import name '_fornav' from partially initialized module 'pyresample.ewa' (most likely due to a circular import) (/usr/lib/python3/dist-packages/pyresample/ewa/__init__.py)
E: pybuild pybuild:395: test: plugin pyproject failed with: exit code=4: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_satpy/build; python3.12 -m pytest -k " not test_retrieve and not test_offline_retrieve and not test_retrieve_all and not test_download_script and not test_start_time and not test_end_time and not test_mimic_TPW2_nc and not TestAngleGeneration and not test_get_luts and not test_convert_remote_files_to_fsspec_fsfile and not test_convert_remote_files_to_fsspec_filename_dict and not test_convert_remote_files_to_fsspec_mixed_sources and not test_get_satpos_from_satname and not test_distributed and not test_rayleigh_corrector and not test_rayleigh_with_angles and not test_float_write_with_unit_conversion and not test_aggregate and not test_median and not test_no_downloads_in_tests and not test_colorize_with_interpolation and not test_colorize" --ignore=satpy/tests/reader_tests/test_insat3d_img_l1b_h5.py --ignore=satpy/tests/reader_tests/gms/test_gms5_vissr_l1b.py --ignore=satpy/tests/reader_tests/gms/test_gms5_vissr_navigation.py satpy/tests
```

Upstream commit https://github.com/pytroll/satpy/commit/dc3ee7d30151584caaae05e6fb21401702614cfd corrects the issue. A patch is attached to fix the issue.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

FTBFS fix

Revision history for this message
Simon Quigley (tsimonq2) wrote :

Uploaded, thanks!

Changed in satpy (Ubuntu):
status: New → Fix Committed
importance: Undecided → Wishlist
assignee: nobody → Aaron Rainbolt (arraybolt3)
importance: Wishlist → High
summary: - FTBFS due to legacy resampler code
+ FTBFS due to legacy resampler code (and a buggy test (and a new xarray
+ version))
Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Turns out the first fix wasn't the whole story, and two more fixes were needed to fix the FTBFS fully. Merge patch (with explanations in patch headers) attached.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package satpy - 0.44.0-1ubuntu2

---------------
satpy (0.44.0-1ubuntu2) noble; urgency=medium

  * More FTBFS fixes. (LP: #2044216)
    - Modified satpy/tests/scene_tests/test_resampling.py to use
      assert_called_once rather than called_once.
    - Bumped an xarray version check in satpy/tests/writer_tests/test_cf.py to
      keep the tests from trying to use features that don't yet exist in
      python3-xarray.

 -- Aaron Rainbolt <email address hidden> Wed, 22 Nov 2023 16:25:49 -0600

Changed in satpy (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.