Skip to content

Commit

Permalink
update forecast test with no ts spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
zakwatts committed Jan 24, 2025
1 parent df662f3 commit 6786a4c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/unit/test_forecast_no_ts.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ def test_run_forecast_no_ts():
current_ts = pd.Timestamp.now()

# run gradient boosting model with no ts
predications_df = run_forecast(site=site, model="gb")
predictions_df = run_forecast(site=site, model="gb")
# check current ts agrees with dataset
assert predications_df.index.min() >= current_ts - pd.Timedelta(hours=1)
assert predictions_df.index.min() >= current_ts - pd.Timedelta(hours=1)

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

# run xgb model with no ts
predications_df = run_forecast(site=site, model="xgb")
predictions_df = run_forecast(site=site, model="xgb")
# check current ts agrees with dataset
assert predications_df.index.min() >= current_ts - pd.Timedelta(hours=1)
assert predictions_df.index.min() >= current_ts - pd.Timedelta(hours=1)

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

0 comments on commit 6786a4c

Please sign in to comment.