Repository navigation
Conversation
…p-utility-providers
Replace the shared electricity and natural gas provider inputs with id_liheap_electricity_provider and id_liheap_natural_gas_provider, enums in the Idaho LIHEAP folder that list only the companies the Idaho heating matrix distinguishes. The matrix and estimated-cost formulas read them. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11054 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 4 +3
Lines 24 95 +71
=========================================
+ Hits 24 95 +71
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ider tests - Three provider matrix files: bare date keys, key comments and `breakdown` metadata whose ranges match the stored areas. No value changes. - northern_electric_providers: state why Lamb Creek Trailer Park is omitted and use one title for the chart PDF. estimated_heating_costs names the "Utah Power & Light" column. - Tests: id_liheap Cases 15-22 use counties each utility serves, drop a duplicate case and add the Intermountain, OTHER and unreported gas choices; id_liheap_estimated_heating_cost Case 6 covers the six provider cost cells. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
PavelMakarchuk
left a comment
There was a problem hiding this comment.
#11054: Use named utility provider columns in Idaho LIHEAP heating
Verdict: APPROVE (head c23fab3c80)
The head did not move during the review. The head commit is a merge of main, from 2026-11-23, 3:15pm EST.
Summary
The PR adds id_liheap_electricity_provider and id_liheap_natural_gas_provider. It also adds three chart columns from the PY26 Benefit Determination Chart (Avista and Northern Utilities electric, Rocky Mountain Power electric, Avista gas), the matching PY2007 heating-cost estimates, and a list of northern electric companies. id_liheap and id_liheap_estimated_heating_cost select the column and the cost from the reported company. Blank chart cells, OTHER and UNSPECIFIED fall back to the Idaho Power and Intermountain Gas columns, so a household that reports no company keeps its current result. Every new value matches the source documents. Tests pass and CI is green.
Findings
CRITICAL
None.
SHOULD ADDRESS
None.
SUGGESTION
- Lamb Creek Trailer Park is left out of the northern group.
policyengine_us/parameters/gov/states/id/dhw/liheap/payment/northern_electric_providers.yaml:6-8says so. Appendix C lists it with the northern utilities. A household on that system that reports OTHER gets the Idaho Power column. Failure case: a one-person Area II household with $14,000 of income gets $394 (Idaho Power, medium burden), not $402 (northern, high burden). The comment explains the choice, and the group is very small. Optional: add aLAMB_CREEKchoice, or keep the comment. - A misspelled list member would fail silently.
id_liheap.py:40-42andid_liheap_estimated_heating_cost.pycompare the list withdecode_to_str()throughnp.isin. If a list member does not match an enum name, that company falls back to the Idaho Power column with no error. Case 21 tests all seven added companies, so this risk is covered today. Optional: add a small check that each list member is a member ofIDLIHEAPElectricityProvider.
What I checked
-
Head and state. The head is
c23fab3c80. It mergesmainatb3edc0446b(the current tip). A merge withmainis clean. GitHub reports MERGEABLE, BLOCKED (review needed). No other open PR touches the Idaho LIHEAP folders. -
PY26 Benefit Determination Chart (page 1), fetched through the Wayback copy because the liheapch.acf.gov certificate chain fails. Every new cell matches:
- Avista and Northern Utilities: Area I $322 / $335 / $348; Area II $371 / $387 / $402.
- Rocky Mountain Power: Area II $407 / $424 / $441; Area III $461 / $481 / $500.
- Avista gas: Area I $168 / $176 / $183; Area II $194 / $203 / $211.
The order is low, medium, high, which is groups 1 to 3 in the parameters. The chart leaves northern Area III, Rocky Mountain Power Area I and Avista gas Area III blank, as the PR says.
-
Appendix C (PY07), archived copy. Avista gas $875 (I) and $1,200 (II). Northern Utilities $1,450 (I) and $1,585 (II). Utah Power and Light $1,692 (II) and $1,836 (III). All match
estimated_heating_costs.yaml. The northern footnote names AVISTA, Bonners Ferry, Plummer, Clearwater Power, Idaho County Power and Light, Inland Light and Power, Kootenai Electric, Lamb Creek Trailer Park and Northern Lights. That is the PR list plus Lamb Creek. The southern footnote names Fall River, Lower Valley, Idaho Falls and others. These fall back to the Idaho Power column through OTHER, which is correct. -
Utility names. The OEMR utility directory (200) lists Bonners Ferry Light and Water, Clearwater Power, Idaho County Light and Power, Kootenai Electric Cooperative, Northern Lights Incorporated and Plummer Electric Department. Inland Power and Light is not in it. The PR cites inlandpower.com for that company (200).
-
Formula,
id_liheap.py:34-59andid_liheap_estimated_heating_cost.py. The provider masks are vectorized. The index expressionsmin_(area, 2)andmax_(area, 2)stay inside each parameter's breakdown, because the masks requirearea < 3orarea > 1. In the cost variable, the masks use the raw area, but the lookup uses the clipped area, and the finalwheresets an unknown area (0) to $0. SOLAR uses the electric column, as before. A period before 2025-10-01 (2025) still computes. I checked a northern company there: $402. -
Tests. At the head, the Idaho LIHEAP folder passes (73 tests). On
main, it passes (64 tests). -
Hand-computed cases (2026, one person, $14,000 of countable income, eligibility set to true):
- Kootenai County, Idaho Power: cost $1,455 < 11% of income ($1,540), so medium burden, $394.
- Kootenai County, Kootenai Electric: cost $1,585 ≥ $1,540, so high burden, $402. The company changes the burden group.
- Bonneville County (Area III), Northern Lights: blank cell, so Idaho Power Area III, cost $1,605, high burden, $464.
- Ada County (Area I), Rocky Mountain Power: blank cell, so Idaho Power Area I, cost $1,335, medium burden, $342.
- Bonneville County, gas, Avista: blank cell, so Intermountain Area III, cost $1,207, $166.
- Latah County (Area I), solar heat, Clearwater Power: northern Area I, cost $1,450, medium burden, $335.
All six results match.
-
Format and changelog.
ruff format --checkandruff checkpass on the four changed Python files. The fragmentchangelog.d/id-liheap-utility-providers.added.mdis top level and the type is valid. -
CI. All 42 checks pass, including codecov patch and project.
-
Partner tests. No file under
tests/policy/baseline/partners/changes.
Not verified
- The accepted FY2027 Idaho plan (sections 2.5-2.6). The Wayback copy returns 404, and the direct link fails on the certificate chain. The PR cites it only in the body, for the statement that no FY2027 chart exists.
- Whether Idaho still uses the PY2007 heating costs and the northern-group membership today. Idaho publishes no current source. The PR and the parameter comments state this limit.
- Microsimulation impact. The defaults are UNSPECIFIED, so I expect no change. CI Microsimulation passes.
Idaho's PY26 Benefit Determination Chart pays different heating amounts by utility: "AVISTA & Northern Utilities", "Idaho Power & Southern Utilities" and "Rocky Mountain Power" for electric heat, and "Avista" and "Intermountain Gas" for gas heat. The model pays the Idaho Power and Intermountain Gas columns to everyone. This PR adds inputs for the household's electricity and natural gas companies and uses them to select the chart column and the matching heating-cost estimate, which sets the energy-burden group.
Fixes #11224
Changes
id_liheap_electricity_providerandid_liheap_natural_gas_provider, enum inputs in the Idaho LIHEAP folder, each withOTHERandUNSPECIFIED(the default).matrix/electricity_northern.yaml,matrix/electricity_rocky_mountain.yaml,matrix/natural_gas_avista.yaml) and the matching provider rows inestimated_heating_costs.yaml.northern_electric_providers.yaml: the companies that use the "AVISTA & Northern Utilities" column. One list feeds both formulas.id_liheapandid_liheap_estimated_heating_costselect the column from the reported company.IDAHO_POWER,INTERMOUNTAIN_GAS,OTHERandUNSPECIFIEDkeep the Idaho Power and Intermountain Gas columns, so a household that reports no company keeps its current result.Example
A one-person electric-heat household in heating Area II with a high energy burden, before any target-household bonus:
Where the choices come from
OTHERand uses the Idaho Power column.Limitations
verified_yearsis unchanged.Tests
id_liheap.yamlCases 15-22: every published cell of the three new columns, a household whose burden group changes with the company's cost estimate, the three blank-cell pairs, all seven added northern companies withOTHERandUNSPECIFIED, the Intermountain Gas andOTHERgas choices, and a gas-heated household whose electric company is Avista.id_liheap_estimated_heating_cost.yamlCase 6: the six provider cost cells and one blank-cell pair.The cases were not run locally after these changes; CI runs them.
Sources
axiom: needed
🤖 Generated with Claude Code