Skip to content

Commit

Permalink
adding test for forecast_no_ts
Browse files Browse the repository at this point in the history
  • Loading branch information
armenbod committed Feb 18, 2024
1 parent 4475822 commit 5765b6b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/test_forecast_no_ts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import pandas as pd
from quartz_solar_forecast.forecast import run_forecast
from quartz_solar_forecast.pydantic_models import PVSite


def test_run_forecast_no_ts():
# make input data
site = PVSite(latitude=51.75, longitude=-1.25, capacity_kwp=1.25)

current_ts = pd.Timestamp.now().round("15min")

# run model with no ts
predications_df = run_forecast(site=site)

# check current ts agrees with dataset
assert predications_df.index.min() == current_ts

print(predications_df)
print(f"Current time: {current_ts}")
print(f"Max: {predications_df['power_wh'].max()}")

0 comments on commit 5765b6b

Please sign in to comment.