Skip to content

Commit

Permalink
Fix CLI tool weights file handling
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholmer committed Sep 26, 2024
1 parent 56dba1b commit 1d1b6e2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions taxcalc/taxcalcio.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,23 +348,24 @@ def init(self, input_data, tax_year, baseline, reform, assump,
exact_calculations=exact_calculations
)
elif self.tmd_input_data:
wghts = pd.read_csv(self.tmd_weights)

Check warning on line 351 in taxcalc/taxcalcio.py

View check run for this annotation

Codecov / codecov/patch

taxcalc/taxcalcio.py#L351

Added line #L351 was not covered by tests
recs = Records(
data=pd.read_csv(input_data),
start_year=Records.TMDCSV_YEAR,
weights=self.tmd_weights,
weights=wghts,
gfactors=gfactors_ref,
adjust_ratios=None,
exact_calculations=exact_calculations
) # pragma: no cover
recs_base = Records(
data=pd.read_csv(input_data),
start_year=Records.TMDCSV_YEAR,
weights=self.tmd_weights,
weights=wghts,
gfactors=gfactors_base,
adjust_ratios=None,
exact_calculations=exact_calculations
) # pragma: no cover
else: # if not {cps|tmd}_input_data but aging_input_data
else: # if not {cps|tmd}_input_data but aging_input_data: puf
recs = Records(
data=input_data,
gfactors=gfactors_ref,
Expand Down

0 comments on commit 1d1b6e2

Please sign in to comment.