Add OrderHistory.avg_daily_demand()
- the method calculates the number of daily `Order`s in a `Pixel` withing the `train_horizon` preceding the `predict_day`
This commit is contained in:
parent
67cd58cf16
commit
cb7611d587
4 changed files with 83 additions and 11 deletions
|
|
@ -82,6 +82,17 @@ def good_pixel_id(pixel):
|
|||
return pixel.id # `== 1`
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def predict_at() -> dt.datetime:
|
||||
"""`NOON` on the day to be predicted."""
|
||||
return dt.datetime(
|
||||
test_config.END.year,
|
||||
test_config.END.month,
|
||||
test_config.END.day,
|
||||
test_config.NOON,
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def order_totals(good_pixel_id):
|
||||
"""A mock for `OrderHistory.totals`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue