diff --git a/README.md b/README.md index c886fba47db2cb3afe03a0746459ae8ecb041424..110fb7a28c084afe357bda1952f7eaa7588f1153 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,7 @@ tox -e debug tests.requests.test_prometheus ## Release notes +- 0.18.9 - Fix handling of closing streams on HDF5 files - 0.18.8 - Migrate case insensitive dict from station control - 0.18.7 - Add support for various ZeroMQ package receivers - 0.18.6 - Compatability with new black versions diff --git a/VERSION b/VERSION index 0f2596acd87483a7374c252cc9ff57e0a58b92ba..cc7b205a893a20a8cd35838153284f59771c4dea 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.18.8 +0.18.9 diff --git a/lofar_station_client/statistics/reader/entry.py b/lofar_station_client/statistics/reader/entry.py index 2ecc10e5649b21413aaedb06dd84bee7ef479e4f..f819d48897a4fd1d8083fcb1d45f349d092b4aea 100644 --- a/lofar_station_client/statistics/reader/entry.py +++ b/lofar_station_client/statistics/reader/entry.py @@ -1,4 +1,4 @@ -# Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy) +# Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy) # SPDX-License-Identifier: Apache-2.0 @@ -108,6 +108,7 @@ class StatisticsParser: logger.debug("Parsing hdf5 statistics file") with hdf5_file as statistic_data: + hdf5_file.load(statistic_data) if self.file_header is None: self.file_header = statistic_data elif not StatisticsFileHeader.__eq__(self.file_header, statistic_data): diff --git a/tests/statistics/test_writer.py b/tests/statistics/test_writer.py index eff047ebe452b5ff77731efd5bfb51086b51751d..60d1d2de0d7c0234e2c13f676424d459f30471f0 100644 --- a/tests/statistics/test_writer.py +++ b/tests/statistics/test_writer.py @@ -1,16 +1,19 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 +# Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy) +# SPDX-License-Identifier: Apache-2.0 +import sys from os.path import dirname, isfile from tempfile import TemporaryDirectory +from typing import Tuple from unittest import mock from unittest.mock import patch -from typing import Tuple -import sys + import h5py import numpy +from lofar_station_client import __version__ as lsc_version from lofar_station_client.dts.constants import N_pol +from lofar_station_client.statistics.reader import entry as reader_entry from lofar_station_client.statistics.statistics_data import ( StatisticsData, StatisticsFileHeader, @@ -20,8 +23,7 @@ from lofar_station_client.statistics.writer import ( hdf5, __version__ as writer_version, ) -from lofar_station_client import __version__ as lsc_version -from lofar_station_client.statistics.reader import entry as reader_entry +from tests import base from tests.test_devices import ( FakeAntennaFieldDeviceProxy, FakeOffAntennaFieldDeviceProxy, @@ -31,7 +33,6 @@ from tests.test_devices import ( FakeSDPFirmwareDeviceProxy, FakeStationManagerDeviceProxy, ) -from tests import base class TestStatisticsReaderWriter(base.TestCase):