[codex] Add opt-in cliff impact outputs#377
Merged
Merged
Conversation
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.
Closes #376
Summary
cliff_gap,is_on_cliff, andis_adultonly when cliff impacts are requestedinclude_cliff_impactsinto US and UK reform analysesValidation
ruff check src/policyengine/outputs/cliff_impact.py src/policyengine/outputs/extra_variables.py src/policyengine/outputs/labor_supply_response.py src/policyengine/tax_benefit_models/us/analysis.py src/policyengine/tax_benefit_models/uk/analysis.py tests/test_cliff_impact.py tests/test_cliff_impact_analysis.pypytest tests/test_cliff_impact.py tests/test_cliff_impact_analysis.pypytest tests/test_labor_supply_response.py tests/test_uk_analysis.py tests/test_uk_program_statistics.pyLocal parity note
I also ran an ignored local parity harness against the legacy simulation API with pinned package/data versions. The nonzero sampled cliff case matched exactly:
cliff_gap:3,952,908,577.8710938cliff_share:0.0060240964024626835The parity harness is intentionally not included in this PR because the cliff calculation is slow.