Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## v0.13.4 - 14 July 2026

- 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

- Enable Pandas v3.
Expand Down
34 changes: 18 additions & 16 deletions tests/unit/test_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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(
[
Expand Down
2 changes: 1 addition & 1 deletion wombat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
from wombat.core.library import create_library_structure, load_yaml


__version__ = "0.13.3"
__version__ = "0.13.4"
Loading