Skip to content

Refactor TaxInc function to mirror Form 8995/8995-A line structure#3041

Merged
martinholmer merged 1 commit into
PSLmodels:masterfrom
martinholmer:TaxInc-review
May 10, 2026
Merged

Refactor TaxInc function to mirror Form 8995/8995-A line structure#3041
martinholmer merged 1 commit into
PSLmodels:masterfrom
martinholmer:TaxInc-review

Conversation

@martinholmer
Copy link
Copy Markdown
Collaborator

Adds banner section comments mirroring Form 8995 / Form 8995-A (2025):
pre-QBID taxinc (line 11/33) → QBI build (line 1c/2) → Parts II/III
W-2/UBIA cap and SSTB phase-in (with the four sub-cases
SSTB-above-upper, non-SSTB-above-upper, non-SSTB-in-phase-in, and
SSTB-in-phase-in labeled and annotated against Sch A's applicable %
and Part III line 26) → Part IV income limitation (line 36/14) →
reform-only QBID phase-out → reform-only minimum-floor → Form 1040
line 15. Per-line annotations added (Form 8995 line 5 / 8995-A line 3,
line 21 lower threshold, line 23 gap, lines 5/9/10 wage/alt/full cap,
line 12/34 net_cg, line 14/36 income cap).

Renames local pre_qbid_taxinc_gap to gap and hoists gap /
upper_thd once. Inline-labels each odeds summand with its Sch 1-A
Part. Docstring rewritten to cite Form 8995 / Form 8995-A (2025) and
Form 1040 lines 13-15, document the simplified-vs-full threshold
dichotomy and the four phase-in sub-cases, list QBI components and the
wage/investment exclusion, flag reform-only switches (PT_qbid_limited,
PT_qbid_ps/_prt, PT_qbid_min_qbi/_min_ded), document the Sch 1-A odeds
inclusion in pre-QBID taxinc, and tie each parameter to its form
line. Stale "2018 Pub 535 Worksheet 12-A" comments dropped.

Signature, parameter ordering, and return tuple unchanged.
No formula changes; behavior preserved.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8500f12) to head (0cb5a49).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #3041   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines         2721      2721           
=========================================
  Hits          2721      2721           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@martinholmer martinholmer merged commit e1c690c into PSLmodels:master May 10, 2026
9 checks passed
@martinholmer martinholmer deleted the TaxInc-review branch May 10, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant