Repository navigation
Clarify bottled gas coverage and fuel levelling requirements - #2643
Conversation
vahid-ahmadi
left a comment
There was a problem hiding this comment.
@juaristi22 thanks, this is right on the data, and it is the pe-uk fix I asked for in item 8 of my microcosm#1383 review. First, an admission.
Our #2635 is wrong on the liquid fuel point, and I will get it corrected. #2635 (mine, in the merge queue) rewrites liquid_fuel_consumption to say it "excludes liquefied petroleum gas", and its body says Microcosm keeps bottled gas (b018, c45222) in the housing remainder. That describes Microcosm main, which writes no liquid_fuel_consumption column at all (b018 and c45222 sit in UK_LCFS_OTHER_FUEL_PARTS, the housing remainder). The only producer of the column is microcosm#1383, and at its head (e570d65) UK_LCFS_FUEL_PARTS["liquid_fuel_consumption"] is ("b017", "c45312", "b018", "c45222"), pinned by test_the_heating_fuels_are_the_declared_diary_parts and your ruling of 22 October. My own round 1 review of #1383 (item 8) said the column holds LPG, so #2635 contradicted our earlier finding. The COICOP part of #2635 (LPG is 04.5.2) is right; the claim about what the input holds is not. #2635 needs taking out of the queue and its liquid fuel half (the variable, the test docstring and comment, the uprating_indices.yaml comment and half of the changelog) dropped, keeping only the Widowed Parent's Allowance fix. Then your text stands and the two do not collide.
What I checked at 93c1508:
- COICOP 2018 on the UN pages you cite (all three return 200): 04.5.2 Gas includes "liquefied hydrocarbons (butane, propane, etc.)" (04.5.2.2), and 04.5.3 Liquid fuels lists "domestic heating, lighting and cooking fuel oils" and excludes "liquefied hydrocarbons (04.5.2.2)". So "04.5.3 and part of 04.5.2" is the right description of oil, paraffin and bottled gas.
f3bd0b42, the commit your body cites, is in #1383's history, andUK_LCFS_FUEL_PARTSis unchanged from it to the current head. Your levelling wording matches #1383's comment andsources.yamlnote ("neither heating-fuel column is levelled to ONS ... a costing on either needs levelling to ONS first").- No formula reads either input: outside tests they appear only in their own definitions and in the CPI list in
uprating_indices.yaml. Theuprating_indices.yamlcomment anddocs/book/assumptions/growthfactors.mdalready say "heating oil, LPG, coal and wood", which agrees with this PR. pytest test_heating_fuel_inputs.py test_energy_dataset_projection.py test_parameter_descriptions.py: 78 passed. The fragment is.changed, socheck_fix_pr.pyneeds noReproducer:line;axiom: n/ais fine.
Findings
- should
liquid_fuel_consumption.py:14-15,solid_fuel_consumption.py:13-14: "Microcosm's frame includes bottled gas and does not level this column" is in the present tense, but no released Microcosm writes either column yet; that arrives with the release built from microcosm#1383. A pe-uk release carrying this text will very likely ship first, and a reader would take it as true of the current dataset, which is the same kind of slip I made in #2635 in the other direction. Please tie it to the producer, for example "Microcosm releases built from microcosm#1383 include bottled gas in this column and do not level it to ONS Consumer Trends 04.5.3".
Merge order: #2635 is in the queue ahead of this and touches the same hunks in liquid_fuel_consumption.py and test_heating_fuel_inputs.py with the opposite text. If it lands before it is pulled, this PR will need a rebase, and the uprating_indices.yaml comment from #2635 would need putting back to "LPG". The fix belongs on our side, so you should not need to do anything.
Commenting rather than approving because of item 1 and because the Python shards were still running at review time. Happy to approve once item 1 is in.
🤖 Generated with Claude Code
Microcosm maps liquid_fuel_consumption to LCF parts that include bottled gas, so main's text was right; #2643 documents it. Keep the WPA fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Aggregate impact on certified data: passBase Checks: 0 broken by this change, 1 failing on both sides, 0 fixed. Moves flagged for review: 0 (thresholds in Notes
Moves flagged for reviewNone. Spending by benefit and service
Caseloads
Standard reform costings (change in gov_balance)
Standard reforms: change in each reform's target
Household net income by decileNo household's net income changes in any year. No change in any year: receipts by tax head; government balance, each component counted once; model totals; household income totals; population; poverty rates; people in poverty; inequality; mean household net income in each side's own deciles. Checks failing on both base and head (1)
Counted-once checkEach of 87 components was raised by £1 per unit in 2026-27, and every head of its totals was read household by household: its own head must rise by exactly £1, no other tax head may move, no other benefit may rise, and the model's own total must move by what its heads moved. A head that breaks a rule is measured again twice: with every other head held at its baseline value, and with every other head held at its value after the first £1 while the component rises again. It fails where either still shows the response. 0 failed; 0 were skipped.
Provenance
Dataset: Receipts by tax head: head levels
Spending by benefit and service: head levels
Caseloads: head levels
Government balance, each component counted once: head levels
Model totals: head levels
Household income totals: head levels
Population: head levels
Poverty rates: head levels
People in poverty: head levels
Inequality: head levels
Mean household net income in each side's own deciles: head levels
Standard reform costings (change in gov_balance): head levels
Standard reforms: change in each reform's target: head levels
|
93c1508 to
c04bf05
Compare
|
Addressed the remaining item in c04bf05. Should-address fixedBoth fuel descriptions now qualify the producer statement to Microcosm releases built from the linked #1383. They retain the bottled-gas classification, separate bottled-gas levelling requirement and the caveat that no model formula reads either input. Verification
The full model suite and documentation build were not repeated locally; final-head CI is running. @vahid-ahmadi, please re-review this head when its checks finish. |
|
@juaristi22 thanks, this is my round 2 at Round 1
New findings None. What I ran
Verdict: no open items from me. This is ready to merge as far as I am concerned. 🤖 Generated with Claude Code |
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Approving at c04bf05; see the round 2 comment above.
🤖 Generated with Claude Code
Fixes #2642
The liquid-fuel input includes bottled gas, which COICOP classifies under 04.5.2 (gas). Correct its documentation to cover heating oil, paraffin and bottled gas, and explain why its scope exceeds ONS Consumer Trends 04.5.3.
Both fuel descriptions now tie the producer claim to Microcosm releases built from Microcosm #1383. Those releases provide the liquid- and solid-fuel columns without levelling them to ONS totals. A costing needs that levelling first, accounting for bottled gas separately. The qualification distinguishes those releases from earlier datasets that do not contain the columns.
Neither input currently feeds a model formula. Add the official UN classification references and correct the existing test module's introductory wording. Formulas, defaults and uprating remain unchanged. The producer contract was checked against Microcosm #1383 at
f3bd0b42b148be99e7a239806001f6d49289c726, and Vahid confirmed the mapping at its merged heade570d65ffdd70a668de16667c0502ff61429c75a.axiom: n/a: consumption input documentation and references only; no policy calculation changes.
Validation at
c04bf05b294fcc06d4bfaf2e02999d0ec138e368, rebased on mainadbaa87d797b2083bc3f7266fa9d5f7f3364042f:uv run --frozen --no-sync make format: formatting and lint passed before the clean rebase; all 1,935 files were unchanged.uv sync --frozen --extra devafter the rebase, followed byuv run --frozen --no-sync pytest policyengine_uk/tests/test_heating_fuel_inputs.py policyengine_uk/tests/test_energy_dataset_projection.py policyengine_uk/tests/test_parameter_descriptions.py -q: 78 passed in 68.62s.git diff --checkpassed.No local documentation build or full model suite was repeated for this metadata and prose correction. Final-head CI supplies those broader checks.