Add end-to-end regression test for bus_fare_spending in the dataset#431
Open
vahid-ahmadi wants to merge 3 commits into
Open
Add end-to-end regression test for bus_fare_spending in the dataset#431vahid-ahmadi wants to merge 3 commits into
vahid-ahmadi wants to merge 3 commits into
Conversation
generate_lcfs_table is unit-tested to compute bus_fare_spending, but nothing checked it survives the QRF predict + enhanced-dataset assembly/save into the published dataset — and it currently doesn't (issue #430): every other consumption output lands, bus_fare_spending is dropped downstream. Add an end-to-end test asserting the enhanced dataset carries a populated bus_fare_spending column. Marked xfail so it is mergeable and documents the gap; it will XPASS once the pipeline is fixed. Refs #430. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tic, to revert) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an end-to-end regression test asserting the enhanced dataset actually contains a populated
bus_fare_spendingcolumn. Markedxfail(see #430).Why
bus_fare_spendingis imputed (#428) but missing from the published dataset (1.56.3) — even though the build installspolicyengine-uk==2.89.1(the version that defines the variable) and every other consumption output lands. The existing unit test only coversgenerate_lcfs_table(which correctly computes the column); nothing checked it survives the QRF predict + enhanced-dataset assembly/save. This adds that missing coverage.How it pins the stage
test_lcfs_consumption_ingestion(existing) passes → the column is built correctly ingenerate_lcfs_table.Together they bracket the bug to downstream of
generate_lcfs_table(QRF train/predict or the clone/calibrate/save assembly).Mergeable by design
xfail(strict=False)so CI stays green and the PR is mergeable; it documents the known gap and will XPASS once the pipeline is fixed — the signal to remove the marker and make it a hard assertion. Locally it skips when the dataset isn't present; in CI's build job it runs against the freshly built dataset.Tracks #430. Follow-up: find and fix the downstream drop, then convert this to a strict assertion.
🤖 Generated with Claude Code