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

ACTC_c / CTC_c relationship #2539

Closed
hdoupe opened this issue Feb 1, 2021 · 1 comment · Fixed by #2540
Closed

ACTC_c / CTC_c relationship #2539

hdoupe opened this issue Feb 1, 2021 · 1 comment · Fixed by #2540

Comments

@hdoupe
Copy link
Collaborator

hdoupe commented Feb 1, 2021

I just noticed that tests are failing on master when running reform 41 in reforms.json:

"41": {
"baseline": "2017_law.json",
"start_year": 2015,
"value": {"CTC_c": 0},
"name": "Eliminate child tax credit",
"output_type": "iitax",
"compare_with": {"Tax Expenditure": [57.3, 57.0, 57.1, 56.8]}
},

image

This error makes sense because ACTC_c must be less than CTC_c:

"validators": {
"range": {
"min": 0,
"max": "CTC_c"
}
},

But CTC_c doesn't have a similar range validator which is why the error wasn't triggered before:

"validators": {
"range": {
"min": 0,
"max": 9e+99
}
},

The reason this error is being thrown now is that all parameter values are validated after #2532 -- not just the parameters that were updated. Before, the validation logic didn't check whether the value of ACTC_c was valid after CTC_c was validated. Now it does.

To fix this, we can update reform 41 to be:

"41": {
    "baseline": "2017_law.json",
    "start_year": 2015,
    "value": {"CTC_c": 0, "ACTC_c": 0},
    "name": "Eliminate child tax credit",
    "output_type": "iitax",
    "compare_with": {"Tax Expenditure": [57.3, 57.0, 57.1, 56.8]}
},
@MattHJensen
Copy link
Contributor

MattHJensen commented Feb 1, 2021

Thanks @hdoupe.

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 a pull request may close this issue.

2 participants