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 f32e1c1 commit b967d3a
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions india_forecast_app/adjuster.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,12 @@ def get_me_values(
return me_df


def zero_out_nighttime(db_session, forecast_values_df: pd.DataFrame, site_uuid: str, elevation_limit:Optional[float]= 0):
def zero_out_nighttime(

Check failure on line 143 in india_forecast_app/adjuster.py

View workflow job for this annotation

GitHub Actions / lint_and_test / Lint the code and run the tests

Ruff (D417)

india_forecast_app/adjuster.py:143:5: D417 Missing argument description in the docstring for `zero_out_nighttime`: `elevation_limit`
db_session,
forecast_values_df: pd.DataFrame,
site_uuid: str,
elevation_limit: Optional[float] = 0,
):
"""
Zero out nighttime values in forecast
Expand Down Expand Up @@ -169,12 +174,13 @@ def zero_out_nighttime(db_session, forecast_values_df: pd.DataFrame, site_uuid:
forecast_values_df = forecast_values_df.merge(elevation, on="start_utc", how="left")

# zero out nighttime values
forecast_values_df.loc[forecast_values_df['elevation'] < elevation_limit, "forecast_power_kw"] = 0
forecast_values_df.loc[
forecast_values_df["elevation"] < elevation_limit, "forecast_power_kw"
] = 0

# drop elevation column
forecast_values_df.drop(columns=["elevation"], inplace=True)


return forecast_values_df


Expand All @@ -193,7 +199,8 @@ def adjust_forecast_with_adjuster(
forecast_meta: forecast metadata
forecast_values_df: forecast values dataframe
ml_model_name: the ml model name
average_minutes: the average minutes for the adjuster to group results by, this defaults to 60.
average_minutes: the average minutes for the adjuster to group results by,
this defaults to 60.
"""
# get the ME values
Expand Down

0 comments on commit b967d3a

Please sign in to comment.