diff --git a/india_forecast_app/adjuster.py b/india_forecast_app/adjuster.py index dda7939..983958a 100644 --- a/india_forecast_app/adjuster.py +++ b/india_forecast_app/adjuster.py @@ -140,7 +140,7 @@ def get_me_values( return me_df -def zero_out_nighttime( +def zero_out_night_time_for_pv( db_session, forecast_values_df: pd.DataFrame, site_uuid: str, @@ -153,6 +153,7 @@ def zero_out_nighttime( db_session: sqlalchemy session forecast_values_df: forecast values dataframe site_uuid: the site uuid + elevation_limit: the elevation limit to zero out values, this defaults to 0. """ # get the site site = get_site_by_uuid(db_session, site_uuid) @@ -246,7 +247,7 @@ def adjust_forecast_with_adjuster( forecast_values_df_adjust.drop(columns=["me_kw"], inplace=True) # make sure there are no positive values at nighttime - forecast_values_df_adjust = zero_out_nighttime( + forecast_values_df_adjust = zero_out_night_time_for_pv( db_session=db_session, forecast_values_df=forecast_values_df_adjust, site_uuid=forecast_meta["site_uuid"], diff --git a/tests/test_adjuster.py b/tests/test_adjuster.py index 23608e8..761e731 100644 --- a/tests/test_adjuster.py +++ b/tests/test_adjuster.py @@ -7,7 +7,7 @@ from india_forecast_app.adjuster import ( adjust_forecast_with_adjuster, get_me_values, - zero_out_nighttime, + zero_out_night_time_for_pv, ) @@ -112,7 +112,7 @@ def test_adjust_forecast_with_adjuster_no_values(db_session, sites): @pytest.mark.parametrize("asset_type", ["pv", "wind"]) -def test_zero_out_nighttime(asset_type, db_session, sites): +def test_zero_out_night_time_for_pv(asset_type, db_session, sites): """ Test for zero_out_nighttime """ forecast_values_df = pd.DataFrame( { @@ -126,7 +126,7 @@ def test_zero_out_nighttime(asset_type, db_session, sites): sites[0].asset_type = asset_type - forecast_values_df = zero_out_nighttime( + forecast_values_df = zero_out_night_time_for_pv( db_session, forecast_values_df=forecast_values_df, site_uuid=sites[0].site_uuid )