From 810ed7a066ce1461f5824fb2cec4a0eca9cfcfe7 Mon Sep 17 00:00:00 2001 From: Sukhil Patel Date: Tue, 26 Nov 2024 12:59:25 +0000 Subject: [PATCH] Add new mo model version --- india_forecast_app/models/all_models.yaml | 6 ++++++ tests/models/test_pydantic_models.py | 2 +- tests/test_app.py | 10 +++++----- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/india_forecast_app/models/all_models.yaml b/india_forecast_app/models/all_models.yaml index 52e67fe..e1ce259 100644 --- a/india_forecast_app/models/all_models.yaml +++ b/india_forecast_app/models/all_models.yaml @@ -19,6 +19,12 @@ models: version: 165267d34500cf0c881ed70d9318421f4e0d10f1 client: ruvnl asset_type: wind + - name: windnet_india_mo_v3 + type: pvnet + id: openclimatefix/windnet_india + version: 990bed9ad1dbb10515f830c181609b10e72c975e + client: ruvnl + asset_type: wind # RU client solar - name: pvnet_india type: pvnet diff --git a/tests/models/test_pydantic_models.py b/tests/models/test_pydantic_models.py index df530f1..cfdcd0a 100644 --- a/tests/models/test_pydantic_models.py +++ b/tests/models/test_pydantic_models.py @@ -5,7 +5,7 @@ def test_get_all_models(): """Test for getting all models""" models = get_all_models() - assert len(models.models) == 6 + assert len(models.models) == 7 def test_get_all_models_client(): diff --git a/tests/test_app.py b/tests/test_app.py index cfa69f4..a03ff51 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -161,9 +161,9 @@ def test_app( assert result.exit_code == 0 if write_to_db: - assert db_session.query(ForecastSQL).count() == init_n_forecasts + 4 * 2 - assert db_session.query(ForecastValueSQL).count() == init_n_forecast_values + (4 * 2 * 192) - assert db_session.query(MLModelSQL).count() == 4 * 2 + assert db_session.query(ForecastSQL).count() == init_n_forecasts + 5 * 2 + assert db_session.query(ForecastValueSQL).count() == init_n_forecast_values + (5 * 2 * 192) + assert db_session.query(MLModelSQL).count() == 5 * 2 else: assert db_session.query(ForecastSQL).count() == init_n_forecasts assert db_session.query(ForecastValueSQL).count() == init_n_forecast_values @@ -183,8 +183,8 @@ def test_app_no_pv_data( result = run_click_script(app, args) assert result.exit_code == 0 - assert db_session.query(ForecastSQL).count() == init_n_forecasts + 2 * 4 - assert db_session.query(ForecastValueSQL).count() == init_n_forecast_values + (2 * 4 * 192) + assert db_session.query(ForecastSQL).count() == init_n_forecasts + 2 * 5 + assert db_session.query(ForecastValueSQL).count() == init_n_forecast_values + (2 * 5 * 192) @pytest.mark.requires_hf_token