Skip to content

Commit 78f646b

Browse files
committed
Refactor OH TANF structure and simplify income aggregation
**Structure Improvements:** - Organize variables into eligibility/ and income/ subfolders - Organize parameters into income/deductions/ subfolder - Follows pattern from PA TANF implementation (PR #6764) **Simplifications:** - Remove state-specific earned income variable - Remove income/earned.yaml parameter list - Directly aggregate employment_income + self_employment_income - Use federal tanf_gross_unearned_income variable - Update parameter path: income.deductions.earned_income_disregard **Files Deleted:** - oh_tanf_gross_earned_income.py (no longer needed) - income/earned.yaml (use federal sources directly) **Files Moved:** Variables: - oh_tanf_eligible.py → eligibility/ - oh_tanf_income_eligible.py → eligibility/ - oh_tanf_countable_income.py → income/ Parameters: - earned_income_disregard.yaml → income/deductions/ All 63 tests still passing.
1 parent 42ed87c commit 78f646b

File tree

7 files changed

+15
-32
lines changed

7 files changed

+15
-32
lines changed

policyengine_us/parameters/gov/states/oh/odjfs/tanf/income/earned.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

policyengine_us/variables/gov/states/oh/odjfs/tanf/oh_tanf_countable_income.py renamed to policyengine_us/variables/gov/states/oh/odjfs/tanf/income/oh_tanf_countable_income.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,34 @@ class oh_tanf_countable_income(Variable):
1414
)
1515

1616
def formula(spm_unit, period, parameters):
17-
# Get gross earned income
18-
gross_earned = spm_unit("oh_tanf_gross_earned_income", period)
17+
person = spm_unit.members
18+
19+
# Get gross earned income - aggregate from federal sources
20+
gross_earned = spm_unit.sum(
21+
person("employment_income", period)
22+
+ person("self_employment_income", period)
23+
)
1924

2025
# Apply earned income disregard: $250 + 50% of remainder
2126
# ORC 5107.10(D)(3) specifies "the two hundred-fifty dollar and
2227
# one-half of the remainder disregards"
23-
p = parameters(period).gov.states.oh.odjfs.tanf.earned_income_disregard
24-
flat_disregard = p.flat_amount
28+
p = parameters(period).gov.states.oh.odjfs.tanf.income.deductions
29+
disregard = p.earned_income_disregard
30+
flat_disregard = disregard.flat_amount
2531

2632
# Calculate remainder after flat disregard
2733
remainder = max_(gross_earned - flat_disregard, 0)
2834

2935
# Apply percentage disregard to remainder
30-
percent_disregarded = remainder * p.percent_of_remainder
36+
percent_disregarded = remainder * disregard.percent_of_remainder
3137

3238
# Countable earned income = gross - flat disregard - percent of remainder
3339
countable_earned = max_(
3440
gross_earned - flat_disregard - percent_disregarded, 0
3541
)
3642

37-
# Get gross unearned income
43+
# Get gross unearned income from federal variable
3844
# Per ORC 5107.10(D)(3): "No disregards apply to gross unearned income"
39-
person = spm_unit.members
4045
gross_unearned = spm_unit.sum(
4146
person("tanf_gross_unearned_income", period)
4247
)

policyengine_us/variables/gov/states/oh/odjfs/tanf/oh_tanf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ def formula(spm_unit, period, parameters):
2929
# Apply minimum benefit threshold
3030
# Per OAC 5101:1-23-40: "OWF shall not be authorized when the
3131
# amount is at least $1 but less than $10 per month"
32-
p = parameters(period).gov.states.oh.odjfs.tanf
33-
minimum_benefit = p.minimum_benefit
32+
minimum_benefit = parameters(
33+
period
34+
).gov.states.oh.odjfs.tanf.minimum_benefit
3435

3536
# If benefit is positive but below minimum, set to zero
3637
benefit_meets_minimum = (benefit >= minimum_benefit) | (benefit <= 0)

policyengine_us/variables/gov/states/oh/odjfs/tanf/oh_tanf_gross_earned_income.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)