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 16 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
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

amount:
1991-01-01: 128
- threshold:
1991-01-01: 25 # In legal code it is 100 hours, we use weekly hours worked so divide by 4
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
1991-01-01: 25 # In legal code it is 100 hours, we use weekly hours worked so divide by 4
1991-01-01: 25 # 100 hours worked monthly

Comment on lines +9 to +10
# DHS legal code version displays the personal allowance as once value
# allowance type is not unconditional
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
# DHS legal code version displays the personal allowance as once value
# allowance type is not unconditional
# DHS legal code version displays the personal allowance as an aggregate value
# allowance type is conditional

If it conditional (or not unconditional) - do we need to split it out then?

from policyengine_us.model_api import *


class il_aabd_countable_vehicles_value(Variable):
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
class il_aabd_countable_vehicles_value(Variable):
class il_aabd_countable_vehicle_value(Variable):

value_type = bool
entity = SPMUnit
definition_period = MONTH
label = "Whether the household has essential use vehicle under the Illinois Aid to the Aged, Blind or Disabled (AABD)"
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
label = "Whether the household has essential use vehicle under the Illinois Aid to the Aged, Blind or Disabled (AABD)"
label = "Whether the household has a vehicle which is considered essential under the Illinois Aid to the Aged, Blind or Disabled (AABD)"

entity = Person
label = "Illinois Aid to the Aged, Blind or Disabled (AABD) total needs"
unit = USD
definition_period = MONTH
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you leave a reference here?

from policyengine_us.model_api import *


class il_aabd_total_needs(Variable):
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
class il_aabd_total_needs(Variable):
class il_aabd_need_standard_person(Variable):

class il_aabd_total_needs(Variable):
value_type = float
entity = Person
label = "Illinois Aid to the Aged, Blind or Disabled (AABD) total needs"
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
label = "Illinois Aid to the Aged, Blind or Disabled (AABD) total needs"
label = "Illinois Aid to the Aged, Blind or Disabled (AABD) need standard for each person"

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
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
) # a household may not have all of the expenses, at this point, I summed all of them
)

capped_size = clip(size, 1, 19)
area = person.household("il_aabd_area", period)
expense_types = p.utility.utility_types
sum_of_allowances = sum(
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
sum_of_allowances = sum(
# Households may have more than one applicable utility allowance type
sum_of_allowances = sum(

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