Merge branch 'main' into develop

This commit is contained in:
Alexander Hess 2021-03-01 14:20:08 +01:00
commit 6c03261b07
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
22 changed files with 618055 additions and 12 deletions

View file

@ -104,8 +104,13 @@ def tactical_heuristic( # noqa:C901,WPS213,WPS216,WPS231
# commands are added the make `Forecast`s without the heuristic!
# Continue with forecasting on the day the last prediction was made ...
last_predict_at = ( # noqa:ECE001
db.session.query(func.max(db.Forecast.start_at))
db.session.query(func.max(db.Forecast.start_at)) # noqa:WPS221
.join(db.Pixel, db.Forecast.pixel_id == db.Pixel.id)
.join(db.Grid, db.Pixel.grid_id == db.Grid.id)
.filter(db.Forecast.pixel == pixel)
.filter(db.Grid.side_length == side_length)
.filter(db.Forecast.time_step == time_step)
.filter(db.Forecast.train_horizon == train_horizon)
.first()
)[0]
# ... or start `train_horizon` weeks after the first `Order`