From 644f068a1b1ec8bc9b59229ba5717d899049ea49 Mon Sep 17 00:00:00 2001 From: samukweku Date: Tue, 1 Nov 2022 22:17:02 +0000 Subject: [PATCH 1/5] add fix for GH#1184 --- tests/timeseries/test_fill_missing_timestamps.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/timeseries/test_fill_missing_timestamps.py b/tests/timeseries/test_fill_missing_timestamps.py index f07186e2d..ad735e9b4 100644 --- a/tests/timeseries/test_fill_missing_timestamps.py +++ b/tests/timeseries/test_fill_missing_timestamps.py @@ -26,7 +26,16 @@ def test_fill_missing_timestamps(timeseries_dataframe): df1 = timeseries_dataframe.drop(timeseries_dataframe.index[random_number]) # Fill missing timestamps - result = fill_missing_timestamps(df1, frequency="1H") + # fix for GH#1184 is to use the start and end from + # timeseries_dataframe + # imagine that the last row of df1 is removed, or the first entry + # the length check in the next line will fail + result = fill_missing_timestamps( + df1, + frequency="1H", + first_time_stamp=timeseries_dataframe.index.min(), + last_time_stamp=timeseries_dataframe.index.max(), + ) # Testing if the missing timestamp has been filled assert len(result) == len(timeseries_dataframe) From c0650ebc6b63f71467985604bb6d25ebbe2ec875 Mon Sep 17 00:00:00 2001 From: samukweku Date: Tue, 1 Nov 2022 22:20:41 +0000 Subject: [PATCH 2/5] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7aad45df0..a87394817 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ - [ENH] `select_rows` function added for flexible row selection. Add support for MultiIndex selection via dictionary. Issue #1124 @samukweku - [TST] Compat with macos and window, to fix `FailedHealthCheck` Issue #1181 @Zeroto521 - [INF] Merge two docs CIs (`docs-preview.yml` and `docs.yml`) to one. And add `documentation` pytest mark. PR #1183 @Zeroto521 +- [TST] Fix failing for test/timeseries/test_fill_missing_timestamp. Issue #1184 ## [v0.23.1] - 2022-05-03 From d04f8a5152e40cc5ccf1c64626b71a801ec41bff Mon Sep 17 00:00:00 2001 From: samukweku Date: Tue, 1 Nov 2022 22:21:32 +0000 Subject: [PATCH 3/5] fix grammar --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a87394817..42a50d0ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,7 @@ - [ENH] `select_rows` function added for flexible row selection. Add support for MultiIndex selection via dictionary. Issue #1124 @samukweku - [TST] Compat with macos and window, to fix `FailedHealthCheck` Issue #1181 @Zeroto521 - [INF] Merge two docs CIs (`docs-preview.yml` and `docs.yml`) to one. And add `documentation` pytest mark. PR #1183 @Zeroto521 -- [TST] Fix failing for test/timeseries/test_fill_missing_timestamp. Issue #1184 +- [TST] Fix failure for test/timeseries/test_fill_missing_timestamp. Issue #1184 ## [v0.23.1] - 2022-05-03 From a147340db6d4cb2898cf1afbde8ee5726cc4099f Mon Sep 17 00:00:00 2001 From: samukweku Date: Tue, 1 Nov 2022 22:22:33 +0000 Subject: [PATCH 4/5] clearer comments --- tests/timeseries/test_fill_missing_timestamps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/timeseries/test_fill_missing_timestamps.py b/tests/timeseries/test_fill_missing_timestamps.py index ad735e9b4..c6125b5e6 100644 --- a/tests/timeseries/test_fill_missing_timestamps.py +++ b/tests/timeseries/test_fill_missing_timestamps.py @@ -29,7 +29,7 @@ def test_fill_missing_timestamps(timeseries_dataframe): # fix for GH#1184 is to use the start and end from # timeseries_dataframe # imagine that the last row of df1 is removed, or the first entry - # the length check in the next line will fail + # the length check in the assert line will fail result = fill_missing_timestamps( df1, frequency="1H", From c46d5961670fe6447ce22666c22bc81d483cd84a Mon Sep 17 00:00:00 2001 From: samukweku Date: Wed, 2 Nov 2022 01:58:25 +0000 Subject: [PATCH 5/5] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99c994f14..c4703f09a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ - [TST] Compat with macos and window, to fix `FailedHealthCheck` Issue #1181 @Zeroto521 - [INF] Merge two docs CIs (`docs-preview.yml` and `docs.yml`) to one. And add `documentation` pytest mark. PR #1183 @Zeroto521 - [INF] Merge `codecov.yml` (only works for the dev branch pushing event) into `tests.yml` (only works for PR event). PR #1185 @Zeroto521 -- [TST] Fix failure for test/timeseries/test_fill_missing_timestamp. Issue #1184 +- [TST] Fix failure for test/timeseries/test_fill_missing_timestamp. Issue #1184 @samukweku ## [v0.23.1] - 2022-05-03