taxcalc 5.0.0__py3-none-any.whl → 5.0.4__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 +1 -1
- taxcalc/calcfunctions.py +260 -244
- taxcalc/calculator.py +4 -3
- taxcalc/consumption.json +0 -16
- taxcalc/growdiff.json +2 -18
- taxcalc/parameters.py +1 -1
- taxcalc/policy.py +8 -0
- taxcalc/policy_current_law.json +761 -62
- taxcalc/records.py +3 -0
- taxcalc/records_variables.json +34 -0
- taxcalc/reforms/ARPA.json +6 -6
- taxcalc/tests/reforms.json +1 -1
- taxcalc/tests/test_calcfunctions.py +94 -17
- taxcalc/tests/test_parameters.py +27 -19
- taxcalc/tests/test_policy.py +1 -1
- {taxcalc-5.0.0.dist-info → taxcalc-5.0.4.dist-info}/METADATA +1 -1
- {taxcalc-5.0.0.dist-info → taxcalc-5.0.4.dist-info}/RECORD +21 -21
- {taxcalc-5.0.0.dist-info → taxcalc-5.0.4.dist-info}/WHEEL +0 -0
- {taxcalc-5.0.0.dist-info → taxcalc-5.0.4.dist-info}/entry_points.txt +0 -0
- {taxcalc-5.0.0.dist-info → taxcalc-5.0.4.dist-info}/licenses/LICENSE +0 -0
- {taxcalc-5.0.0.dist-info → taxcalc-5.0.4.dist-info}/top_level.txt +0 -0
taxcalc/records.py
CHANGED
@@ -305,6 +305,8 @@ class Records(Data):
|
|
305
305
|
self.e00200s *= gfv['AWAGE']
|
306
306
|
self.pencon_p *= gfv['AWAGE']
|
307
307
|
self.pencon_s *= gfv['AWAGE']
|
308
|
+
self.overtime_income *= gfv['AWAGE']
|
309
|
+
self.tip_income *= gfv['AWAGE']
|
308
310
|
self.e00300 *= gfv['AINTS']
|
309
311
|
self.e00400 *= gfv['AINTS']
|
310
312
|
self.e00600 *= gfv['ADIVS']
|
@@ -377,6 +379,7 @@ class Records(Data):
|
|
377
379
|
self.e87530 *= gfv['ATXPY']
|
378
380
|
self.e87521 *= gfv['ATXPY']
|
379
381
|
self.cmbtp *= gfv['ATXPY']
|
382
|
+
self.auto_loan_interest *= gfv['ATXPY']
|
380
383
|
# BENEFITS
|
381
384
|
self.other_ben *= gfv['ABENOTHER']
|
382
385
|
self.mcare_ben *= gfv['ABENMCARE']
|
taxcalc/records_variables.json
CHANGED
@@ -647,6 +647,25 @@
|
|
647
647
|
"desc": "Filing unit's share of total business property owned by the pass-through business",
|
648
648
|
"form": {"2018-20??": "specified in custom data"},
|
649
649
|
"availability": ""
|
650
|
+
},
|
651
|
+
|
652
|
+
"auto_loan_interest": {
|
653
|
+
"type": "float",
|
654
|
+
"desc": "Filing unit's interest payments on OBBBA-qualified auto loans",
|
655
|
+
"form": {"2025-20??": "specified in custom data"},
|
656
|
+
"availability": ""
|
657
|
+
},
|
658
|
+
"overtime_income": {
|
659
|
+
"type": "float",
|
660
|
+
"desc": "Filing unit's OBBBA-qualified overtime income",
|
661
|
+
"form": {"2025-20??": "specified in custom data"},
|
662
|
+
"availability": ""
|
663
|
+
},
|
664
|
+
"tip_income": {
|
665
|
+
"type": "float",
|
666
|
+
"desc": "Filing unit's OBBBA-qualified tip income",
|
667
|
+
"form": {"2025-20??": "specified in custom data"},
|
668
|
+
"availability": ""
|
650
669
|
}
|
651
670
|
},
|
652
671
|
"calc": {
|
@@ -1130,6 +1149,21 @@
|
|
1130
1149
|
"desc": "search taxcalc/calcfunctions.py for how calculated and used",
|
1131
1150
|
"form": {"2013-20??": "calculated variable"}
|
1132
1151
|
},
|
1152
|
+
"auto_loan_interest_deduction": {
|
1153
|
+
"type": "float",
|
1154
|
+
"desc": "Deduction for payment of qualified auto loan interest",
|
1155
|
+
"form": {"2025-20??": "calculated variable"}
|
1156
|
+
},
|
1157
|
+
"ALD_OvertimeIncome": {
|
1158
|
+
"type": "float",
|
1159
|
+
"desc": "Above-the-line deduction for qualified overtime income",
|
1160
|
+
"form": {"2025-20??": "calculated variable"}
|
1161
|
+
},
|
1162
|
+
"ALD_TipIncome": {
|
1163
|
+
"type": "float",
|
1164
|
+
"desc": "Above-the-line deduction for qualified tip income",
|
1165
|
+
"form": {"2025-20??": "calculated variable"}
|
1166
|
+
},
|
1133
1167
|
"ubi": {
|
1134
1168
|
"type": "float",
|
1135
1169
|
"desc": "Universal Basic Income benefit for filing unit",
|
taxcalc/reforms/ARPA.json
CHANGED
@@ -59,12 +59,12 @@
|
|
59
59
|
"EITC_sep_filers_elig": {"2021": true},
|
60
60
|
"CDCC_c": {"2021": 8000,
|
61
61
|
"2022": 3000},
|
62
|
-
"
|
63
|
-
|
64
|
-
"CDCC_ps2": {"2021": 400000,
|
65
|
-
"2022": 9e+99},
|
66
|
-
"
|
67
|
-
|
62
|
+
"CDCC_ps1": {"2021": 125000,
|
63
|
+
"2022": 15000},
|
64
|
+
"CDCC_ps2": {"2021": [400000, 400000, 400000, 400000, 400000],
|
65
|
+
"2022": [9e+99, 9e+99, 9e+99, 9e+99, 9e+99]},
|
66
|
+
"CDCC_po1_rate_max": {"2021": 0.5,
|
67
|
+
"2022": 0.35},
|
68
68
|
"CDCC_refundable": {"2021": true,
|
69
69
|
"2022": false},
|
70
70
|
"ALD_BusinessLosses_c": {"2026": [283535.22, 567070.42, 283535.22, 283535.22, 567070.42],
|
taxcalc/tests/reforms.json
CHANGED
@@ -16,7 +16,7 @@ from taxcalc import calcfunctions
|
|
16
16
|
|
17
17
|
class GetFuncDefs(ast.NodeVisitor):
|
18
18
|
"""
|
19
|
-
Return information about each function defined in
|
19
|
+
Return information about each function defined in calcfunctions.py file.
|
20
20
|
"""
|
21
21
|
def __init__(self):
|
22
22
|
"""
|
@@ -39,6 +39,8 @@ class GetFuncDefs(ast.NodeVisitor):
|
|
39
39
|
"""
|
40
40
|
visit the specified FunctionDef node
|
41
41
|
"""
|
42
|
+
if node.name == 'SchXYZ':
|
43
|
+
return # skipping SchXYZ function that has multiple returns
|
42
44
|
self.fname = node.name
|
43
45
|
self.fnames.append(self.fname)
|
44
46
|
self.fargs[self.fname] = []
|
@@ -68,6 +70,7 @@ class GetFuncDefs(ast.NodeVisitor):
|
|
68
70
|
self.generic_visit(node)
|
69
71
|
|
70
72
|
|
73
|
+
@pytest.mark.calc_and_used_vars
|
71
74
|
def test_calc_and_used_vars(tests_path):
|
72
75
|
"""
|
73
76
|
Runs two kinds of tests on variables used in the calcfunctions.py file:
|
@@ -92,8 +95,6 @@ def test_calc_and_used_vars(tests_path):
|
|
92
95
|
# .. create set of vars that are actually calculated in calcfunctions.py
|
93
96
|
all_cvars = set()
|
94
97
|
for fname in fnames:
|
95
|
-
if fname == 'BenefitSurtax':
|
96
|
-
continue # because BenefitSurtax is not really a function
|
97
98
|
all_cvars.update(set(cvars[fname]))
|
98
99
|
# .. add to all_cvars set variables calculated in Records class
|
99
100
|
all_cvars.update(set(['num', 'sep', 'exact']))
|
@@ -110,8 +111,7 @@ def test_calc_and_used_vars(tests_path):
|
|
110
111
|
found_error1 = True
|
111
112
|
msg1 += f'VAR NOT CALCULATED: {var}\n'
|
112
113
|
# Test (2):
|
113
|
-
faux_functions = ['EITCamount', '
|
114
|
-
'BenefitSurtax', 'BenefitLimitation', 'SchXYZ']
|
114
|
+
faux_functions = ['EITCamount', 'SchXYZ', 'BenefitPrograms']
|
115
115
|
found_error2 = False
|
116
116
|
msg2 = 'calculated & returned variables are not function arguments\n'
|
117
117
|
for fname in fnames:
|
@@ -157,8 +157,6 @@ def test_function_args_usage(tests_path):
|
|
157
157
|
fname = match.group(1)
|
158
158
|
fargs = match.group(2).split(',') # list of function arguments
|
159
159
|
fbody = match.group(3)
|
160
|
-
if fname == 'Taxes':
|
161
|
-
continue # because Taxes has part of fbody in return statement
|
162
160
|
for farg in fargs:
|
163
161
|
arg = farg.strip()
|
164
162
|
if fbody.find(arg) < 0:
|
@@ -558,6 +556,7 @@ def test_EITC(test_tuple, expected_value, skip_jit):
|
|
558
556
|
|
559
557
|
# Parameter values for tests
|
560
558
|
PT_qbid_rt = 0.2
|
559
|
+
PT_qbid_limited = True
|
561
560
|
PT_qbid_taxinc_thd = [160700.0, 321400.0, 160725.0, 160700.0, 321400.0]
|
562
561
|
PT_qbid_taxinc_gap = [50000.0, 100000.0, 50000.0, 50000.0, 100000.0]
|
563
562
|
PT_qbid_w2_wages_rt = 0.5
|
@@ -579,6 +578,7 @@ e02100 = [0.00, 0.00, 0.00, 0.00]
|
|
579
578
|
e27200 = [0.00, 0.00, 0.00, 0.00]
|
580
579
|
e00650 = [5000.00, 8000.00, 3000.00, 9000.00]
|
581
580
|
c01000 = [7000.00, 4000.00, -3000.00, -3000.00]
|
581
|
+
auto_loan_interest_deduction = [0.00, 0.00, 0.00, 1000.00]
|
582
582
|
PT_SSTB_income = [0, 1, 1, 1]
|
583
583
|
PT_binc_w2_wages = [0.00, 0.00, 0.00, 0.00]
|
584
584
|
PT_ubia_property = [0.00, 0.00, 0.00, 0.00]
|
@@ -588,8 +588,9 @@ qbided = [0.0, 0.0, 0.0, 0.0] # unimportant for function
|
|
588
588
|
tuple0 = (
|
589
589
|
c00100[0], standard[0], c04470[0], c04600[0], MARS[0], e00900[0],
|
590
590
|
c03260[0], e26270[0],
|
591
|
-
e02100[0], e27200[0], e00650[0], c01000[0],
|
592
|
-
|
591
|
+
e02100[0], e27200[0], e00650[0], c01000[0],
|
592
|
+
auto_loan_interest_deduction[0], PT_SSTB_income[0],
|
593
|
+
PT_binc_w2_wages[0], PT_ubia_property[0], PT_qbid_rt, PT_qbid_limited,
|
593
594
|
PT_qbid_taxinc_thd, PT_qbid_taxinc_gap, PT_qbid_w2_wages_rt,
|
594
595
|
PT_qbid_alt_w2_wages_rt, PT_qbid_alt_property_rt, c04800[0],
|
595
596
|
PT_qbid_ps, PT_qbid_prt, qbided[0])
|
@@ -597,8 +598,9 @@ expected0 = (490860.66, 0)
|
|
597
598
|
tuple1 = (
|
598
599
|
c00100[1], standard[1], c04470[1], c04600[1], MARS[1], e00900[1],
|
599
600
|
c03260[1], e26270[1],
|
600
|
-
e02100[1], e27200[1], e00650[1], c01000[1],
|
601
|
-
|
601
|
+
e02100[1], e27200[1], e00650[1], c01000[1],
|
602
|
+
auto_loan_interest_deduction[1], PT_SSTB_income[1],
|
603
|
+
PT_binc_w2_wages[1], PT_ubia_property[1], PT_qbid_rt, PT_qbid_limited,
|
602
604
|
PT_qbid_taxinc_thd, PT_qbid_taxinc_gap, PT_qbid_w2_wages_rt,
|
603
605
|
PT_qbid_alt_w2_wages_rt, PT_qbid_alt_property_rt, c04800[1],
|
604
606
|
PT_qbid_ps, PT_qbid_prt, qbided[1])
|
@@ -606,8 +608,9 @@ expected1 = (284400.08, 4275.02)
|
|
606
608
|
tuple2 = (
|
607
609
|
c00100[2], standard[2], c04470[2], c04600[2], MARS[2], e00900[2],
|
608
610
|
c03260[2], e26270[2],
|
609
|
-
e02100[2], e27200[2], e00650[2], c01000[2],
|
610
|
-
|
611
|
+
e02100[2], e27200[2], e00650[2], c01000[2],
|
612
|
+
auto_loan_interest_deduction[2], PT_SSTB_income[2],
|
613
|
+
PT_binc_w2_wages[2], PT_ubia_property[2], PT_qbid_rt, PT_qbid_limited,
|
611
614
|
PT_qbid_taxinc_thd, PT_qbid_taxinc_gap, PT_qbid_w2_wages_rt,
|
612
615
|
PT_qbid_alt_w2_wages_rt, PT_qbid_alt_property_rt, c04800[2],
|
613
616
|
PT_qbid_ps, PT_qbid_prt, qbided[2])
|
@@ -615,13 +618,13 @@ expected2 = (579300.00, 0)
|
|
615
618
|
tuple3 = (
|
616
619
|
c00100[3], standard[3], c04470[3], c04600[3], MARS[3], e00900[3],
|
617
620
|
c03260[3], e26270[3],
|
618
|
-
|
619
|
-
|
620
|
-
PT_binc_w2_wages[3], PT_ubia_property[3], PT_qbid_rt,
|
621
|
+
e02100[3], e27200[3], e00650[3], c01000[3],
|
622
|
+
auto_loan_interest_deduction[3], PT_SSTB_income[3],
|
623
|
+
PT_binc_w2_wages[3], PT_ubia_property[3], PT_qbid_rt, PT_qbid_limited,
|
621
624
|
PT_qbid_taxinc_thd, PT_qbid_taxinc_gap, PT_qbid_w2_wages_rt,
|
622
625
|
PT_qbid_alt_w2_wages_rt, PT_qbid_alt_property_rt, c04800[3],
|
623
626
|
PT_qbid_ps, PT_qbid_prt, qbided[3])
|
624
|
-
expected3 = (
|
627
|
+
expected3 = (56500.00, 1200)
|
625
628
|
|
626
629
|
|
627
630
|
@pytest.mark.parametrize(
|
@@ -886,3 +889,77 @@ def test_AGI(test_tuple, expected_value, skip_jit):
|
|
886
889
|
test_value = calcfunctions.AGI(*test_tuple)
|
887
890
|
print('Returned from agi function: ', test_value)
|
888
891
|
assert np.allclose(test_value, expected_value)
|
892
|
+
|
893
|
+
|
894
|
+
# parameters for next test
|
895
|
+
e03150 = 0
|
896
|
+
e03210 = 0
|
897
|
+
c03260 = 0
|
898
|
+
e03270 = 0
|
899
|
+
e03300 = 0
|
900
|
+
e03400 = 0
|
901
|
+
e03500 = 0
|
902
|
+
e00800 = 0
|
903
|
+
e03220 = 0
|
904
|
+
e03230 = 0
|
905
|
+
e03240 = 0
|
906
|
+
e03290 = 0
|
907
|
+
care_deduction = 0
|
908
|
+
ALD_StudentLoan_hc = 0
|
909
|
+
ALD_SelfEmp_HealthIns_hc = 0
|
910
|
+
ALD_KEOGH_SEP_hc = 0
|
911
|
+
ALD_EarlyWithdraw_hc = 0
|
912
|
+
ALD_AlimonyPaid_hc = 0
|
913
|
+
ALD_AlimonyReceived_hc = 0
|
914
|
+
ALD_EducatorExpenses_hc = 0
|
915
|
+
ALD_HSADeduction_hc = 0
|
916
|
+
ALD_IRAContributions_hc = 0
|
917
|
+
ALD_DomesticProduction_hc = 0
|
918
|
+
ALD_Tuition_hc = 0
|
919
|
+
MARS = 1
|
920
|
+
earned = 200000
|
921
|
+
overtime_income = 13000
|
922
|
+
ALD_OvertimeIncome_hc = 0.
|
923
|
+
ALD_OvertimeIncome_c = [12500, 25000, 12500, 12500, 12500]
|
924
|
+
ALD_OvertimeIncome_ps = [150000, 300000, 150000, 150000, 150000]
|
925
|
+
ALD_OvertimeIncome_prt = 0.10
|
926
|
+
tip_income = 30000
|
927
|
+
ALD_TipIncome_hc = 0.
|
928
|
+
ALD_TipIncome_c = [25000, 25000, 25000, 25000, 25000]
|
929
|
+
ALD_TipIncome_ps = [150000, 300000, 150000, 150000, 150000]
|
930
|
+
ALD_TipIncome_prt = 0.10
|
931
|
+
c02900 = 0 # calculated in function
|
932
|
+
ALD_OvertimeIncome = 0 # calculated in function
|
933
|
+
ALD_TipIncome = 0 # calculated in function
|
934
|
+
|
935
|
+
tuple0 = (
|
936
|
+
e03150, e03210, c03260,
|
937
|
+
e03270, e03300, e03400, e03500, e00800,
|
938
|
+
e03220, e03230, e03240, e03290, care_deduction,
|
939
|
+
ALD_StudentLoan_hc, ALD_SelfEmp_HealthIns_hc, ALD_KEOGH_SEP_hc,
|
940
|
+
ALD_EarlyWithdraw_hc, ALD_AlimonyPaid_hc, ALD_AlimonyReceived_hc,
|
941
|
+
ALD_EducatorExpenses_hc, ALD_HSADeduction_hc, ALD_IRAContributions_hc,
|
942
|
+
ALD_DomesticProduction_hc, ALD_Tuition_hc,
|
943
|
+
MARS, earned,
|
944
|
+
overtime_income, ALD_OvertimeIncome_hc, ALD_OvertimeIncome_c,
|
945
|
+
ALD_OvertimeIncome_ps, ALD_OvertimeIncome_prt,
|
946
|
+
tip_income, ALD_TipIncome_hc, ALD_TipIncome_c,
|
947
|
+
ALD_TipIncome_ps, ALD_TipIncome_prt,
|
948
|
+
c02900, ALD_OvertimeIncome, ALD_TipIncome
|
949
|
+
)
|
950
|
+
ovr = 12500 - (200000 - 150000) * 0.10
|
951
|
+
tip = 25000 - (200000 - 150000) * 0.10
|
952
|
+
c02900 = 0 + ovr + tip
|
953
|
+
expected0 = (c02900, ovr, tip)
|
954
|
+
|
955
|
+
|
956
|
+
@pytest.mark.parametrize(
|
957
|
+
'test_tuple,expected_value', [(tuple0, expected0)]
|
958
|
+
)
|
959
|
+
def test_Adj(test_tuple, expected_value, skip_jit):
|
960
|
+
"""
|
961
|
+
Tests the Adj function ALD_OvertimeIncome and ALD_TipIncome code
|
962
|
+
"""
|
963
|
+
test_value = calcfunctions.Adj(*test_tuple)
|
964
|
+
print('Returned from Adj function: ', test_value)
|
965
|
+
assert np.allclose(test_value, expected_value)
|
taxcalc/tests/test_parameters.py
CHANGED
@@ -323,10 +323,17 @@ class ArrayParams(Parameters):
|
|
323
323
|
}
|
324
324
|
}
|
325
325
|
},
|
326
|
-
"
|
326
|
+
"EIC": {
|
327
327
|
"type": "str",
|
328
328
|
"validators": {
|
329
|
-
"choice": {
|
329
|
+
"choice": {
|
330
|
+
"choices": [
|
331
|
+
"0kids",
|
332
|
+
"1kid",
|
333
|
+
"2kids",
|
334
|
+
"3+kids"
|
335
|
+
]
|
336
|
+
}
|
330
337
|
}
|
331
338
|
}
|
332
339
|
},
|
@@ -344,23 +351,24 @@ class ArrayParams(Parameters):
|
|
344
351
|
}
|
345
352
|
},
|
346
353
|
"one_dim": {
|
347
|
-
"title": "One
|
354
|
+
"title": "One dimensional parameter",
|
348
355
|
"description": "",
|
349
356
|
"type": "float",
|
350
357
|
"indexed": True,
|
351
358
|
"indexable": True,
|
352
359
|
"value": [{"year": 2013, "value": 5}]
|
353
360
|
},
|
354
|
-
"
|
355
|
-
"title": "Two
|
361
|
+
"EITC_c": {
|
362
|
+
"title": "Two dimensional parameter",
|
356
363
|
"description": "",
|
357
364
|
"type": "float",
|
358
365
|
"indexed": True,
|
359
366
|
"indexable": True,
|
360
367
|
"value": [
|
361
|
-
{"year": 2013, "
|
362
|
-
{"year": 2013, "
|
363
|
-
{"year": 2013, "
|
368
|
+
{"year": 2013, "EIC": "0kids", "value": 1},
|
369
|
+
{"year": 2013, "EIC": "1kid", "value": 2},
|
370
|
+
{"year": 2013, "EIC": "2kids", "value": 3},
|
371
|
+
{"year": 2013, "EIC": "3+kids", "value": 4}
|
364
372
|
]
|
365
373
|
},
|
366
374
|
"II_brk2": {
|
@@ -454,21 +462,21 @@ def test_expand_2d_short_array():
|
|
454
462
|
"""
|
455
463
|
One of several _expand_?D tests.
|
456
464
|
"""
|
457
|
-
val = np.array([1., 2., 3.])
|
465
|
+
val = np.array([1., 2., 3., 4.])
|
458
466
|
exp2 = np.array([val * math.pow(1.02, i) for i in range(1, 5)])
|
459
|
-
exp1 = np.array([1., 2., 3.])
|
460
|
-
exp = np.zeros((5,
|
467
|
+
exp1 = np.array([1., 2., 3., 4.])
|
468
|
+
exp = np.zeros((5, 4))
|
461
469
|
exp[:1] = exp1
|
462
470
|
exp[1:] = exp2
|
463
471
|
|
464
472
|
params = ArrayParams(array_first=False, label_to_extend=None)
|
465
473
|
years = [2013, 2014, 2015, 2016, 2017]
|
466
474
|
params.extend(
|
467
|
-
params=["
|
475
|
+
params=["EITC_c"],
|
468
476
|
label="year",
|
469
477
|
label_values=years,
|
470
478
|
)
|
471
|
-
res = params.to_array("
|
479
|
+
res = params.to_array("EITC_c", year=years)
|
472
480
|
assert np.allclose(exp, res, atol=0.01, rtol=0.0)
|
473
481
|
|
474
482
|
|
@@ -476,8 +484,8 @@ def test_expand_2d_variable_rates():
|
|
476
484
|
"""
|
477
485
|
One of several _expand_?D tests.
|
478
486
|
"""
|
479
|
-
ary = np.array([[1., 2., 3.]])
|
480
|
-
cur = np.array([1., 2., 3.])
|
487
|
+
ary = np.array([[1., 2., 3., 4.]])
|
488
|
+
cur = np.array([1., 2., 3., 4.])
|
481
489
|
irates = [0.02, 0.02, 0.02, 0.03, 0.035]
|
482
490
|
exp2 = []
|
483
491
|
for i in range(0, 4):
|
@@ -485,16 +493,16 @@ def test_expand_2d_variable_rates():
|
|
485
493
|
cur = np.array(cur * (1.0 + irates[idx]))
|
486
494
|
print('cur is ', cur)
|
487
495
|
exp2.append(cur)
|
488
|
-
exp1 = np.array([1., 2., 3.])
|
489
|
-
exp = np.zeros((5,
|
496
|
+
exp1 = np.array([1., 2., 3., 4.])
|
497
|
+
exp = np.zeros((5, 4))
|
490
498
|
exp[:1] = exp1
|
491
499
|
exp[1:] = exp2
|
492
500
|
|
493
501
|
params = ArrayParams(array_first=False, label_to_extend=None)
|
494
502
|
params._inflation_rates = irates
|
495
503
|
years = [2013, 2014, 2015, 2016, 2017]
|
496
|
-
params.extend(params=["
|
497
|
-
res = params.to_array("
|
504
|
+
params.extend(params=["EITC_c"], label="year", label_values=years)
|
505
|
+
res = params.to_array("EITC_c", year=years)
|
498
506
|
assert np.allclose(exp, res, atol=0.01, rtol=0.0)
|
499
507
|
|
500
508
|
|
taxcalc/tests/test_policy.py
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
taxcalc/__init__.py,sha256=
|
2
|
-
taxcalc/calcfunctions.py,sha256=
|
3
|
-
taxcalc/calculator.py,sha256=
|
1
|
+
taxcalc/__init__.py,sha256=IYwOoMZnXFQN_dE2QawoaMF8n0DDN3PawRou9l9Xn6A,536
|
2
|
+
taxcalc/calcfunctions.py,sha256=dzq0-HmNh9OO024z7tPelbYm07T1Uqksajvk2o-fukk,132371
|
3
|
+
taxcalc/calculator.py,sha256=6FZ0Y1BjxGjvyx4X-z1tTNfWKgdVczchk7K6RS_4ikk,64159
|
4
4
|
taxcalc/conftest.py,sha256=nO4J7qu1sTHgjqrzhpRMvfMJUrNm6GP_IsSuuDt_MeQ,141
|
5
|
-
taxcalc/consumption.json,sha256=
|
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
9
|
taxcalc/data.py,sha256=QRyLsq250OsxUIjsuCFtREJsVyEOGaivwcON3teivMI,11698
|
10
10
|
taxcalc/decorators.py,sha256=EwyVH4fSDf8x_BHzccf4-DRopo6KMVidYSYZFy_dJy0,11307
|
11
|
-
taxcalc/growdiff.json,sha256=
|
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
14
|
taxcalc/growfactors.py,sha256=dW71yYKhFDbFtGpBT-kZBqY4MV7IswKcNI3_c-X_Nfg,6525
|
15
|
-
taxcalc/parameters.py,sha256=
|
16
|
-
taxcalc/policy.py,sha256=
|
17
|
-
taxcalc/policy_current_law.json,sha256=
|
15
|
+
taxcalc/parameters.py,sha256=ObwQMBlPjq3tyNwiR94Nj0zouIVsNaHIho-OQK1RNKg,35966
|
16
|
+
taxcalc/policy.py,sha256=x_CL_okaGW5Tr_O4aDHvzaxjkPtqcaF91MHR70gHMq4,8809
|
17
|
+
taxcalc/policy_current_law.json,sha256=dbikS1nr6MqjrDuw6lCn7cT3xFbPeNcqR3ZnOFuzsrY,607611
|
18
18
|
taxcalc/puf_ratios.csv,sha256=USMM79UEX8PnSKY_LYLxvACER_9NHyj4ipNEk2iyykQ,3580
|
19
19
|
taxcalc/puf_weights.csv.gz,sha256=35iZhzFO0dHUI2zf4_liyk60E-3Sgr_AbxszGxw7LfM,13522484
|
20
|
-
taxcalc/records.py,sha256=
|
21
|
-
taxcalc/records_variables.json,sha256=
|
20
|
+
taxcalc/records.py,sha256=zz-q7rNFUBqDLaDYjcScfwf22zzSw-XEew00HGWB0Ho,18397
|
21
|
+
taxcalc/records_variables.json,sha256=8CPtJ8C5BMIciidH4mPUim2CmA6anYlcHoA9BWT5jUo,42514
|
22
22
|
taxcalc/taxcalcio.py,sha256=_ylnC-dZUpDFn79F8pjkZEq-wJhPCQA7Ig9SRLyhrUA,37691
|
23
23
|
taxcalc/utils.py,sha256=Wsvni2UP7WgnByN4bRIiLGgamDFwfQoexiy420o6ewY,63666
|
24
24
|
taxcalc/utilsprvt.py,sha256=iIyWp9-N3_XWjQj2jV2CWnJy7vrNlKB2_vIMwYjgbWY,1323
|
@@ -29,7 +29,7 @@ taxcalc/cli/__init__.py,sha256=cyZ0tdx41j_vV_B6GAkqJmNKKG-B0wUC0ThC75lJlk4,104
|
|
29
29
|
taxcalc/cli/tc.py,sha256=hGkP-XHkvx0MoFdHf-BjUnKqAxQBRtk8Vv4uqtIGuRY,18760
|
30
30
|
taxcalc/reforms/2017_law.json,sha256=SglDU_h4Ol8sBi92B8T-ToOF1eDbp-5WtLrYNIIYkEk,5188
|
31
31
|
taxcalc/reforms/2017_law.out.csv,sha256=nnNKXqY2kof8HC1nnU8srPsvNNepi6ISXQ9OJpQnT7M,473
|
32
|
-
taxcalc/reforms/ARPA.json,sha256=
|
32
|
+
taxcalc/reforms/ARPA.json,sha256=6oGn3pZ4clAhjFHvqpmm7sXcm407Ea_8mjJchSscKpc,3203
|
33
33
|
taxcalc/reforms/ARPA.out.csv,sha256=qSUdI0LoQFGG6h24eT-249pLEqmxmt7TvLrv1HX_y3Y,475
|
34
34
|
taxcalc/reforms/BrownKhanna.json,sha256=yydcFsixV28p1I5uB0VgwJJ5GyGL0JU8K-IUwrPHlzs,964
|
35
35
|
taxcalc/reforms/BrownKhanna.out.csv,sha256=D2pPxtH5RyMnf8wQad3R2W1Uh4ZLXa7MAQ_dQccMkPA,475
|
@@ -81,11 +81,11 @@ taxcalc/tests/puf_var_correl_coeffs_2016.csv,sha256=2VtWUcTaE6c5cmmEDylv9XKVONLT
|
|
81
81
|
taxcalc/tests/puf_var_wght_means_by_year.csv,sha256=nou_pIKICyXmCfyj_UziNXp1EB4BQU7Qa-ZvqlE1WqM,20049
|
82
82
|
taxcalc/tests/pufcsv_agg_expect.csv,sha256=n3fmYQtpv7RClTyGsJ4ehFJzFexQA4Lp1jrbAuBcEK8,2117
|
83
83
|
taxcalc/tests/pufcsv_mtr_expect.txt,sha256=xGsUfafzsZ04fFQw162ys-1Mf1CDC_PQ0QZNigS07VY,4265
|
84
|
-
taxcalc/tests/reforms.json,sha256=
|
84
|
+
taxcalc/tests/reforms.json,sha256=JOzgOi3DGAGXLslWZtxWPe81UfvDR73OPe1t-MPAXeE,17097
|
85
85
|
taxcalc/tests/reforms_expect.csv,sha256=DJRO1LF8n6CX5viq3-uufqBF19hlVcqSq0T3EYgQQas,1363
|
86
86
|
taxcalc/tests/test_4package.py,sha256=1qhmDS3bdfNHNgz4pggaE6LduT3KKUtOsdtqP3QSIYQ,3601
|
87
87
|
taxcalc/tests/test_benefits.py,sha256=oaui5mO0TuW8Ht-uxvUCBL5zM3iTENq3Whyf_gEpY1U,3392
|
88
|
-
taxcalc/tests/test_calcfunctions.py,sha256=
|
88
|
+
taxcalc/tests/test_calcfunctions.py,sha256=l6uzU1sToOhVOSKrjQMGJ3j4GNTdGgo0JDFrza7-nlw,34269
|
89
89
|
taxcalc/tests/test_calculator.py,sha256=JTbaQ9rndIB7WylQE4inLvd7CazH4Vdnb0h7IRDtN3Q,33653
|
90
90
|
taxcalc/tests/test_compare.py,sha256=WglH4ZJOEQnav_mAmnGjpb7dooXcQsB1m04hgQeoBUQ,10873
|
91
91
|
taxcalc/tests/test_compatible_data.py,sha256=MP-DZXrBJ_2ftuxHchl3EGOhPnP5pnnrSQOM9POSx0c,13224
|
@@ -95,8 +95,8 @@ taxcalc/tests/test_data.py,sha256=Zwuf23WeaF0N53X0eo3MlnkO2Pn4qqgGNUZPpD8FETc,44
|
|
95
95
|
taxcalc/tests/test_decorators.py,sha256=F31pt1S7jIgkgV62xMC-poWRzG7fzYVOJes9tOoCF40,10232
|
96
96
|
taxcalc/tests/test_growdiff.py,sha256=vXZTgPJTUi25mZrfmTPErytSC69Bs_36ydrQmWxgm9g,3420
|
97
97
|
taxcalc/tests/test_growfactors.py,sha256=L-DQMR2fh_rOQa3Lx1CDVnB2Q73zXUfTYYVunt0heto,2796
|
98
|
-
taxcalc/tests/test_parameters.py,sha256=
|
99
|
-
taxcalc/tests/test_policy.py,sha256=
|
98
|
+
taxcalc/tests/test_parameters.py,sha256=G5mTb2ZQksVGEv8MoO2Fwt12ZJYzk7_-yGT-A-fhBkM,20420
|
99
|
+
taxcalc/tests/test_policy.py,sha256=B0Zple7HXAfi0ZhIyJhst05WB5DH60qoHyaIRR_Ar0Q,55547
|
100
100
|
taxcalc/tests/test_puf_var_stats.py,sha256=TG-sQtOkR6cBOw0am7MUsMSwjPxVdkvt0Xov342oii8,7786
|
101
101
|
taxcalc/tests/test_pufcsv.py,sha256=rxPaxA-SCAwaLy3jSnplvy_3dH8MQ-UKDSJnYZNhjzo,14434
|
102
102
|
taxcalc/tests/test_records.py,sha256=ncswnbCY7vZgJ_h6xwql4oFw-jZG2gWOMWvEJC2_jdc,8827
|
@@ -131,9 +131,9 @@ taxcalc/validation/taxsim35/expected_differences/b21-taxdiffs-expect.csv,sha256=
|
|
131
131
|
taxcalc/validation/taxsim35/expected_differences/c17-taxdiffs-expect.csv,sha256=YhgojbLowH3yujdYu7SGkdvBZmTgpugu4wYc1Be069M,1125
|
132
132
|
taxcalc/validation/taxsim35/expected_differences/c18-taxdiffs-expect.csv,sha256=g9J4BPbTySV-h-RcLvReJq9v1jscgiRSSZzi0taEA-k,1225
|
133
133
|
taxcalc/validation/taxsim35/expected_differences/c19-taxdiffs-expect.csv,sha256=Ceh15N_Xr3L7cpYjzGa-8NLCV3obc8PNHEhE5ZxSPhI,1238
|
134
|
-
taxcalc-5.0.
|
135
|
-
taxcalc-5.0.
|
136
|
-
taxcalc-5.0.
|
137
|
-
taxcalc-5.0.
|
138
|
-
taxcalc-5.0.
|
139
|
-
taxcalc-5.0.
|
134
|
+
taxcalc-5.0.4.dist-info/licenses/LICENSE,sha256=m5epLdB-_NXiY7NsEDgcHP4jDtJ4vOlRf5S3Jb-jraY,1299
|
135
|
+
taxcalc-5.0.4.dist-info/METADATA,sha256=AHnmkhxWqvjOpjHD5pJqTGY8sV7BNoc3UQuQc9_X0FQ,3677
|
136
|
+
taxcalc-5.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
137
|
+
taxcalc-5.0.4.dist-info/entry_points.txt,sha256=a3ZE1piRv683p27fOLdWZvVJXESkoslTOp5iXV7uVco,50
|
138
|
+
taxcalc-5.0.4.dist-info/top_level.txt,sha256=Wh8wTDHkA_cm4dn8IoUCviDyGgVQqwEQKPJnl8z6d4c,8
|
139
|
+
taxcalc-5.0.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|