taxcalc 5.2.0__py3-none-any.whl → 5.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- taxcalc/__init__.py +3 -3
- taxcalc/calcfunctions.py +2 -2
- taxcalc/calculator.py +3 -3
- taxcalc/cli/tc.py +15 -11
- taxcalc/data.py +1 -1
- taxcalc/decorators.py +9 -8
- taxcalc/growfactors.py +2 -1
- taxcalc/policy.py +6 -5
- taxcalc/policy_current_law.json +31 -631
- taxcalc/puf_ratios.csv +24 -24
- taxcalc/puf_weights.csv.gz +0 -0
- taxcalc/reforms/ARPA.out.csv +9 -9
- taxcalc/taxcalcio.py +41 -26
- taxcalc/tests/conftest.py +1 -1
- taxcalc/tests/puf_var_correl_coeffs_2016.csv +24 -24
- taxcalc/tests/puf_var_wght_means_by_year.csv +11 -11
- taxcalc/tests/pufcsv_agg_expect.csv +20 -20
- taxcalc/tests/pufcsv_mtr_expect.txt +21 -21
- taxcalc/tests/reforms.json +3 -1
- taxcalc/tests/reforms_expect.csv +48 -48
- taxcalc/tests/test_4package.py +8 -9
- taxcalc/tests/test_calculator.py +151 -151
- taxcalc/tests/test_compare.py +2 -2
- taxcalc/tests/test_consumption.py +2 -2
- taxcalc/tests/test_cpscsv.py +2 -2
- taxcalc/tests/test_decorators.py +57 -52
- taxcalc/tests/test_growdiff.py +2 -2
- taxcalc/tests/test_parameters.py +59 -53
- taxcalc/tests/test_policy.py +154 -154
- taxcalc/tests/test_puf_var_stats.py +1 -1
- taxcalc/tests/test_pufcsv.py +3 -3
- taxcalc/tests/test_records.py +5 -1
- taxcalc/tests/test_reforms.py +101 -99
- taxcalc/tests/test_taxcalcio.py +10 -4
- taxcalc/utils.py +3 -3
- {taxcalc-5.2.0.dist-info → taxcalc-5.3.0.dist-info}/METADATA +3 -6
- {taxcalc-5.2.0.dist-info → taxcalc-5.3.0.dist-info}/RECORD +41 -42
- taxcalc/reforms/clp.out.csv +0 -10
- {taxcalc-5.2.0.dist-info → taxcalc-5.3.0.dist-info}/WHEEL +0 -0
- {taxcalc-5.2.0.dist-info → taxcalc-5.3.0.dist-info}/entry_points.txt +0 -0
- {taxcalc-5.2.0.dist-info → taxcalc-5.3.0.dist-info}/licenses/LICENSE +0 -0
- {taxcalc-5.2.0.dist-info → taxcalc-5.3.0.dist-info}/top_level.txt +0 -0
taxcalc/tests/test_pufcsv.py
CHANGED
@@ -46,7 +46,7 @@ def test_agg(tests_path, puf_fullsample):
|
|
46
46
|
calc_start_year = calc.current_year
|
47
47
|
# create aggregate diagnostic table (adt) as a Pandas DataFrame object
|
48
48
|
adt = calc.diagnostic_table(nyrs).round(1) # column labels are int
|
49
|
-
taxes_fullsample = adt.loc[
|
49
|
+
taxes_fullsample = adt.loc['Combined Liability ($b)']
|
50
50
|
# compare actual DataFrame, adt, with the expected DataFrame, edt
|
51
51
|
aggres_path = os.path.join(tests_path, 'pufcsv_agg_expect.csv')
|
52
52
|
edt = pd.read_csv(aggres_path, index_col=False) # column labels are str
|
@@ -78,10 +78,10 @@ def test_agg(tests_path, puf_fullsample):
|
|
78
78
|
calc_subsample.advance_to_year(START_YEAR)
|
79
79
|
adt_subsample = calc_subsample.diagnostic_table(nyrs)
|
80
80
|
# compare combined tax liability from full and sub samples for each year
|
81
|
-
taxes_subsample = adt_subsample.loc[
|
81
|
+
taxes_subsample = adt_subsample.loc['Combined Liability ($b)']
|
82
82
|
msg = ''
|
83
83
|
for cyr in range(calc_start_year, calc_start_year + nyrs):
|
84
|
-
reltol = 0.
|
84
|
+
reltol = 0.045 # maximum allowed relative difference in tax liability
|
85
85
|
if not np.allclose(taxes_subsample[cyr], taxes_fullsample[cyr],
|
86
86
|
atol=0.0, rtol=reltol):
|
87
87
|
reldiff = (taxes_subsample[cyr] / taxes_fullsample[cyr]) - 1.
|
taxcalc/tests/test_records.py
CHANGED
@@ -66,7 +66,7 @@ def test_read_cps_data(cps_fullsample):
|
|
66
66
|
assert data.equals(cps_fullsample)
|
67
67
|
|
68
68
|
|
69
|
-
@pytest.mark.parametrize(
|
69
|
+
@pytest.mark.parametrize('csv', [
|
70
70
|
(
|
71
71
|
'RECID,MARS,e00200,e00200p,e00200s\n'
|
72
72
|
'1, 2, 200000, 200000, 0.03\n'
|
@@ -134,21 +134,25 @@ def test_read_data(csv):
|
|
134
134
|
def test_for_duplicate_names():
|
135
135
|
"""Test docstring"""
|
136
136
|
records_varinfo = Records(data=None)
|
137
|
+
num_vars = 0
|
137
138
|
varnames = set()
|
138
139
|
for varname in records_varinfo.USABLE_READ_VARS:
|
139
140
|
assert varname not in varnames
|
140
141
|
varnames.add(varname)
|
141
142
|
assert varname not in records_varinfo.CALCULATED_VARS
|
143
|
+
num_vars += len(varnames)
|
142
144
|
varnames = set()
|
143
145
|
for varname in records_varinfo.CALCULATED_VARS:
|
144
146
|
assert varname not in varnames
|
145
147
|
varnames.add(varname)
|
146
148
|
assert varname not in records_varinfo.USABLE_READ_VARS
|
149
|
+
num_vars += len(varnames)
|
147
150
|
varnames = set()
|
148
151
|
for varname in records_varinfo.INTEGER_READ_VARS:
|
149
152
|
assert varname not in varnames
|
150
153
|
varnames.add(varname)
|
151
154
|
assert varname in records_varinfo.USABLE_READ_VARS
|
155
|
+
assert num_vars == 212 # number of vars in records_variables.json
|
152
156
|
|
153
157
|
|
154
158
|
def test_records_variables_content(tests_path):
|
taxcalc/tests/test_reforms.py
CHANGED
@@ -73,8 +73,19 @@ def test_2017_law_reform(tests_path):
|
|
73
73
|
assert act == exp, f'{name} a={act} != e={exp}'
|
74
74
|
|
75
75
|
|
76
|
+
def _apply_reform(policy, reform_path):
|
77
|
+
"""
|
78
|
+
Helper function to apply a reform and assert no errors.
|
79
|
+
"""
|
80
|
+
with open(reform_path, 'r', encoding='utf-8') as rfile:
|
81
|
+
rtext = rfile.read()
|
82
|
+
policy.implement_reform(Policy.read_json_reform(rtext))
|
83
|
+
assert not policy.parameter_errors
|
84
|
+
assert not policy.errors
|
85
|
+
|
86
|
+
|
76
87
|
@pytest.mark.rtr
|
77
|
-
@pytest.mark.parametrize('fyear', [2019, 2020, 2021, 2022, 2023])
|
88
|
+
@pytest.mark.parametrize('fyear', [2019, 2020, 2021, 2022, 2023, 2024, 2025])
|
78
89
|
def test_round_trip_reforms(fyear, tests_path):
|
79
90
|
"""
|
80
91
|
Check that current-law policy has the same policy parameter values in
|
@@ -83,7 +94,7 @@ def test_round_trip_reforms(fyear, tests_path):
|
|
83
94
|
reforms that represents new tax legislation since 2017.
|
84
95
|
This test checks that the future-year parameter values for
|
85
96
|
current-law policy (which incorporates recent legislation such as
|
86
|
-
the TCJA, CARES Act, and
|
97
|
+
the TCJA, CARES Act, ARPA, and OBBBA) are the same as future-year
|
87
98
|
parameter values for the compound round-trip reform.
|
88
99
|
Doing this check ensures that the 2017_law.json
|
89
100
|
and subsequent reform files that represent recent legislation are
|
@@ -97,48 +108,21 @@ def test_round_trip_reforms(fyear, tests_path):
|
|
97
108
|
clp_mdata = dict(clp_pol.items())
|
98
109
|
# create rtr metadata dictionary for round-trip reform in fyear
|
99
110
|
rtr_pol = Policy()
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
reform_file = os.path.join(tests_path, '..', 'reforms', 'CARES.json')
|
116
|
-
with open(reform_file, 'r', encoding='utf-8') as rfile:
|
117
|
-
rtext = rfile.read()
|
118
|
-
rtr_pol.implement_reform(Policy.read_json_reform(rtext))
|
119
|
-
# Layer on the Consolidated Appropriations Act of 2021
|
120
|
-
reform_file = os.path.join(
|
121
|
-
tests_path, '..', 'reforms', 'ConsolidatedAppropriationsAct2021.json'
|
122
|
-
)
|
123
|
-
with open(reform_file, 'r', encoding='utf-8') as rfile:
|
124
|
-
rtext = rfile.read()
|
125
|
-
rtr_pol.implement_reform(Policy.read_json_reform(rtext))
|
126
|
-
assert not rtr_pol.parameter_errors
|
127
|
-
assert not rtr_pol.errors
|
128
|
-
# Layer on ARPA
|
129
|
-
reform_file = os.path.join(tests_path, '..', 'reforms', 'ARPA.json')
|
130
|
-
with open(reform_file, 'r', encoding='utf-8') as rfile:
|
131
|
-
rtext = rfile.read()
|
132
|
-
rtr_pol.implement_reform(Policy.read_json_reform(rtext))
|
133
|
-
assert not rtr_pol.parameter_errors
|
134
|
-
assert not rtr_pol.errors
|
135
|
-
# Layer on rounding from IRS through Policy.LAST_KNOWN_YEAR
|
136
|
-
reform_file = os.path.join(tests_path, '..', 'reforms', 'rounding.json')
|
137
|
-
with open(reform_file, 'r', encoding='utf-8') as rfile:
|
138
|
-
rtext = rfile.read()
|
139
|
-
rtr_pol.implement_reform(Policy.read_json_reform(rtext))
|
140
|
-
assert not rtr_pol.parameter_errors
|
141
|
-
assert not rtr_pol.errors
|
111
|
+
|
112
|
+
reform_files_to_apply = [
|
113
|
+
'2017_law.json',
|
114
|
+
'TCJA.json',
|
115
|
+
'CARES.json',
|
116
|
+
'ConsolidatedAppropriationsAct2021.json',
|
117
|
+
'ARPA.json',
|
118
|
+
'OBBBA.json',
|
119
|
+
'rounding.json'
|
120
|
+
]
|
121
|
+
for reform_filename in reform_files_to_apply:
|
122
|
+
reform_file_path = os.path.join(tests_path, '..',
|
123
|
+
'reforms', reform_filename)
|
124
|
+
_apply_reform(rtr_pol, reform_file_path)
|
125
|
+
|
142
126
|
rtr_pol.set_year(fyear)
|
143
127
|
rtr_mdata = dict(rtr_pol.items())
|
144
128
|
# compare fyear policy parameter values
|
@@ -158,7 +142,7 @@ def test_round_trip_reforms(fyear, tests_path):
|
|
158
142
|
clp_val = clp_mdata[pname]
|
159
143
|
if not np.allclose(rtr_val, clp_val):
|
160
144
|
fail_params.append(pname)
|
161
|
-
msg += '\n {pname} in {fyear} : rtr={rtr_val} clp={clp_val}'
|
145
|
+
msg += f'\n {pname} in {fyear} : rtr={rtr_val} clp={clp_val}'
|
162
146
|
if fail_dump:
|
163
147
|
rtr_fails.write(f'{pname} {fyear} {rtr_val}\n')
|
164
148
|
clp_fails.write(f'{pname} {fyear} {clp_val}\n')
|
@@ -169,8 +153,23 @@ def test_round_trip_reforms(fyear, tests_path):
|
|
169
153
|
raise ValueError(msg)
|
170
154
|
|
171
155
|
|
156
|
+
REFORM_DIR = os.path.join(os.path.dirname(__file__), '..', 'reforms')
|
157
|
+
REFORM_FILES = glob.glob(os.path.join(REFORM_DIR, '*.json'))
|
158
|
+
REFORM_YEARS = {
|
159
|
+
'ARPA.json': 2022,
|
160
|
+
'ext.json': 2026,
|
161
|
+
'NoOBBBA.json': 2026,
|
162
|
+
'OBBBA.json': 2026,
|
163
|
+
}
|
164
|
+
|
165
|
+
|
172
166
|
@pytest.mark.reforms
|
173
|
-
|
167
|
+
@pytest.mark.parametrize(
|
168
|
+
'reform_file,tax_year',
|
169
|
+
[(os.path.basename(f), REFORM_YEARS.get(os.path.basename(f), 2020))
|
170
|
+
for f in REFORM_FILES],
|
171
|
+
)
|
172
|
+
def test_reform_json_and_output(reform_file, tax_year, tests_path):
|
174
173
|
"""
|
175
174
|
Check that each JSON reform file can be converted into a reform dictionary
|
176
175
|
that can then be passed to the Policy class implement_reform method that
|
@@ -213,7 +212,6 @@ def test_reform_json_and_output(tests_path):
|
|
213
212
|
return not diffs
|
214
213
|
|
215
214
|
# specify Records object containing cases data
|
216
|
-
tax_year = 2020
|
217
215
|
cases_path = os.path.join(tests_path, '..', 'reforms', 'cases.csv')
|
218
216
|
cases = Records(data=cases_path,
|
219
217
|
start_year=tax_year, # set raw input data year
|
@@ -226,9 +224,10 @@ def test_reform_json_and_output(tests_path):
|
|
226
224
|
calc = Calculator(policy=Policy(), records=cases, verbose=False)
|
227
225
|
calc.advance_to_year(tax_year)
|
228
226
|
calc.calc_all()
|
229
|
-
|
227
|
+
clp_base = cases_path.replace('cases.csv', f'clp-{tax_year}')
|
228
|
+
res_path = clp_base + '.res.csv'
|
230
229
|
write_res_file(calc, res_path)
|
231
|
-
if res_and_out_are_same(
|
230
|
+
if res_and_out_are_same(clp_base):
|
232
231
|
os.remove(res_path)
|
233
232
|
else:
|
234
233
|
failures.append(res_path)
|
@@ -237,33 +236,29 @@ def test_reform_json_and_output(tests_path):
|
|
237
236
|
pre_tcja_jrf = os.path.join(tests_path, '..', 'reforms', '2017_law.json')
|
238
237
|
pre_tcja = Policy.read_json_reform(pre_tcja_jrf)
|
239
238
|
# check reform file contents and reform results for each reform
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
reform = Policy.read_json_reform(jrf_text)
|
251
|
-
pol = Policy() # current-law policy
|
252
|
-
if pre_tcja_baseline:
|
253
|
-
pol.implement_reform(pre_tcja)
|
254
|
-
assert not pol.parameter_errors
|
255
|
-
pol.implement_reform(reform)
|
239
|
+
jrf = os.path.join(tests_path, '..', 'reforms', reform_file)
|
240
|
+
# determine reform's baseline by reading contents of jrf
|
241
|
+
with open(jrf, 'r', encoding='utf-8') as rfile:
|
242
|
+
jrf_text = rfile.read()
|
243
|
+
pre_tcja_baseline = 'Reform_Baseline: 2017_law.json' in jrf_text
|
244
|
+
# implement the reform relative to its baseline
|
245
|
+
reform = Policy.read_json_reform(jrf_text)
|
246
|
+
pol = Policy() # current-law policy
|
247
|
+
if pre_tcja_baseline:
|
248
|
+
pol.implement_reform(pre_tcja)
|
256
249
|
assert not pol.parameter_errors
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
250
|
+
pol.implement_reform(reform)
|
251
|
+
assert not pol.parameter_errors
|
252
|
+
calc = Calculator(policy=pol, records=cases, verbose=False)
|
253
|
+
calc.advance_to_year(tax_year)
|
254
|
+
calc.calc_all()
|
255
|
+
res_path = jrf.replace('.json', '.res.csv')
|
256
|
+
write_res_file(calc, res_path)
|
257
|
+
if res_and_out_are_same(res_path.replace('.res.csv', '')):
|
258
|
+
os.remove(res_path)
|
259
|
+
else:
|
260
|
+
failures.append(res_path)
|
261
|
+
del calc
|
267
262
|
if failures:
|
268
263
|
msg = 'Following reforms have res-vs-out differences:\n'
|
269
264
|
for ref in failures:
|
@@ -358,32 +353,39 @@ def test_reforms(rid, test_reforms_init, tests_path, baseline_2017_law,
|
|
358
353
|
afile.write(f'{actual}\n')
|
359
354
|
|
360
355
|
|
361
|
-
@pytest.mark.
|
362
|
-
|
356
|
+
@pytest.mark.cps
|
357
|
+
@pytest.mark.parametrize('reform_filename, expected_diff', [
|
358
|
+
('ext.json', 45.491),
|
359
|
+
('OBBBA.json', 0.0),
|
360
|
+
('NoOBBBA.json', 292.402),
|
361
|
+
])
|
362
|
+
def test_reforms_cps(reform_filename, expected_diff, tests_path):
|
363
363
|
"""
|
364
|
-
Test
|
364
|
+
Test reforms beyond 2025 using public CPS data.
|
365
365
|
"""
|
366
|
-
|
367
|
-
|
368
|
-
end.set_year(2026)
|
369
|
-
ext = Policy()
|
370
|
-
reform_file = os.path.join(tests_path, '..', 'reforms', 'ext.json')
|
366
|
+
pol = Policy()
|
367
|
+
reform_file = os.path.join(tests_path, '..', 'reforms', reform_filename)
|
371
368
|
with open(reform_file, 'r', encoding='utf-8') as rfile:
|
372
369
|
rtext = rfile.read()
|
373
|
-
|
374
|
-
assert not
|
375
|
-
|
376
|
-
assert np.allclose([ext.II_em], [end.II_em])
|
377
|
-
# test tax output generated by ext.json reform file using public CPS data
|
370
|
+
pol.implement_reform(Policy.read_json_reform(rtext))
|
371
|
+
assert not pol.parameter_errors
|
372
|
+
|
378
373
|
recs = Records.cps_constructor()
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
374
|
+
|
375
|
+
# create a Calculator object using current-law policy
|
376
|
+
calc_clp = Calculator(policy=Policy(), records=recs, verbose=False)
|
377
|
+
calc_clp.advance_to_year(2026)
|
378
|
+
calc_clp.calc_all()
|
379
|
+
iitax_clp = calc_clp.array('iitax')
|
380
|
+
|
381
|
+
# create a Calculator object using the reform
|
382
|
+
calc_ref = Calculator(policy=pol, records=recs, verbose=False)
|
383
|
+
calc_ref.advance_to_year(2026)
|
384
|
+
calc_ref.calc_all()
|
385
|
+
iitax_ref = calc_ref.array('iitax')
|
386
|
+
|
387
|
+
# compare aggregate individual income tax liability
|
388
|
+
rdiff = iitax_ref - iitax_clp
|
389
|
+
weighted_sum_rdiff = (rdiff * calc_clp.array('s006')).sum() * 1.0e-9
|
390
|
+
assert np.allclose([weighted_sum_rdiff], [expected_diff],
|
391
|
+
rtol=0.0, atol=0.01)
|
taxcalc/tests/test_taxcalcio.py
CHANGED
@@ -392,12 +392,18 @@ def test_ctor_init_with_cps_files():
|
|
392
392
|
assert tcio.errmsg
|
393
393
|
|
394
394
|
|
395
|
-
@pytest.mark.parametrize(
|
395
|
+
@pytest.mark.parametrize('dumpvar_str, str_valid, num_vars', [
|
396
396
|
("""
|
397
397
|
MARS;iitax payrolltax|combined,
|
398
398
|
c00100
|
399
399
|
surtax
|
400
|
-
""", True, 6), # these 6
|
400
|
+
""", True, 6), # these 6 variables minus MARS plus RECID
|
401
|
+
|
402
|
+
('ALL', True, 209),
|
403
|
+
# 209 =
|
404
|
+
# all 212 vars in records_variables.json (see test_records.py)
|
405
|
+
# minus 5 TaxCalcIO.BASE_DUMPVARS omitting RECID (see taxcalcio.py)
|
406
|
+
# plus 2 TaxCalcIO.MTR_DUMPVARS (see taxcalcio.py)
|
401
407
|
|
402
408
|
("""
|
403
409
|
MARS;iitax payrolltax|kombined,c00100
|
@@ -743,7 +749,7 @@ def test_error_message_parsed_correctly(regression_reform_file):
|
|
743
749
|
exact_calculations=False)
|
744
750
|
assert isinstance(tcio.errmsg, str) and tcio.errmsg
|
745
751
|
exp_errmsg = (
|
746
|
-
|
747
|
-
|
752
|
+
'AMEDT_rt[year=2021] 1.8 > max 1 \n'
|
753
|
+
'AMEDT_rt[year=2021] 1.8 > max 1 '
|
748
754
|
)
|
749
755
|
assert tcio.errmsg == exp_errmsg
|
taxcalc/utils.py
CHANGED
@@ -387,7 +387,7 @@ def create_distribution_table(vdf, groupby, income_measure,
|
|
387
387
|
dist_table.iloc[11] = topdec_row
|
388
388
|
del topdec_row
|
389
389
|
else:
|
390
|
-
dist_table.loc[
|
390
|
+
dist_table.loc['ALL'] = sum_row
|
391
391
|
del sum_row
|
392
392
|
# ensure dist_table columns are in correct order
|
393
393
|
assert dist_table.columns.values.tolist() == DIST_TABLE_COLUMNS
|
@@ -580,7 +580,7 @@ def create_difference_table(vdf1, vdf2, groupby, tax_to_diff,
|
|
580
580
|
diff_table.iloc[11] = topdec_row
|
581
581
|
del topdec_row
|
582
582
|
else:
|
583
|
-
diff_table.loc[
|
583
|
+
diff_table.loc['ALL'] = sum_row
|
584
584
|
# delete intermediate Pandas DataFrame objects
|
585
585
|
del gdf
|
586
586
|
del dframe
|
@@ -1603,7 +1603,7 @@ def json_to_dict(jsontext):
|
|
1603
1603
|
# if the 2nd group (capturing comments) is not None,
|
1604
1604
|
# it means we have captured a non-quoted (real) comment string.
|
1605
1605
|
if match.group(2) is not None:
|
1606
|
-
return
|
1606
|
+
return '\n' # preserve line numbers
|
1607
1607
|
# otherwise, we will return the 1st group
|
1608
1608
|
return match.group(1) # captured quoted-string
|
1609
1609
|
# begin main remove_comments function logic
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: taxcalc
|
3
|
-
Version: 5.
|
3
|
+
Version: 5.3.0
|
4
4
|
Summary: Tax-Calculator
|
5
5
|
Home-page: https://github.com/PSLmodels/Tax-Calculator
|
6
6
|
Download-URL: https://github.com/PSLmodels/Tax-Calculator
|
@@ -12,9 +12,9 @@ Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
13
13
|
Classifier: Programming Language :: Python
|
14
14
|
Classifier: Programming Language :: Python :: 3
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
16
15
|
Classifier: Programming Language :: Python :: 3.11
|
17
16
|
Classifier: Programming Language :: Python :: 3.12
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
18
18
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
19
19
|
Description-Content-Type: text/markdown
|
20
20
|
License-File: LICENSE
|
@@ -36,7 +36,7 @@ Dynamic: summary
|
|
36
36
|
| | |
|
37
37
|
| --- | --- |
|
38
38
|
| Org | [](https://www.PSLmodels.org) [](https://github.com/PSLmodels/Tax-Calculator/blob/master/LICENSE) [](https://pslmodels.github.io/Tax-Calculator/) |
|
39
|
-
| Package | [](https://www.python.org/downloads/release/python-3118/) [](https://www.python.org/downloads/release/python-3121/) [](https://www.python.org/downloads/release/python-3131/) [](https://pypi.org/project/taxcalc/) [](https://pypi.org/project/taxcalc/) [](https://anaconda.org/conda-forge/taxcalc)|
|
40
40
|
| Testing |   [](https://codecov.io/gh/PSLmodels/Tax-Calculator) |
|
41
41
|
|
42
42
|
|
@@ -57,6 +57,3 @@ explains the workflow involved in contributing model enhancements.
|
|
57
57
|
|
58
58
|
Complete documentation is available
|
59
59
|
[here](https://PSLmodels.github.io/Tax-Calculator/).
|
60
|
-
This documentation includes
|
61
|
-
[examples](https://taxcalc.pslmodels.org/usage/tcja_after_2025.html)
|
62
|
-
of how to analyze different ways of extending TCJA policy beyond 2025.
|
@@ -1,36 +1,36 @@
|
|
1
|
-
taxcalc/__init__.py,sha256=
|
2
|
-
taxcalc/calcfunctions.py,sha256=
|
3
|
-
taxcalc/calculator.py,sha256=
|
1
|
+
taxcalc/__init__.py,sha256=5kXLxekmfAIGKSaI0ownFFGPUYrcMHVGjsgkyQE-KgA,536
|
2
|
+
taxcalc/calcfunctions.py,sha256=8XUhXncnsRkqDL-3uqH1Ew2HIMs3p-gf97KHRKnJZJM,135517
|
3
|
+
taxcalc/calculator.py,sha256=nO4GM9pCY4vvmXMcExc9cgEfrMJj-A6Z9aKODHdjPLQ,64135
|
4
4
|
taxcalc/conftest.py,sha256=nO4J7qu1sTHgjqrzhpRMvfMJUrNm6GP_IsSuuDt_MeQ,141
|
5
5
|
taxcalc/consumption.json,sha256=FbGpsLP0W02sYc7o8N-BVz8Xw8hfk_gCr5MtHtgEBQQ,7615
|
6
6
|
taxcalc/consumption.py,sha256=pkXhFGpFqu7hW62KaTctfRSzR-pXzMB1ai8XCQRAgXk,3480
|
7
7
|
taxcalc/cps.csv.gz,sha256=SS6tSduU_Eu0EJwzpslnmqMsQQQucVMzzITfH-SeV40,9851074
|
8
8
|
taxcalc/cps_weights.csv.gz,sha256=-k31Swqss0WEGA3Zo8AoReLR_C7BRUk4PDmfh-oVVyo,13657706
|
9
|
-
taxcalc/data.py,sha256=
|
10
|
-
taxcalc/decorators.py,sha256=
|
9
|
+
taxcalc/data.py,sha256=gCdPszWUgPP5kCSpsAiL_4ytC6j32TVaiaEqjnqZAgc,11698
|
10
|
+
taxcalc/decorators.py,sha256=C8H4IpdCzioI0-aTCNHVjIxWsGh-_EZWryDEox2Dt1Q,11331
|
11
11
|
taxcalc/growdiff.json,sha256=GCMuFsHv5qP2HBzqiev3CbFJy0BXnhM2ShaPT2QuNTs,14601
|
12
12
|
taxcalc/growdiff.py,sha256=Q3St-KPIUN2I_l1S0jwN0yr8O4LuzkNIU-_qbXTkrZw,2977
|
13
13
|
taxcalc/growfactors.csv,sha256=URIGSKApCY4McvdILkCaIm8EhCGEME2Du-ef5Q9c0uE,5134
|
14
|
-
taxcalc/growfactors.py,sha256=
|
14
|
+
taxcalc/growfactors.py,sha256=OrYmlWMQAmoMe5fhgnPJcIdvFs0aDf9JBy2aU7J0kBQ,6576
|
15
15
|
taxcalc/parameters.py,sha256=ObwQMBlPjq3tyNwiR94Nj0zouIVsNaHIho-OQK1RNKg,35966
|
16
|
-
taxcalc/policy.py,sha256=
|
17
|
-
taxcalc/policy_current_law.json,sha256=
|
18
|
-
taxcalc/puf_ratios.csv,sha256=
|
19
|
-
taxcalc/puf_weights.csv.gz,sha256=
|
16
|
+
taxcalc/policy.py,sha256=e24edxUHND-WujHZl_FUp6h9ECgeC3sRu908vom7qjs,9415
|
17
|
+
taxcalc/policy_current_law.json,sha256=_8OHMh4VsK4VJ7LN5aGQX_b_UbimYDqzsEt8P6NZaw4,608288
|
18
|
+
taxcalc/puf_ratios.csv,sha256=Zt7PPQXpjF4gbegML3S0rxP7Egw871qhnIoxu7u6vko,3580
|
19
|
+
taxcalc/puf_weights.csv.gz,sha256=FKlNlk-p9CrTLODkmTitTgg7iBTE4iYMnOd1y9ocuao,13613549
|
20
20
|
taxcalc/records.py,sha256=zz-q7rNFUBqDLaDYjcScfwf22zzSw-XEew00HGWB0Ho,18397
|
21
21
|
taxcalc/records_variables.json,sha256=JQjaXOS-QyJLDMl_3K4WyCNyRmJpxho3vC_gik5g04Y,42681
|
22
|
-
taxcalc/taxcalcio.py,sha256=
|
23
|
-
taxcalc/utils.py,sha256=
|
22
|
+
taxcalc/taxcalcio.py,sha256=TR29dAdYer85Bo8HFljt9dYqsIL7AvmWx0xRe3-ZNpY,38543
|
23
|
+
taxcalc/utils.py,sha256=R12cGWrhVNNxuWfXVVlWiu5FGoxyX9tzrO_iKsW8mjg,63666
|
24
24
|
taxcalc/utilsprvt.py,sha256=iIyWp9-N3_XWjQj2jV2CWnJy7vrNlKB2_vIMwYjgbWY,1323
|
25
25
|
taxcalc/assumptions/ASSUMPTIONS.md,sha256=cFQqWn1nScaladVaQ7xNm1jDY8CsGdLmqZEzUZeRrb8,1917
|
26
26
|
taxcalc/assumptions/README.md,sha256=Ww55r2zH1neoRSl_MawrPmX-ugaztIZ7_ALrquuatdQ,809
|
27
27
|
taxcalc/assumptions/economic_assumptions_template.json,sha256=utMk38GwSQFrkOAtRrDVhMQLpfaZH3JmtTznKX7IouM,2610
|
28
28
|
taxcalc/cli/__init__.py,sha256=cyZ0tdx41j_vV_B6GAkqJmNKKG-B0wUC0ThC75lJlk4,104
|
29
|
-
taxcalc/cli/tc.py,sha256=
|
29
|
+
taxcalc/cli/tc.py,sha256=m8KRiR0sUS3w2q0WhSwowYb-GCzRcbvfqOhc_-GR1OM,18982
|
30
30
|
taxcalc/reforms/2017_law.json,sha256=4QHE3gMKueXD3M97ODqA0LjofXUfSmwVvJA1FLclaqQ,5264
|
31
31
|
taxcalc/reforms/2017_law.out.csv,sha256=nnNKXqY2kof8HC1nnU8srPsvNNepi6ISXQ9OJpQnT7M,473
|
32
32
|
taxcalc/reforms/ARPA.json,sha256=6oGn3pZ4clAhjFHvqpmm7sXcm407Ea_8mjJchSscKpc,3203
|
33
|
-
taxcalc/reforms/ARPA.out.csv,sha256=
|
33
|
+
taxcalc/reforms/ARPA.out.csv,sha256=NBH9eOO_NYmr6FyIHK9AS0paof7o6Rz6AHODvEo-uLU,476
|
34
34
|
taxcalc/reforms/BrownKhanna.json,sha256=yydcFsixV28p1I5uB0VgwJJ5GyGL0JU8K-IUwrPHlzs,964
|
35
35
|
taxcalc/reforms/BrownKhanna.out.csv,sha256=D2pPxtH5RyMnf8wQad3R2W1Uh4ZLXa7MAQ_dQccMkPA,475
|
36
36
|
taxcalc/reforms/CARES.json,sha256=lTAt0waGCgyUZ3ayrBOoiifqJYVgf19JHdqGusg400o,1977
|
@@ -53,7 +53,6 @@ taxcalc/reforms/Trump2016.out.csv,sha256=TXPSVmc3rE-6-RTVjk632A041e3_p8WW6IjoyYi
|
|
53
53
|
taxcalc/reforms/Trump2017.json,sha256=sCaQkvFY66VPQa6GUzKbrsH5R3BxOcBwMuHE9Ypv0HU,1544
|
54
54
|
taxcalc/reforms/Trump2017.out.csv,sha256=By1quzZONFLQGK5E76mbNNFuORZ8aCGHpD1BR5iwTS8,474
|
55
55
|
taxcalc/reforms/cases.csv,sha256=JQ0LSnNeyl6xSgW5mimGUJMr7xwCWTOpiOpfwx2ETsg,570
|
56
|
-
taxcalc/reforms/clp.out.csv,sha256=qSUdI0LoQFGG6h24eT-249pLEqmxmt7TvLrv1HX_y3Y,475
|
57
56
|
taxcalc/reforms/ext.json,sha256=pD8bTjtb7NuYVrOd1IT8pqscKRMX2_5hkrTOQceSiVw,2309
|
58
57
|
taxcalc/reforms/growfactors_ext.csv,sha256=E0szWXtgV5jcpiyvREOz1yXw_poPIBC77bBQI1rlFxM,17733
|
59
58
|
taxcalc/reforms/ptaxes0.json,sha256=QkvqCVkI23sF7FvTHqaUYNpEJYuHNChbKwH0mH7Otp4,1718
|
@@ -75,34 +74,34 @@ taxcalc/reforms/archive/TCJA_Senate_120117.json,sha256=hruGq8bVtJEMmSsOIuTcWiYON
|
|
75
74
|
taxcalc/tests/benefits_expect.csv,sha256=CFpMpg8a-5iNVSRnmCnl9dncwXx6eGn-KSnTJ2GqmS4,4833
|
76
75
|
taxcalc/tests/cmpi_cps_expect.txt,sha256=NCyG3XhgnV8qJe9TaF9l-9yUuwNfANNDvFn1HcSfZ1c,6262
|
77
76
|
taxcalc/tests/cmpi_puf_expect.txt,sha256=dtHBPDY23qttxjQsPpxhLYoUId1tnPZ4uNHx49NlZ0s,6264
|
78
|
-
taxcalc/tests/conftest.py,sha256=
|
77
|
+
taxcalc/tests/conftest.py,sha256=HT5faHHoYgyRzOOyhP1EzUfie7l9TmiBAqgC_y9F0M4,5164
|
79
78
|
taxcalc/tests/cpscsv_agg_expect.csv,sha256=80Sq2GlP2oz4vKJfrarYy4qRGWNxUs7DSBYV2qxesGk,3511
|
80
|
-
taxcalc/tests/puf_var_correl_coeffs_2016.csv,sha256=
|
81
|
-
taxcalc/tests/puf_var_wght_means_by_year.csv,sha256=
|
82
|
-
taxcalc/tests/pufcsv_agg_expect.csv,sha256=
|
83
|
-
taxcalc/tests/pufcsv_mtr_expect.txt,sha256=
|
84
|
-
taxcalc/tests/reforms.json,sha256=
|
85
|
-
taxcalc/tests/reforms_expect.csv,sha256=
|
86
|
-
taxcalc/tests/test_4package.py,sha256=
|
79
|
+
taxcalc/tests/puf_var_correl_coeffs_2016.csv,sha256=lQXyUEa9wAyhUEOtYm5j0p-cnzyswmViCNJwa22hztg,57314
|
80
|
+
taxcalc/tests/puf_var_wght_means_by_year.csv,sha256=ReclabBk9MVO8p1y62h9xNDoFw9anjXe8BmKiFEr0hk,12889
|
81
|
+
taxcalc/tests/pufcsv_agg_expect.csv,sha256=H9TCOhi_EksKNVa-Sp56cMGBxpCAD57xs3CHXzQNhp0,3545
|
82
|
+
taxcalc/tests/pufcsv_mtr_expect.txt,sha256=Y5-4ulrq2QWCceGhCQc60N2ulc7YTq7w-qf11mB74Os,4265
|
83
|
+
taxcalc/tests/reforms.json,sha256=dIP28djWy-fkPRI5gn7oXHLx_-bzB8KMlS77-1x8Ccc,17193
|
84
|
+
taxcalc/tests/reforms_expect.csv,sha256=iIYLn3Ck8UFFcoDikWs1Qq4xEs1_R7ZSKKEQIVgE_18,1363
|
85
|
+
taxcalc/tests/test_4package.py,sha256=bB8aHmeOchYPTdSYrzwQD3X5Gr-FmCdyu0Ykv3SSjaA,3573
|
87
86
|
taxcalc/tests/test_benefits.py,sha256=oaui5mO0TuW8Ht-uxvUCBL5zM3iTENq3Whyf_gEpY1U,3392
|
88
87
|
taxcalc/tests/test_calcfunctions.py,sha256=7uD1EW48TgsEE6pNHIxkXNi9gvZR7dbT7il6jAqgy9s,34653
|
89
|
-
taxcalc/tests/test_calculator.py,sha256=
|
90
|
-
taxcalc/tests/test_compare.py,sha256=
|
88
|
+
taxcalc/tests/test_calculator.py,sha256=ppWmnlNrjlLUjAwgs-hamATH4telAhKWkB6kbx3uNJQ,33672
|
89
|
+
taxcalc/tests/test_compare.py,sha256=W7rcMaCt8l0pmL9QAXdXqnfn6ehtpEoBW2_D82WJs9U,10873
|
91
90
|
taxcalc/tests/test_compatible_data.py,sha256=MP-DZXrBJ_2ftuxHchl3EGOhPnP5pnnrSQOM9POSx0c,13224
|
92
|
-
taxcalc/tests/test_consumption.py,sha256=
|
93
|
-
taxcalc/tests/test_cpscsv.py,sha256=
|
91
|
+
taxcalc/tests/test_consumption.py,sha256=CJ9xWtixcJXSpkVxyBrYC1jjQYGQHifsJ8IL1rK7BIk,6318
|
92
|
+
taxcalc/tests/test_cpscsv.py,sha256=NvHMxem7jloK59VsIoH3A3pr1pfXam54n7S2JTUxI0U,8410
|
94
93
|
taxcalc/tests/test_data.py,sha256=Zwuf23WeaF0N53X0eo3MlnkO2Pn4qqgGNUZPpD8FETc,4461
|
95
|
-
taxcalc/tests/test_decorators.py,sha256=
|
96
|
-
taxcalc/tests/test_growdiff.py,sha256
|
94
|
+
taxcalc/tests/test_decorators.py,sha256=hKM1_X_1U4YOat06UIAfsfbjr0WcDLQhuXhQfjlySr8,10309
|
95
|
+
taxcalc/tests/test_growdiff.py,sha256=-xUv33Bnzl5oB-DaIIkOqZ9375ULNCTrWam9LpvDwI8,3420
|
97
96
|
taxcalc/tests/test_growfactors.py,sha256=L-DQMR2fh_rOQa3Lx1CDVnB2Q73zXUfTYYVunt0heto,2796
|
98
|
-
taxcalc/tests/test_parameters.py,sha256=
|
99
|
-
taxcalc/tests/test_policy.py,sha256=
|
100
|
-
taxcalc/tests/test_puf_var_stats.py,sha256=
|
101
|
-
taxcalc/tests/test_pufcsv.py,sha256=
|
102
|
-
taxcalc/tests/test_records.py,sha256=
|
103
|
-
taxcalc/tests/test_reforms.py,sha256=
|
97
|
+
taxcalc/tests/test_parameters.py,sha256=b_Gzy_23M95CdQV1fSr06bW3cXWcnAN-AgcB10EOxhQ,20612
|
98
|
+
taxcalc/tests/test_policy.py,sha256=rrJlh408be_cP7v6fa-k6hfiRuVH2FAYvGzxjIZAaUE,54902
|
99
|
+
taxcalc/tests/test_puf_var_stats.py,sha256=uZ-UZalpaRKOnaoqUzGo1c7vBnusGkThqTIaVapntvg,7786
|
100
|
+
taxcalc/tests/test_pufcsv.py,sha256=iI35JvKnijHFk5hOwa9qQtl0KtSpIyFjjsSUq4vpJ1o,14456
|
101
|
+
taxcalc/tests/test_records.py,sha256=gYX6kiI4WuJYYv07hDXL1zRISRnySDR3wT_EMUrR6kI,8975
|
102
|
+
taxcalc/tests/test_reforms.py,sha256=HLne537IlqQL_s5dDwkwYBNfurPIs7BhtSJczW0YpBU,15163
|
104
103
|
taxcalc/tests/test_responses.py,sha256=2CkVVdaDNCSALMoUcGgweRlS2tfsK3kXogHtDkZMqJU,1663
|
105
|
-
taxcalc/tests/test_taxcalcio.py,sha256=
|
104
|
+
taxcalc/tests/test_taxcalcio.py,sha256=_2g5vtPRNSVQeArmsioCoHmOkg_jpQ1gscGNNf0pw7E,24051
|
106
105
|
taxcalc/tests/test_utils.py,sha256=hqBVxddwcSP_6dEBccb-FlPMDm68EENzTtFaVVZ8exs,29403
|
107
106
|
taxcalc/validation/CSV_INPUT_VARS.md,sha256=MqlZZGt_a1n8JAU-nY5MjnTmjz1pMOuhtpVYIGUgl38,1433
|
108
107
|
taxcalc/validation/CSV_OUTPUT_VARS.md,sha256=wr8oyCJDXcxl4Lu0H_wMofUQYhEIyHDif6vkbas1FGE,3000
|
@@ -131,9 +130,9 @@ taxcalc/validation/taxsim35/expected_differences/b21-taxdiffs-expect.csv,sha256=
|
|
131
130
|
taxcalc/validation/taxsim35/expected_differences/c17-taxdiffs-expect.csv,sha256=YhgojbLowH3yujdYu7SGkdvBZmTgpugu4wYc1Be069M,1125
|
132
131
|
taxcalc/validation/taxsim35/expected_differences/c18-taxdiffs-expect.csv,sha256=g9J4BPbTySV-h-RcLvReJq9v1jscgiRSSZzi0taEA-k,1225
|
133
132
|
taxcalc/validation/taxsim35/expected_differences/c19-taxdiffs-expect.csv,sha256=Ceh15N_Xr3L7cpYjzGa-8NLCV3obc8PNHEhE5ZxSPhI,1238
|
134
|
-
taxcalc-5.
|
135
|
-
taxcalc-5.
|
136
|
-
taxcalc-5.
|
137
|
-
taxcalc-5.
|
138
|
-
taxcalc-5.
|
139
|
-
taxcalc-5.
|
133
|
+
taxcalc-5.3.0.dist-info/licenses/LICENSE,sha256=m5epLdB-_NXiY7NsEDgcHP4jDtJ4vOlRf5S3Jb-jraY,1299
|
134
|
+
taxcalc-5.3.0.dist-info/METADATA,sha256=5WpnBzwPo1bF_W-T27Mchq5aDITFIF1dMNOLhd2cJ54,3509
|
135
|
+
taxcalc-5.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
136
|
+
taxcalc-5.3.0.dist-info/entry_points.txt,sha256=a3ZE1piRv683p27fOLdWZvVJXESkoslTOp5iXV7uVco,50
|
137
|
+
taxcalc-5.3.0.dist-info/top_level.txt,sha256=Wh8wTDHkA_cm4dn8IoUCviDyGgVQqwEQKPJnl8z6d4c,8
|
138
|
+
taxcalc-5.3.0.dist-info/RECORD,,
|
taxcalc/reforms/clp.out.csv
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
RECID,c00100,standard,c04800,iitax,payrolltax
|
2
|
-
11,30000.00,12400.00,17600.00,114.50,4590.00
|
3
|
-
12,60000.00,12400.00,47600.00,4462.00,9180.00
|
4
|
-
13,460000.00,12400.00,447600.00,133795.00,30414.80
|
5
|
-
21,60000.00,24800.00,35200.00,-3771.00,9180.00
|
6
|
-
22,120000.00,24800.00,95200.00,4924.00,18360.00
|
7
|
-
23,240000.00,24800.00,215200.00,35807.00,36720.00
|
8
|
-
31,30000.00,18650.00,11350.00,-4543.93,4590.00
|
9
|
-
32,60000.00,18650.00,41350.00,880.00,9180.00
|
10
|
-
33,120000.00,18650.00,101350.00,13537.00,18360.00
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|