Skip to content

Commit

Permalink
fix legacy ecmwf model used
Browse files Browse the repository at this point in the history
  • Loading branch information
dfulu committed Feb 26, 2025
1 parent 7a5aa19 commit f35147b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/test_app_legacy.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Test the app using the legacy dataloader - ocf_datapipes"""

import os
import tempfile

Expand All @@ -12,8 +14,7 @@
from pvnet_app.model_configs.pydantic_models import get_all_models


# Its nice to have this here, so we can run the latest version in production, but still use the old models
# Once we have re trained PVnet summation models we can remove this

def test_app_ecwmf_only(test_t0, db_session, nwp_ecmwf_data, db_url):
"""Test the app for the case running model just on ecmwf"""

Expand Down Expand Up @@ -46,7 +47,7 @@ def test_app_ecwmf_only(test_t0, db_session, nwp_ecmwf_data, db_url):

# Only the models which don't use satellite will be run in this case
# The models below are the only ones which should have been run
all_models = get_all_models(get_ecmwf_only=True)
all_models = get_all_models(get_ecmwf_only=True, use_ocf_data_sampler=False)

# Check correct number of forecasts have been made
# (317 GSPs + 1 National + maybe GSP-sum) = 318 or 319 forecasts
Expand Down Expand Up @@ -78,10 +79,8 @@ def test_app_ecwmf_only(test_t0, db_session, nwp_ecmwf_data, db_url):
assert len(db_session.query(ForecastValueSevenDaysSQL).all()) == expected_forecast_results * 16


# test legacy models
# Its nice to have this here, so we can run the latest version in production, but still use the old models
# Once we have re trained PVnet summation models we can remove this
def test_app_ocf_datapipes(test_t0, db_session, nwp_ukv_data, nwp_ecmwf_data, sat_5_data, db_url):

def test_app(test_t0, db_session, nwp_ukv_data, nwp_ecmwf_data, sat_5_data, db_url):
"""Test the app running the day ahead model"""

with tempfile.TemporaryDirectory() as tmpdirname:
Expand Down

0 comments on commit f35147b

Please sign in to comment.