Skip to content

Illinois Aid to the Aged, Blind or Disabled (AABD) #5853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

hua7450
Copy link
Collaborator

@hua7450 hua7450 commented Apr 8, 2025

Fixes #5844

Copy link

codecov bot commented Apr 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.10%. Comparing base (73134e0) to head (e88cc5b).
Report is 21 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #5853    +/-   ##
========================================
  Coverage   99.09%   99.10%            
========================================
  Files        2775     2798    +23     
  Lines       40101    40453   +352     
  Branches      179      180     +1     
========================================
+ Hits        39740    40090   +350     
- Misses        327      328     +1     
- Partials       34       35     +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Copy link
Collaborator

@PavelMakarchuk PavelMakarchuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some formatting for the parameters

@hua7450 hua7450 requested a review from PavelMakarchuk April 14, 2025 20:09
"https://www.law.cornell.edu/regulations/illinois/Ill-Admin-Code-tit-89-SS-113.125",
)

# def formula(person, period, parameters):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove if not relevant

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets make a list for exemptions:

state_withheld_income_tax
employee_social_security_tax
il_aabd_child_care_expense_exemption

Leave the other as comments

Crease il_aabd_child_care_expense_exemption.py use childcare_expenses

Comment on lines +22 to +30
expense_types = p.utility.utility_types
sum_of_allowances = sum(
[
p.utility[expense.replace("_expense", "")][area][capped_size]
for expense in expense_types
]
) # a household may not have all of the expenses, at this point, I summed all of them

return sum_of_allowances
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we not just get the breakdown parameter by area and unit size here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list contains all possible utilities, such as bottled gas, coal, cooking fuel, fuel oil, metered gas, and it's super unlikely that a single household would use all those utility types at once.

output:
il_aabd_area: AREA_2

# - name: Case 3, default in area 1.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is commented?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test case causes an interesting error: when I intentionally omit county_str as an input, the output is AREA_6, which is weird because I set the default value to AREA_1.

@hua7450 hua7450 self-assigned this Apr 15, 2025
blind = person("is_blind", period)
disabled = person("is_ssi_disabled", period)
elderly_or_disabled = elderly | disabled
income_after_flat_exemption = max_(adjust_income - p.flat, 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the flat amount is subtracted from earned and unearned income lets make the sequential:

il_aabd_gross_unearned_income.py
il_aabd_countable_unearned_income.py (less the flat exemption)
il_aabd_flat_exemption_excess_over_unearned_income.py

Since unearned income does not have any other deductions it will be allocated optimally

Suggested change
income_after_flat_exemption = max_(adjust_income - p.flat, 0)
flat_exemption_excess = person("il_aabd_flat_exemption_excess_over_unearned_income", period)
income_after_flat_exemption = max_(adjust_income - flat_exemption_excess, 0)

period: month
label: Illinois AABD active applicant personal allowance
reference:
- title: WAG 11-01-01:Personal Allowance
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- title: WAG 11-01-01:Personal Allowance
# DHS legal code version displays the personal allowance as once value
# allowance type is not unconditional
- title: WAG 11-01-01:Personal Allowance

size = person.spm_unit("spm_unit_size", period)
capped_size = clip(size, 1, 8)
is_bedfast = person("il_aabd_is_bedfast", period)
return where(is_bedfast, p.bedfast[capped_size], p.active[capped_size])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets make this amount * unit size
Legal code is very ambiguous here but o3 thinks the same:
https://chatgpt.com/c/680179b4-7640-8011-b2f3-a9243590ae90

def formula(person, period, parameters):
p = parameters(period).gov.states.il.dhs.aabd.payment.shelter_allowance
rent_expense = person("rent", period) * MONTHS_IN_YEAR
is_rent = rent_expense > 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
is_rent = rent_expense > 0
renter = rent_expense > 0


def formula(person, period, parameters):
p = parameters(period).gov.states.il.dhs.aabd.payment.shelter_allowance
rent_expense = person("rent", period) * MONTHS_IN_YEAR
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rent_expense = person("rent", period) * MONTHS_IN_YEAR
rent_expense = person("rent", period)

is_rent = rent_expense > 0
rent_allowance = min_(rent_expense, p.rent)
homestead_property_cost = (
person.spm_unit("housing_cost", period) * MONTHS_IN_YEAR
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
person.spm_unit("housing_cost", period) * MONTHS_IN_YEAR
person.spm_unit("housing_cost", period)

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.

Illinois Aid to the Aged, Blind, and Disabled (AABD)
2 participants