Skip to content

Commit

Permalink
Merge pull request #296 from PSLmodels/fix-Policy
Browse files Browse the repository at this point in the history
Add more uses of Tax-Calculator Policy.tmd_constructor
  • Loading branch information
martinholmer authored Nov 12, 2024
2 parents 22af266 + 2953c69 commit 983a1eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tmd/create_taxcalc_cached_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def create_cached_files():
for each variable in the CACHED_TAXCALC_VARIABLES list.
"""
# calculate all Tax-Calculator variables for TAX_YEAR
pol = tc.Policy()
pol = tc.Policy.tmd_constructor(growfactors_path=GFFILE_PATH)
rec = tc.Records.tmd_constructor(
data_path=INFILE_PATH,
weights_path=WTFILE_PATH,
Expand Down
5 changes: 4 additions & 1 deletion tmd/utils/taxcalc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ def add_taxcalc_outputs(
exact_calculations=True,
weights_scale=1.0,
)
policy = tc.Policy()
if isinstance(growfactors, pathlib.PosixPath):
policy = tc.Policy.tmd_constructor(growfactors_path=growfactors)
else:
policy = tc.Policy()
if reform:
policy.implement_reform(reform)
simulation = tc.Calculator(records=rec, policy=policy)
Expand Down

0 comments on commit 983a1eb

Please sign in to comment.