Skip to content

Improve documentation for test of itemized deduction components #2406

Open
@Peter-Metz

Description

@Peter-Metz

In preparing #2404, @MattHJensen and I found that test_itemded_component_amounts() in test_calculator.py could use some improved documentation. This test compares the calculated amount for a component of itemized deductions (for example c17000) with the amount that results from implementing a haircut for the corresponding component (for example ID_Medical_hc). In theory these values should be the same, but in practice there are small discrepancies in some cases:

    if year == 2017 and cvname == 'c19700':
        atol = 0.016
    elif year == 2017 and cvname == 'c19200':
        atol = 0.010
    elif year == 2017 and cvname == 'c18300':
        atol = 0.009
    else:
        atol = 0.00001

where atol is the discrepancy in millions USD. Moving forward, it would be helpful to document why these margin of errors are necessary and why they might change after data updates.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions