-
Notifications
You must be signed in to change notification settings - Fork 175
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
Apply five year forward checks with utility function #5175
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to adjust:
Format
Test Fix DC reform
Apply utility function in all new variables
policyengine_us/reforms/utilities.py
Outdated
@@ -0,0 +1,24 @@ | |||
from policyengine_core.periods import period as period_ | |||
|
|||
def is_reform_active(parameter, period, years_to_check=5, condition_attr='in_effect'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def is_reform_active(parameter, period, years_to_check=5, condition_attr='in_effect'): | |
def reform_is_active(parameter, period, years_to_check=5, condition_attr='in_effect'): |
policyengine_us/reforms/dc_kccatc.py
Outdated
@@ -87,8 +87,18 @@ class reform(Reform): | |||
def apply(self): | |||
self.update_variable(dc_kccatc) | |||
|
|||
if bypass or parameters(period).gov.contrib.dc_kccatc.active: | |||
return reform | |||
return reform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the changes in this variable seemed to break - could you check the unit tests
Fix #5136: applying five year forward checks with a utility function.