diff --git a/taxcalc/tests/test_records.py b/taxcalc/tests/test_records.py index 656257dc6..26ba172f7 100644 --- a/taxcalc/tests/test_records.py +++ b/taxcalc/tests/test_records.py @@ -178,46 +178,6 @@ def test_default_rates_and_those_implied_by_blowup_factors(puf_1991): assert_array_equal(wage_growth_rates[1:], policy._wage_growth_rates[1:-1]) -def test_var_labels_txt_contents(tests_path): - """ - Check that every Records variable used by taxcalc is in var_labels.txt - and that all variables in var_labels.txt are used by taxcalc. - """ - # read variables in var_labels.txt file (checking for duplicates) - var_labels_path = os.path.join(tests_path, '..', 'var_labels.txt') - var_labels_set = set() - with open(var_labels_path, 'r') as varlabels: - msg = 'DUPLICATE VARIABLE(S) IN VAR_LABELS.TXT:\n' - found_duplicates = False - for line in varlabels: - var = (line.split())[0] - if var in var_labels_set: - found_duplicates = True - msg += 'VARIABLE= {}\n'.format(var) - else: - var_labels_set.add(var) - if found_duplicates: - raise ValueError(msg) - # change all Records.USABLE_READ_VARS variables to uppercase - var_valid_set = set() - for var in Records.USABLE_READ_VARS: - var_valid_set.add(var.upper()) - # check for no extra var_valid variables - valid_less_labels = var_valid_set - var_labels_set - if len(valid_less_labels) > 0: - msg = 'VARIABLE(S) IN USABLE_READ_VARS BUT NOT VAR_LABELS.TXT:\n' - for var in valid_less_labels: - msg += 'VARIABLE= {}\n'.format(var) - raise ValueError(msg) - # check for no extra var_labels variables - labels_less_valid = var_labels_set - var_valid_set - if len(labels_less_valid) > 0: - msg = 'VARIABLE(S) IN VAR_LABELS.TXT BUT NOT USABLE_READ_VARS:\n' - for var in labels_less_valid: - msg += 'VARIABLE= {}\n'.format(var) - raise ValueError(msg) - - def test_csv_input_vars_md_contents(tests_path): """ Check CSV_INPUT_VARS.md contents against Records.USABLE_READ_VARS diff --git a/taxcalc/var_labels.txt b/taxcalc/var_labels.txt deleted file mode 100644 index cdf9c150e..000000000 --- a/taxcalc/var_labels.txt +++ /dev/null @@ -1,83 +0,0 @@ -AGE_HEAD = Age in years of taxpayer (i.e., primary filer) -AGE_SPOUSE = Age in years of spouse (i.e., secondary filer if present) -BLIND_HEAD = zero/one indicator for taxpayer (i.e., primary filer) -BLIND_SPOUSE = zero/one indicator for spouse (i.e., secondary filer if present) -CMBTP = estimate of income included in AMT taxable income but not in AGI -DSI = 1 if taxpayer claimed as a dependent on another tax return; otherwise 0 -E00200 = Salaries, wages, and tips for filing unit -E00200P = Salaries, wages, and tips for taxpayer -E00200S = Salaries, wages, and tips for spouse -E00300 = Interest received -E00400 = Tax-exempt interest -E00600 = Total dividends included in AGI -E00650 = Qualified dividends (a subset of Total dividends) -E00700 = State income tax refunds -E00800 = Alimony received -E00900 = Business or professional net profit/loss (Schedule C) for filing unit -E00900P = Business or professional net profit/loss (Schedule C) for taxpayer -E00900S = Business or professional net profit/loss (Schedule C) for spouse -E01100 = Capital gain distribution (not reported on Schedule D) -E01200 = Other net gain or loss (Form 4797) -E01400 = Taxable IRA distribution -E01500 = Partial total of pensions and annuities (1040 line 16a) -E01700 = Taxable pensions and annuities (1040 line 16b) -E02000 = Schedule E net income or loss -E02100 = Farm net profit or loss for filing unit -E02100P = Farm net profit or loss for taxpayer -E02100S = Farm net profit or loss for spouse -E02300 = Unemployment compensation -E02400 = Gross Social Security Benefits -E03150 = Adjustments: Total deductible IRA payments -E03210 = Adjustments: Student Loan Interest Deduction -E03220 = Adjustments: Educator Exp.s Deduction (new 2002) -E03230 = Adjustments: Tuition and Fees Deduction (new 2002) -E03240 = Domestic Production Activity Deduction (new 2005) -E03270 = Adjustments: Self employed health insurance deduction -E03290 = Health Savings Account Deduction Computer Amount (new 2004) -E03300 = Adjustments: Payments to a KEOGH plan and SEP deduction -E03400 = Adjustments: Forfeited int. penalty- early withdraw of savings -E03500 = Adjustments: Alimony paid -E07240 = Retirement Savings Contribution Credit (new 2002) -E07260 = Residential Energy Credit (new 2006) -E07300 = Foreign tax credit - Form 1116 -E07400 = General business credit -E07600 = Prior year minimum tax credit - Form 8801 -E09700 = Taxes: Recapture tax - Form 4255 -E09800 = Taxes: Social security tax on tip income -E09900 = Taxes: Penalty tax on qualified retirement plans -E11200 = Tax Payment: Excess FICA/RRTA -E17500 = Schedule A: Total medical Exp.s -E18400 = Schedule A: State and local income taxes -E18500 = Schedule A: Real estate tax -E19200 = Schedule A: Total interest deduction -E19800 = Schedule A: Cash contribution -E20100 = Schedule A: Other than cash -E20400 = Schedule A: Total miscellaneous deductions subject to 2% AGI limitation -E20500 = Schedule A: Net casualty or theft loss -E24515 = Schedule D: Un-Recaptured Section 1250 Gain -E24518 = Schedule D: 28% Rate Gain or Loss (new 2003) -E26270 = Combined partnership and S corporation net income/loss (+/-) -E27200 = Schedule E: Farm rent net income or loss -E32800 = Form 2441 child/dependent care expense: Qualifying Individual Exp.s -E58990 = Form 4952 investment income elected amount (line 4g) -E62900 = Form 6251: Form 6251 foreign tax credit -E87530 = Lifetime Learning Credit total qualified expenses (Form 8863, line 10) -EIC = Earned Income Credit code: categorical variable -ELDERLY_DEPENDENT = 1 if unit has elderly dependent; 0 if no elderly dependent -F2441 = Form 2441 number of Child Care Credit qualified individuals -F6251 = Form 6251, Alternative Minimum Tax, attached to return or not -FILER = zero/one indicator for filing unit being in the IRS-SOI PUF sample -FLPDYR = Filing (accounting) period (i.e., tax year) -MARS = Marital (filing) status: categorical variable -MIDR = Married filing separately itemized deductions requirement indicator -N24 = Number of children eligible for Child Tax Credit -NU13 = Number of dependents under 13 -NU05 = Number of dependents under 5 -P08000 = Other tax credits -P22250 = Schedule D: Short-term gains less losses -P23250 = Schedule D: Long-term gains less losses -P25470 = Schedule E: Royalty depletion and/or rental depreciation -P87521 = American Opportunity Credit total tentative amount (Form 8863, line 1) -RECID = ID for filing unit -S006 = Sample weight for filing unit -XTOT = Total number of exemptions for filing unit