@@ -111,7 +111,7 @@ def get_predicted_power_production_for_location(
111
111
day_ahead_hours = day_ahead_hours ,
112
112
day_ahead_timezone_delta_hours = day_ahead_timezone_delta_hours ,
113
113
forecast_horizon_minutes = forecast_horizon_minutes ,
114
- model_name = ml_model_name
114
+ model_name = ml_model_name ,
115
115
)
116
116
forecast_values : [ForecastValueSQL ] = values [site .site_uuid ]
117
117
@@ -187,16 +187,15 @@ def get_predicted_solar_power_production_for_location(
187
187
"""
188
188
189
189
# set this to be hard coded for now
190
- model_name = 'pvnet_india'
191
-
190
+ model_name = "pvnet_india"
192
191
193
192
return self .get_predicted_power_production_for_location (
194
193
location = location ,
195
194
asset_type = SiteAssetType .pv ,
196
195
forecast_horizon = forecast_horizon ,
197
196
forecast_horizon_minutes = forecast_horizon_minutes ,
198
197
smooth_flag = smooth_flag ,
199
- model_name = model_name
198
+ model_name = model_name ,
200
199
)
201
200
202
201
def get_predicted_wind_power_production_for_location (
@@ -217,7 +216,7 @@ def get_predicted_wind_power_production_for_location(
217
216
"""
218
217
219
218
# set this to be hard coded for now
220
- model_name = ' windnet_india'
219
+ model_name = " windnet_india"
221
220
222
221
return self .get_predicted_power_production_for_location (
223
222
location = location ,
@@ -273,13 +272,13 @@ def get_sites(self, email: str) -> list[internal.Site]:
273
272
274
273
return sites
275
274
276
- def get_site_forecast (self , site_uuid : str , email :str ) -> list [internal .PredictedPower ]:
275
+ def get_site_forecast (self , site_uuid : str , email : str ) -> list [internal .PredictedPower ]:
277
276
"""Get a forecast for a site, this is for a solar site"""
278
277
279
278
# TODO feels like there is some duplicated code here which could be refactored
280
279
281
280
# hard coded model name
282
- ml_model_name = ' pvnet_ad_sites'
281
+ ml_model_name = " pvnet_ad_sites"
283
282
284
283
# Get the window
285
284
start , _ = get_window ()
@@ -291,10 +290,7 @@ def get_site_forecast(self, site_uuid: str, email:str) -> list[internal.Predicte
291
290
site_uuid = UUID (site_uuid )
292
291
293
292
values = get_latest_forecast_values_by_site (
294
- session ,
295
- site_uuids = [site_uuid ],
296
- start_utc = start ,
297
- model_name = ml_model_name
293
+ session , site_uuids = [site_uuid ], start_utc = start , model_name = ml_model_name
298
294
)
299
295
forecast_values : [ForecastValueSQL ] = values [site_uuid ]
300
296
@@ -312,7 +308,7 @@ def get_site_forecast(self, site_uuid: str, email:str) -> list[internal.Predicte
312
308
313
309
return values
314
310
315
- def get_site_generation (self , site_uuid : str , email :str ) -> list [internal .ActualPower ]:
311
+ def get_site_generation (self , site_uuid : str , email : str ) -> list [internal .ActualPower ]:
316
312
"""Get the generation for a site, this is for a solar site"""
317
313
318
314
# TODO feels like there is some duplicated code here which could be refactored
@@ -344,7 +340,9 @@ def get_site_generation(self, site_uuid: str, email:str) -> list[internal.Actual
344
340
345
341
return values
346
342
347
- def post_site_generation (self , site_uuid : str , generation : list [internal .ActualPower ], email :str ):
343
+ def post_site_generation (
344
+ self , site_uuid : str , generation : list [internal .ActualPower ], email : str
345
+ ):
348
346
"""Post generation for a site"""
349
347
350
348
with self ._get_session () as session :
0 commit comments