codeforboston / home-energy-analysis-tool

https://www.codeforboston.org/projects/
MIT License
11 stars 29 forks source link

Enhance our billing_record "inclusion logic" implementation to model the cusp months to be auto-grayed-out in UI #242

Closed eriksynn closed 5 days ago

eriksynn commented 2 weeks ago

Where Bill End Date falls within a given month as listed below, UI rows will be automatically "grayed-out" as follows (False is Gray). This is a separate state from our Analysis Type tri-state setting which determines heating usage, non heating usage, or not included as represented by the cool icons on the far left column in the UI. months = { # this table determines if a row is "grayed out" in the UI 1: default_inclusion = True, 2: default_inclusion = True, 3: default_inclusion = True, 4: default_inclusion = False, 5: default_inclusion = False, 6: default_inclusion = False, 7: default_inclusion = True, 8: default_inclusion = True, 9: default_inclusion = True, 10: default_inclusion = False, 11: default_inclusion = False, 12: default_inclusion = True, }

The following table represents our auto-calculation of the Analysis Type tri-state value (icons on the far left column of the UI). Note that this table differs from the above table for April and November with respect to "not allowed". The goal for this difference is to represent winter and summer months accurately, but to give the user some flexibility to override the default decision to allow April and November to be included in winter calculations. months = { 1: AnalysisType.ALLOWED_HEATING_USAGE, 2: AnalysisType.ALLOWED_HEATING_USAGE, 3: AnalysisType.ALLOWED_HEATING_USAGE, 4: AnalysisType.ALLOWED_HEATING_USAGE, 5: AnalysisType.NOT_ALLOWED_IN_CALCULATIONS, 6: AnalysisType.NOT_ALLOWED_IN_CALCULATIONS, 7: AnalysisType.ALLOWED_NON_HEATING_USAGE, 8: AnalysisType.ALLOWED_NON_HEATING_USAGE, 9: AnalysisType.ALLOWED_NON_HEATING_USAGE, 10: AnalysisType.NOT_ALLOWED_IN_CALCULATIONS, 11: AnalysisType.ALLOWED_HEATING_USAGE, 12: AnalysisType.ALLOWED_HEATING_USAGE, }

eriksynn commented 2 weeks ago

I have a draft implementation of the cusp month behavior (the grayed out rows). I plan to update my PR #241 with these changes soon. As is popular in today's political discourse "stay tuned!!!".

eriksynn commented 5 days ago

This issue is fixed now fixed by PR#241