Skip to content

Commit

Permalink
use tmd constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed May 28, 2024
1 parent 9c88f53 commit c993fbc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 4 additions & 8 deletions taxbrain/taxbrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,10 +690,9 @@ def _make_calculators(self):
weights=tc.Records.PUF_WEIGHTS_FILENAME,
)
elif self.microdata == "TMD":
records = tc.Records(
records = tc.Records.tmd_constructor(
"tmd.csv",
gfactors=gf_base,
weights=tc.Records.TMD_WEIGHTS_FILENAME,
)
elif isinstance(self.microdata, dict):
if self.microdata["growfactors"] is None:
Expand Down Expand Up @@ -743,10 +742,9 @@ def _make_calculators(self):
weights=tc.Records.PUF_WEIGHTS_FILENAME,
)
elif self.microdata == "TMD":
records = tc.Records(
records = tc.Records.tmd_constructor(
"tmd.csv",
gfactors=gf_reform,
weights=tc.Records.TMD_WEIGHTS_FILENAME,
)
elif isinstance(self.microdata, dict):
if self.microdata["growfactors"] is None:
Expand Down Expand Up @@ -813,10 +811,9 @@ def _make_stacked_objects(self):
weights=tc.Records.PUF_WEIGHTS_FILENAME,
)
elif self.microdata == "TMD":
records = tc.Records(
records = tc.Records.tmd_constructor(
"tmd.csv",
gfactors=gf_base,
weights=tc.Records.TMD_WEIGHTS_FILENAME,
)
elif isinstance(self.microdata, dict):
if self.microdata["growfactors"] is None:
Expand Down Expand Up @@ -868,10 +865,9 @@ def _make_stacked_objects(self):
weights=tc.Records.PUF_WEIGHTS_FILENAME,
)
elif self.microdata == "TMD":
reform_records = tc.Records(
records = tc.Records.tmd_constructor(
"tmd.csv",
gfactors=gf_reform,
weights=tc.Records.TMD_WEIGHTS_FILENAME,
)
elif isinstance(self.microdata, dict):
if self.microdata["growfactors"] is None:
Expand Down
4 changes: 2 additions & 2 deletions taxbrain/tests/test_brain.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ def test_baseline_policy_PUF():

@pytest.mark.requires_tmdcsv
def test_baseline_policy_TMD():
base = {"II_em": {2019: 0}}
base = {"II_em": {2021: 0}}
reform = {"II_em": {2025: 2000}}

tb = TaxBrain(2018, 2019, microdata="TMD", reform=reform, base_policy=base)
tb = TaxBrain(2021, 2022, microdata="TMD", reform=reform, base_policy=base)
tb.run()


Expand Down

0 comments on commit c993fbc

Please sign in to comment.