-
Notifications
You must be signed in to change notification settings - Fork 187
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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
policyengine_us/parameters/gov/states/il/dhs/aabd/asset/disregard/additional.yaml
Outdated
Show resolved
Hide resolved
policyengine_us/parameters/gov/states/il/dhs/aabd/asset/vehicle_exemption/amount.yaml
Outdated
Show resolved
Hide resolved
policyengine_us/parameters/gov/states/il/dhs/aabd/asset/vehicle_exemption/count.yaml
Outdated
Show resolved
Hide resolved
policyengine_us/parameters/gov/states/il/dhs/aabd/asset/vehicle_exemption/count.yaml
Outdated
Show resolved
Hide resolved
policyengine_us/parameters/gov/states/il/dhs/aabd/income/exemption/blind.yaml
Show resolved
Hide resolved
policyengine_us/parameters/gov/states/il/dhs/aabd/income/exemption/flat.yaml
Outdated
Show resolved
Hide resolved
policyengine_us/parameters/gov/states/il/dhs/aabd/payment/area/area_1.yaml
Outdated
Show resolved
Hide resolved
policyengine_us/parameters/gov/states/il/dhs/aabd/payment/area/area_2.yaml
Outdated
Show resolved
Hide resolved
...riables/gov/states/il/dhs/aabd/income/earned/il_aabd_earned_income_after_exemption_person.py
Outdated
Show resolved
Hide resolved
"https://www.law.cornell.edu/regulations/illinois/Ill-Admin-Code-tit-89-SS-113.125", | ||
) | ||
|
||
# def formula(person, period, parameters): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove if not relevant
There was a problem hiding this comment.
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
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
policyengine_us/variables/gov/states/il/dhs/aabd/asset/il_aabd_asset_eligible.py
Outdated
Show resolved
Hide resolved
...ngine_us/tests/policy/baseline/gov/states/il/dhs/aabd/payment/il_aabd_utility_allowance.yaml
Show resolved
Hide resolved
output: | ||
il_aabd_area: AREA_2 | ||
|
||
# - name: Case 3, default in area 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is commented?
There was a problem hiding this comment.
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.
policyengine_us/parameters/gov/states/il/dhs/aabd/payment/utility/water.yaml
Outdated
Show resolved
Hide resolved
policyengine_us/parameters/gov/states/il/dhs/aabd/payment/utility/utility_types.yaml
Show resolved
Hide resolved
...s/variables/gov/states/il/dhs/aabd/eligibility/il_aabd_immigration_status_eligible_person.py
Show resolved
Hide resolved
...s/variables/gov/states/il/dhs/aabd/eligibility/il_aabd_immigration_status_eligible_person.py
Show resolved
Hide resolved
policyengine_us/parameters/gov/states/il/dhs/aabd/income/sources/unearned.yaml
Show resolved
Hide resolved
policyengine_us/parameters/gov/states/il/dhs/aabd/income/sources/unearned.yaml
Show resolved
Hide resolved
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) |
There was a problem hiding this comment.
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
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 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]) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
person.spm_unit("housing_cost", period) * MONTHS_IN_YEAR | |
person.spm_unit("housing_cost", period) |
Fixes #5844