Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
eriksynn opened this issue Aug 28, 2024 · 2 comments
Assignees
Labels
rules-engine Issues related to the Python rules engine

Comments

@eriksynn
Copy link
Collaborator

eriksynn commented Aug 28, 2024

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 eriksynn changed the title Enhance our billing_record "inclusion logic" implementation to model the cusp months to be auto-greyed-out in UI Enhance our billing_record "inclusion logic" implementation to model the cusp months to be auto-grayed-out in UI Aug 28, 2024
@eriksynn eriksynn added the rules-engine Issues related to the Python rules engine label Aug 28, 2024
@eriksynn eriksynn self-assigned this Aug 28, 2024
@eriksynn
Copy link
Collaborator Author

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
Copy link
Collaborator Author

This issue is fixed now fixed by PR#241

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rules-engine Issues related to the Python rules engine
Projects
None yet
Development

No branches or pull requests

1 participant