From 0f5e12c1634db93064274515f48af66b4cf09c3e Mon Sep 17 00:00:00 2001 From: Mathieu Dupont <108517594+mathieudpnt@users.noreply.github.com> Date: Tue, 9 Dec 2025 17:02:09 +0100 Subject: [PATCH 1/2] plot color bug fix --- src/post_processing/dataclass/data_aplose.py | 2 +- src/post_processing/utils/filtering_utils.py | 2 +- src/post_processing/utils/plot_utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/post_processing/dataclass/data_aplose.py b/src/post_processing/dataclass/data_aplose.py index 6f42e72..98e6d9c 100644 --- a/src/post_processing/dataclass/data_aplose.py +++ b/src/post_processing/dataclass/data_aplose.py @@ -460,7 +460,7 @@ def from_yaml( cls, file: Path, *, - concat: bool = False, + concat: bool = True, ) -> DataAplose | list[DataAplose]: """Return a DataAplose object from a yaml file. diff --git a/src/post_processing/utils/filtering_utils.py b/src/post_processing/utils/filtering_utils.py index 5ac7e1f..a656855 100644 --- a/src/post_processing/utils/filtering_utils.py +++ b/src/post_processing/utils/filtering_utils.py @@ -322,7 +322,7 @@ def reshape_timebin( "annotator": [ant] * len(file_vector), "start_datetime": start_datetime, "end_datetime": end_datetime, - "is_box": [0] * len(file_vector), + "type": ["WEAK"] * len(file_vector), }, ), ) diff --git a/src/post_processing/utils/plot_utils.py b/src/post_processing/utils/plot_utils.py index a921270..f21e343 100644 --- a/src/post_processing/utils/plot_utils.py +++ b/src/post_processing/utils/plot_utils.py @@ -121,7 +121,7 @@ def histo( "width": bar_width.total_seconds() / 86400, "align": "edge", "edgecolor": "black", - "color": color, + "color": color[i], "zorder": 2, } if legend_labels: From 6a80e933129821f14b25abd8f7e721c3d79c25e3 Mon Sep 17 00:00:00 2001 From: Mathieu Dupont <108517594+mathieudpnt@users.noreply.github.com> Date: Tue, 9 Dec 2025 17:05:53 +0100 Subject: [PATCH 2/2] fix test --- tests/test_filtering_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_filtering_utils.py b/tests/test_filtering_utils.py index 1a4d175..12eb988 100644 --- a/tests/test_filtering_utils.py +++ b/tests/test_filtering_utils.py @@ -478,7 +478,7 @@ def test_no_timebin_original_timebin(sample_df: DataFrame) -> None: [Timestamp("2025-01-26 06:20:00+00:00")] * 7, "end_datetime": [Timestamp("2025-01-25 06:21:00+00:00")] * 11 + [Timestamp("2025-01-26 06:21:00+00:00")] * 7, - "is_box": [0] * 18, + "type": ["WEAK"] * 18, }, )