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

Apply five year forward checks with utility function #5175

Open
wants to merge 45 commits into
base: master
Choose a base branch
from

Conversation

leehengpan
Copy link
Collaborator

Fix #5136: applying five year forward checks with a utility function.

Copy link
Collaborator

@PavelMakarchuk PavelMakarchuk left a 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

@@ -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'):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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'):

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

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

@leehengpan leehengpan self-assigned this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants