You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AnalysisType can be three things: ALLOWED_HEATING_USAGE, ALLOWED_NON_HEATING_USAGE, or NOT_ALLOWED_IN_CALCULATIONS. This value is set for each billing period by an algorithm, one for Natural Gas, and one for Oil/Propane. The result of these calculations then determines whether a particular bill is appended to bills_winter or bills_summer or bills_shoulder. The user is then allowed to override this algorithm for a particular bill in the UI by setting inclusion_override for that bill to True. The result in the rules engine should be then that that bill is either included or excluded from winter or summer calculations (whichever it is in). However, if a bill is added to bills_shoulder and the user sets inclusion_override to True on that bill, we don't necessarily know whether they intended for that bill to be added to winter or summer calculations, although we could make an educated guess. But in that situation, we would need to add that bill to the appropriate "bills" list. The question I had is, in reacting to inclusion_override settings by the user, should we be writing the code to add or remove bills from the winter or summer bills lists prior to various calculations, or should we be simply inserting "inclusion_override truth" tests in various calculation functions. Given that this inclusion_override feature was not designed into the rules_engine from the start, I think this question must be tackled before we attempt to write code.
This week I got curious about how to reconcile analysis_type_override and inclusion_override in the code. So, I made a number of changes and verified that the tests still run. These are staged in PR #241. Comments and questions are welcome.
No description provided.
The text was updated successfully, but these errors were encountered: