Skip to content

Commit

Permalink
fix eval test
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Dec 12, 2023
1 parent 3bdfb29 commit 38daaad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions quartz_solar_forecast/eval/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@ def run_forecast(pv_df: pd.DataFrame, nwp_df: pd.DataFrame, nwp_source="ICON") -
ts = pv_df["timestamp"][i]

# format
nwp_site_df["step"] = nwp_site_df["time"] - ts
for c in ["timestamp", "latitude", "longitude", "pv_id"]:
if c in nwp_site_df.columns:
nwp_site_df = nwp_site_df.drop(columns=c)

nwp_site_df.set_index("step", inplace=True, drop=True)
nwp_site_df.set_index("time", inplace=True, drop=True)

if isinstance(ts, str):
ts = datetime.fromisoformat(ts)
Expand Down
5 changes: 1 addition & 4 deletions tests/eval/test_pv.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ def test_get_pv_metadata():
[
{
"timestamp": pd.Timestamp("2021-01-26 01:15:00"),
"latitude": 51.5,
"longitude": 0.0,
"pv_id": 8215,
}
]
)

metadata_df = get_pv_metadata(test_set_df)
assert "latitude" in metadata_df.columns


def test_get_pv():
Expand All @@ -23,8 +22,6 @@ def test_get_pv():
[
{
"timestamp": pd.Timestamp("2021-01-26 01:15:00"),
"latitude": 51.5,
"longitude": 0.0,
"pv_id": 8215,
}
]
Expand Down

0 comments on commit 38daaad

Please sign in to comment.