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

Consolidate all the private validate logic in the Parameters class #2281

Merged
merged 10 commits into from
Apr 3, 2019
Merged

Consolidate all the private validate logic in the Parameters class #2281

merged 10 commits into from
Apr 3, 2019

Conversation

martinholmer
Copy link
Collaborator

@martinholmer martinholmer commented Apr 1, 2019

This pull request consolidates all the parameter _validate_names_types and _validate_values logic in the Parameters class. This change reduces code duplication and makes the abstract Parameters class a better candidate for using to build policy parameter and/or assumption parameter classes in other models that are already importing the taxcalc package. This pull request also removes from the Parameters class code all hardcoded names of wage-indexed parameters. And it moves the code that reads the DEFAULTS JSON file to create a _vals dictionary into the Parameters class constructor, where it should have been in the original design of the Parameters class.

@codecov
Copy link

codecov bot commented Apr 1, 2019

Codecov Report

Merging #2281 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #2281   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files          12      12           
  Lines        2997    2930   -67     
======================================
- Hits         2997    2930   -67
Impacted Files Coverage Δ
taxcalc/growdiff.py 100% <100%> (ø) ⬆️
taxcalc/parameters.py 100% <100%> (ø) ⬆️
taxcalc/consumption.py 100% <100%> (ø) ⬆️
taxcalc/policy.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c093e59...f7742fd. Read the comment docs.

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.

1 participant