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

Convert params function #158

Open
jdebacker opened this issue Feb 18, 2021 · 3 comments
Open

Convert params function #158

jdebacker opened this issue Feb 18, 2021 · 3 comments

Comments

@jdebacker
Copy link
Member

Since cs2tc is a dependency, I think one could use a function from that package and remove the report_utils.convert_params() function.

@jdebacker
Copy link
Member Author

Also perhaps redundant with cs2tc:

  • utils.update_policy()
  • utils.is_paramtools_format()

@andersonfrailey
Copy link
Collaborator

I'll defer to @hdoupe for this one

@hdoupe
Copy link
Collaborator

hdoupe commented Feb 19, 2021

cs2tc only makes a couple high-level changes to the parameter format. For example, it renames parameters coming from CS that are named EITC_c_checkbox to EITC_c-indexed. It doesn't do full conversions between ParamTools and Tax-Calculator parameter formats.

Tax-Calculator's Parameters._update, which is called by methods like Policy.implement_reform, converts parameters from Traditional Tax-Calculator style to the paramtools format but not the other way around.

The convert_params function is the only (still living 💀) function that converts parameters from ParamTools format to Tax-Calculator format. (@andersonfrailey if you're interested, I would happily update the report creation logic to use ParamTools formatted data so we can purge one more of these conversion functions.)

Also perhaps redundant with cs2tc:
- utils.update_policy()
- utils.is_paramtools_format()

These aren't in cs2tc. I don't know the best home for them. They are duplicated in CCC, too:

https://github.com/PSLmodels/Cost-of-Capital-Calculator/blob/afad7751597f0f937f7b00a353d41f827f5e9527/ccc/get_taxcalc_rates.py#L157-L186

It may be best to include this logic directly in Tax-Calculator or in a third-party package like cs2tc.

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

No branches or pull requests

3 participants