Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fix-codehealth-ar-sra-wa-wccc.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed two code-health regressions on main: precompute per-person arrays in `ar_sra_countable_income` (replaces `sum()` over an entity-variable generator), and switch `wa_wccc_provider_type.defined_for` from `"wa_wccc_eligible_child"` to `StateCode.WA` so an input variable no longer carries a non-geographic gate.
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ def formula(spm_unit, period, parameters):
# FSU §4.3.2 excludes children's SSI and Social Security; mask by adult status.
person = spm_unit.members
is_adult = person("age", period.this_year) >= p.eligibility.adult_age_threshold
per_person_income = sum(person(source, period) for source in p.income.sources)
per_person_components = [person(source, period) for source in p.income.sources]
per_person_income = sum(per_person_components)
return spm_unit.sum(per_person_income * is_adult)
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class wa_wccc_provider_type(Variable):
default_value = WAWCCCProviderType.CENTER
definition_period = MONTH
label = "Washington WCCC child care provider type"
defined_for = "wa_wccc_eligible_child"
defined_for = StateCode.WA
reference = (
"https://app.leg.wa.gov/wac/default.aspx?cite=110-15-0200",
"https://app.leg.wa.gov/wac/default.aspx?cite=110-15-0205",
Expand Down
Loading