From 9a05dba22016b89c3b47fdda7200091cf6636f4a Mon Sep 17 00:00:00 2001 From: "Hammond, Rob" <13874373+RHammond2@users.noreply.github.com> Date: Thu, 9 Jul 2026 15:36:04 -0700 Subject: [PATCH 1/8] replace pandas date_range with polars datetime_range for compatible default dt resolution --- tests/unit/test_environment.py | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/tests/unit/test_environment.py b/tests/unit/test_environment.py index 111e9692..3a25bbeb 100644 --- a/tests/unit/test_environment.py +++ b/tests/unit/test_environment.py @@ -6,7 +6,6 @@ from pathlib import Path import numpy as np -import pandas as pd import polars as pl import pytest import numpy.testing as npt @@ -372,11 +371,12 @@ def test_weather_forecast(): # Test for the next 5 hours, but at the top of the hour # Starts with hour 0, and ends with the 5th hour following - correct_index = pl.from_pandas( - pd.date_range( - "1/1/2002 00:00:00", "1/1/2002 04:00:00", freq="1h", name="datetime" - ) - ) + correct_index = pl.datetime_range( + datetime.datetime(2002, 1, 1), + datetime.datetime(2002, 1, 1, 4), + interval="1h", + eager=True, + ).alias("datetime") correct_hour = np.array([0, 1, 2, 3, 4], dtype=float) correct_wind = np.array( [11.75561096, 10.41321252, 8.959270788, 9.10014808, 9.945059601] @@ -395,11 +395,12 @@ def test_weather_forecast(): # Test for 5 hours at an uneven start time increment # Starts at hour 1, and ends with the 5th hour following env.run(until=0.1) - correct_index = pl.from_pandas( - pd.date_range( - "1/1/2002 00:00:00", "1/1/2002 05:00:00", freq="1h", name="datetime" - ) - ) + correct_index = pl.datetime_range( + datetime.datetime(2002, 1, 1), + datetime.datetime(2002, 1, 1, 5), + interval="1h", + eager=True, + ).alias("datetime") correct_hour = np.arange(6, dtype=float) correct_wind = np.array( [11.75561096, 10.41321252, 8.959270788, 9.10014808, 9.945059601, 11.50807971] @@ -418,11 +419,12 @@ def test_weather_forecast(): # Test for 5.5 hours at an uneven start time increment # Starts at hour 1, and ends at the 7th hour following env.run(until=1.2) - correct_index = pl.from_pandas( - pd.date_range( - "1/1/2002 01:00:00", "1/1/2002 07:00:00", freq="1h", name="datetime" - ) - ) + correct_index = pl.datetime_range( + datetime.datetime(2002, 1, 1, 1), + datetime.datetime(2002, 1, 1, 7), + interval="1h", + eager=True, + ).alias("datetime") correct_hour = np.arange(1, 8, dtype=float) correct_wind = np.array( [ From 267d272062e4b7a598967e103c0a416f30904bc3 Mon Sep 17 00:00:00 2001 From: "Hammond, Rob" <13874373+RHammond2@users.noreply.github.com> Date: Thu, 9 Jul 2026 15:37:48 -0700 Subject: [PATCH 2/8] udpate changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21220751..103887cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## v0.13.4 - TBD + +- Replaces the use of `pandas.date_range` with `polars.datetime_range` for changed default time + resolution of us to ns. + ## v0.13.3. - 8 April 2026 - Enable Pandas v3. From 40087f908ea093be602b4ca1cf517a8a53564ad3 Mon Sep 17 00:00:00 2001 From: "Hammond, Rob" <13874373+RHammond2@users.noreply.github.com> Date: Thu, 9 Jul 2026 15:44:32 -0700 Subject: [PATCH 3/8] Revert "udpate changelog" This reverts commit 267d272062e4b7a598967e103c0a416f30904bc3. --- CHANGELOG.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 103887cd..21220751 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,5 @@ # CHANGELOG -## v0.13.4 - TBD - -- Replaces the use of `pandas.date_range` with `polars.datetime_range` for changed default time - resolution of us to ns. - ## v0.13.3. - 8 April 2026 - Enable Pandas v3. From 4072bb993cf6d26166f22a45041bdc17ea8238e8 Mon Sep 17 00:00:00 2001 From: "Hammond, Rob" <13874373+RHammond2@users.noreply.github.com> Date: Thu, 9 Jul 2026 15:44:59 -0700 Subject: [PATCH 4/8] Revert "replace pandas date_range with polars datetime_range for compatible default dt resolution" This reverts commit 9a05dba22016b89c3b47fdda7200091cf6636f4a. --- tests/unit/test_environment.py | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/tests/unit/test_environment.py b/tests/unit/test_environment.py index 3a25bbeb..111e9692 100644 --- a/tests/unit/test_environment.py +++ b/tests/unit/test_environment.py @@ -6,6 +6,7 @@ from pathlib import Path import numpy as np +import pandas as pd import polars as pl import pytest import numpy.testing as npt @@ -371,12 +372,11 @@ def test_weather_forecast(): # Test for the next 5 hours, but at the top of the hour # Starts with hour 0, and ends with the 5th hour following - correct_index = pl.datetime_range( - datetime.datetime(2002, 1, 1), - datetime.datetime(2002, 1, 1, 4), - interval="1h", - eager=True, - ).alias("datetime") + correct_index = pl.from_pandas( + pd.date_range( + "1/1/2002 00:00:00", "1/1/2002 04:00:00", freq="1h", name="datetime" + ) + ) correct_hour = np.array([0, 1, 2, 3, 4], dtype=float) correct_wind = np.array( [11.75561096, 10.41321252, 8.959270788, 9.10014808, 9.945059601] @@ -395,12 +395,11 @@ def test_weather_forecast(): # Test for 5 hours at an uneven start time increment # Starts at hour 1, and ends with the 5th hour following env.run(until=0.1) - correct_index = pl.datetime_range( - datetime.datetime(2002, 1, 1), - datetime.datetime(2002, 1, 1, 5), - interval="1h", - eager=True, - ).alias("datetime") + correct_index = pl.from_pandas( + pd.date_range( + "1/1/2002 00:00:00", "1/1/2002 05:00:00", freq="1h", name="datetime" + ) + ) correct_hour = np.arange(6, dtype=float) correct_wind = np.array( [11.75561096, 10.41321252, 8.959270788, 9.10014808, 9.945059601, 11.50807971] @@ -419,12 +418,11 @@ def test_weather_forecast(): # Test for 5.5 hours at an uneven start time increment # Starts at hour 1, and ends at the 7th hour following env.run(until=1.2) - correct_index = pl.datetime_range( - datetime.datetime(2002, 1, 1, 1), - datetime.datetime(2002, 1, 1, 7), - interval="1h", - eager=True, - ).alias("datetime") + correct_index = pl.from_pandas( + pd.date_range( + "1/1/2002 01:00:00", "1/1/2002 07:00:00", freq="1h", name="datetime" + ) + ) correct_hour = np.arange(1, 8, dtype=float) correct_wind = np.array( [ From 415dfef33fcd91c440f21893dd5d8336d8962baa Mon Sep 17 00:00:00 2001 From: "Hammond, Rob" <13874373+RHammond2@users.noreply.github.com> Date: Thu, 9 Jul 2026 15:37:48 -0700 Subject: [PATCH 5/8] udpate changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21220751..103887cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## v0.13.4 - TBD + +- Replaces the use of `pandas.date_range` with `polars.datetime_range` for changed default time + resolution of us to ns. + ## v0.13.3. - 8 April 2026 - Enable Pandas v3. From 1803eeae5d14e77752b79a39c71add146b67134e Mon Sep 17 00:00:00 2001 From: "Hammond, Rob" <13874373+RHammond2@users.noreply.github.com> Date: Thu, 9 Jul 2026 15:36:04 -0700 Subject: [PATCH 6/8] replace pandas date_range with polars datetime_range for compatible default dt resolution --- tests/unit/test_environment.py | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/tests/unit/test_environment.py b/tests/unit/test_environment.py index 111e9692..3a25bbeb 100644 --- a/tests/unit/test_environment.py +++ b/tests/unit/test_environment.py @@ -6,7 +6,6 @@ from pathlib import Path import numpy as np -import pandas as pd import polars as pl import pytest import numpy.testing as npt @@ -372,11 +371,12 @@ def test_weather_forecast(): # Test for the next 5 hours, but at the top of the hour # Starts with hour 0, and ends with the 5th hour following - correct_index = pl.from_pandas( - pd.date_range( - "1/1/2002 00:00:00", "1/1/2002 04:00:00", freq="1h", name="datetime" - ) - ) + correct_index = pl.datetime_range( + datetime.datetime(2002, 1, 1), + datetime.datetime(2002, 1, 1, 4), + interval="1h", + eager=True, + ).alias("datetime") correct_hour = np.array([0, 1, 2, 3, 4], dtype=float) correct_wind = np.array( [11.75561096, 10.41321252, 8.959270788, 9.10014808, 9.945059601] @@ -395,11 +395,12 @@ def test_weather_forecast(): # Test for 5 hours at an uneven start time increment # Starts at hour 1, and ends with the 5th hour following env.run(until=0.1) - correct_index = pl.from_pandas( - pd.date_range( - "1/1/2002 00:00:00", "1/1/2002 05:00:00", freq="1h", name="datetime" - ) - ) + correct_index = pl.datetime_range( + datetime.datetime(2002, 1, 1), + datetime.datetime(2002, 1, 1, 5), + interval="1h", + eager=True, + ).alias("datetime") correct_hour = np.arange(6, dtype=float) correct_wind = np.array( [11.75561096, 10.41321252, 8.959270788, 9.10014808, 9.945059601, 11.50807971] @@ -418,11 +419,12 @@ def test_weather_forecast(): # Test for 5.5 hours at an uneven start time increment # Starts at hour 1, and ends at the 7th hour following env.run(until=1.2) - correct_index = pl.from_pandas( - pd.date_range( - "1/1/2002 01:00:00", "1/1/2002 07:00:00", freq="1h", name="datetime" - ) - ) + correct_index = pl.datetime_range( + datetime.datetime(2002, 1, 1, 1), + datetime.datetime(2002, 1, 1, 7), + interval="1h", + eager=True, + ).alias("datetime") correct_hour = np.arange(1, 8, dtype=float) correct_wind = np.array( [ From f0f59957be0299fb508863bf1239a43c9e34106f Mon Sep 17 00:00:00 2001 From: "Hammond, Rob" <13874373+RHammond2@users.noreply.github.com> Date: Tue, 14 Jul 2026 10:04:09 -0700 Subject: [PATCH 7/8] update changelog --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 103887cd..139ea5b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ # CHANGELOG -## v0.13.4 - TBD +## v0.13.4 - 14 July 2026 -- Replaces the use of `pandas.date_range` with `polars.datetime_range` for changed default time - resolution of us to ns. +- Replaces the use of `pandas.date_range` with `polars.datetime_range` in + `tests/unit/test_environment.py` to account for Pandas updated default time resolution of us to ns. ## v0.13.3. - 8 April 2026 From 3dfa283636e4ec320cdd156f022a8c2f4d05aef5 Mon Sep 17 00:00:00 2001 From: "Hammond, Rob" <13874373+RHammond2@users.noreply.github.com> Date: Tue, 14 Jul 2026 10:14:57 -0700 Subject: [PATCH 8/8] bump version --- wombat/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wombat/__init__.py b/wombat/__init__.py index e4abecec..45b0969a 100644 --- a/wombat/__init__.py +++ b/wombat/__init__.py @@ -4,4 +4,4 @@ from wombat.core.library import create_library_structure, load_yaml -__version__ = "0.13.3" +__version__ = "0.13.4"