Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Nov 29, 2024
1 parent 29ab920 commit c35cd71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions india_forecast_app/adjuster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down Expand Up @@ -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"],
Expand Down
6 changes: 3 additions & 3 deletions tests/test_adjuster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)


Expand Down Expand Up @@ -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(
{
Expand All @@ -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
)

Expand Down

0 comments on commit c35cd71

Please sign in to comment.