Antonio Valentino pushed to branch upstream at Debian GIS Project / satpy
Commits: a2a46001 by Antonio Valentino at 2024-10-26T10:17:39+00:00 New upstream version 0.52.1 - - - - - 5 changed files: - .git_archival.txt - CHANGELOG.md - satpy/readers/eum_l2_grib.py - satpy/tests/enhancement_tests/test_enhancements.py - satpy/tests/reader_tests/test_eum_l2_grib.py Changes: ===================================== .git_archival.txt ===================================== @@ -1,4 +1,4 @@ -node: d6d4406dae1d9d85077ac2fa8788407f5fbdcb9e -node-date: 2024-10-18T13:42:03+02:00 -describe-name: v0.52.0 -ref-names: HEAD -> main, tag: v0.52.0 +node: 6814f7531746651537797f6c5dd9315c5d55e0fe +node-date: 2024-10-23T12:46:22+02:00 +describe-name: v0.52.1 +ref-names: tag: v0.52.1 ===================================== CHANGELOG.md ===================================== @@ -1,3 +1,21 @@ +## Version 0.52.1 (2024/10/23) + +### Issues Closed + +* [Issue 2942](https://github.com/pytroll/satpy/issues/2942) - 0.52.0 breaks `seviri_l2_grib`-reader with 'EUML2GribFileHandler' object has no attribute '_ssp_lon' ([PR 2943](https://github.com/pytroll/satpy/pull/2943) by [@strandgren](https://github.com/strandgren)) + +In this release 1 issue was closed. + +### Pull Requests Merged + +#### Bugs fixed + +* [PR 2944](https://github.com/pytroll/satpy/pull/2944) - Fix tests using `palettize` +* [PR 2943](https://github.com/pytroll/satpy/pull/2943) - Fix seviri_l2_grib end_time property bug. ([2942](https://github.com/pytroll/satpy/issues/2942)) + +In this release 2 pull requests were closed. + + ## Version 0.52.0 (2024/10/18) ### Issues Closed ===================================== satpy/readers/eum_l2_grib.py ===================================== @@ -78,8 +78,12 @@ class EUML2GribFileHandler(BaseFileHandler): def end_time(self): """Return the sensing end time.""" if self.sensor == "seviri": - delta = SEVIRI_REPEAT_CYCLE_DURATION_RSS if self._ssp_lon == 9.5 else SEVIRI_REPEAT_CYCLE_DURATION - return self.start_time + dt.timedelta(minutes=delta) + try: + delta = SEVIRI_REPEAT_CYCLE_DURATION_RSS if self._ssp_lon == 9.5 else SEVIRI_REPEAT_CYCLE_DURATION + return self.start_time + dt.timedelta(minutes=delta) + except AttributeError: + # If dataset and metadata (ssp_lon) have not yet been loaded, return None + return None elif self.sensor == "fci": return self.filename_info["end_time"] ===================================== satpy/tests/enhancement_tests/test_enhancements.py ===================================== @@ -44,6 +44,12 @@ def run_and_check_enhancement(func, data, expected, **kwargs): old_keys = set(pre_attrs.keys()) # It is OK to have "enhancement_history" added new_keys = set(img.data.attrs.keys()) - {"enhancement_history"} + # In case of palettes are used, _FillValue is added. + # Colorize doesn't add the fill value, so ignore that + if "palettes" in kwargs and func.__name__ != "colorize": + assert "_FillValue" in new_keys + # Remove it from further comparisons + new_keys = new_keys - {"_FillValue"} assert old_keys == new_keys res_data_arr = img.data ===================================== satpy/tests/reader_tests/test_eum_l2_grib.py ===================================== @@ -133,12 +133,16 @@ def test_seviri_data_reading(da_, xr_, setup_reader): dataset_id = make_dataid(name="dummmy", resolution=3000) + # Check that end_time is None for SEVIRI before the dataset has been loaded + assert reader.end_time is None + common_checks(ec_, reader, mock_file, dataset_id) - # Check end_time + # Check that end_time is now a valid datetime.datetime object after the dataset has been loaded assert reader.end_time == datetime.datetime(year=2020, month=10, day=20, hour=19, minute=50, second=0) + # Checks the correct execution of the _get_global_attributes and _get_metadata_from_msg functions attributes = reader._get_attributes() expected_attributes = { @@ -234,12 +238,12 @@ def test_fci_data_reading(da_, xr_, setup_reader): dataset_id = make_dataid(name="dummmy", resolution=2000) - common_checks(ec_, reader, mock_file, dataset_id) - # Check end_time assert reader.end_time == datetime.datetime(year=2020, month=10, day=20, hour=19, minute=50, second=0) + common_checks(ec_, reader, mock_file, dataset_id) + # Checks the correct execution of the _get_global_attributes and _get_metadata_from_msg functions attributes = reader._get_attributes() expected_attributes = { View it on GitLab: https://salsa.debian.org/debian-gis-team/satpy/-/commit/a2a460016d7b3935c8c3d1e77bd325693ed1ee31 -- View it on GitLab: https://salsa.debian.org/debian-gis-team/satpy/-/commit/a2a460016d7b3935c8c3d1e77bd325693ed1ee31 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ Pkg-grass-devel mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-grass-devel
