This PR adds the Timing class, replaces when and frequency attributes of Account and Person with a attributes that expect a Timing-like object, and adds various timing-aware methods to Account, Person, and Strategy (along with corresponding changes to SubForecast subclasses). This closes #62.
Most code which called Account.max_inflow (which took a scalar when attribute) now calls the timing-aware Account.max_inflows (which takes a Timing-like time series input). Account.max_inflow_limit and similar properties are added to generalize the concept of providing upper and lower bounds on inflows and outflows.
A major compatibility-breaking change is that AccountTransactionsStrategy.__call__ now returns a mapping from Accounts to dictionaries of transactions (rather than scalar Money values). This required changes to some SubForecast subclasses, including changing the expected typing of the account_transactions properties. This relates to #51 but does not close it since AccountTransactionStrategy.__call__ still ingests a scalar arg instead of a Timing-like object and DebtPaymentStrategy is entirely unchanged.
This PR adds the
Timing
class, replaceswhen
andfrequency
attributes ofAccount
andPerson
with a attributes that expect aTiming
-like object, and adds various timing-aware methods toAccount
,Person
, andStrategy
(along with corresponding changes toSubForecast
subclasses). This closes #62.Most code which called
Account.max_inflow
(which took a scalarwhen
attribute) now calls the timing-awareAccount.max_inflows
(which takes aTiming
-like time series input).Account.max_inflow_limit
and similar properties are added to generalize the concept of providing upper and lower bounds on inflows and outflows.A major compatibility-breaking change is that
AccountTransactionsStrategy.__call__
now returns a mapping fromAccounts
to dictionaries of transactions (rather than scalarMoney
values). This required changes to someSubForecast
subclasses, including changing the expected typing of theaccount_transactions
properties. This relates to #51 but does not close it sinceAccountTransactionStrategy.__call__
still ingests a scalar arg instead of aTiming
-like object andDebtPaymentStrategy
is entirely unchanged.