Repository navigation
Remove household_options from the country metadata - #4210
Merged
Merged
Conversation
Revert the merge of #4159 (a69c6e2), which added household_options.time_period to /{country}/metadata. No client reads it, and household and society-wide calculations will offer the same years per country, from economy_options.time_period. This removes policyengine_api/household_years.py, build_household_options in country.py, certified_spm_forecast_years in spm.py and their tests. household_years.py held the package's only static import of policyengine_us, so the declared-dependencies check found its DEP003 baseline entry unused: remove it, lower the rule's baseline count to 15 and regenerate docs/generated/rules.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4210 +/- ##
==========================================
- Coverage 92.14% 92.12% -0.03%
==========================================
Files 297 296 -1
Lines 16673 16652 -21
Branches 2719 2712 -7
==========================================
- Hits 15364 15341 -23
- Misses 792 798 +6
+ Partials 517 513 -4
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:
|
Brings in the move to PolicyEngine .py 6.12.1 (#4163), so the bundle check matches the simulation API's latest again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk
marked this pull request as ready for review
November 6, 2026 13:37
anth-volk
added a commit
that referenced
this pull request
Nov 6, 2026
Brings in #4163, which moves the PolicyEngine bundle to 6.12.1 to match the simulation API, and #4210. The merge has no conflicts; a fresh render leaves the generated rules unchanged, uv lock --check (uv 0.13.4) passes, and make quality passes on the merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was previously deployed
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.
Fixes #4209
Summary
/{country}/metadatano longer hashousehold_options. This reverts #4159 (merge commit a69c6e2), which addedhousehold_options.time_period: the years offered for household calculations, separate fromeconomy_options.time_period. No client reads it.Why: the maintainer decided on 4–5 November 2026 that US 2022 and 2023 are dropped everywhere, and that household and society-wide calculations share one list of years per country, starting in 2024 for the US. With one list, a separate household list has no purpose. The pull request stacked on this one defines each country's years once and uses them for
economy_options.time_period.policyengine_api/country.py:build_metadatano longer addshousehold_options, andbuild_household_optionsis removed.economy_optionsis unchanged.policyengine_api/household_years.py: removed (us_household_years).policyengine_api/spm.py:certified_spm_forecast_yearsis removed. Onlybuild_household_optionsused it.tests/unit/test_household_options.pyand the threecertified_spm_forecast_yearstests intests/unit/test_spm_settings.pyare removed with the code they tested.household_years.pyheld the package's only static import ofpolicyengine_us(spm.pyloads it withimportlib, which deptry doesn't read). Without it, thedeclared-dependenciesquality guard failed with "baseline entry no longer applies: DEP003 policyengine_us". This removes that entry fromrules/baselines/deptry.txt, lowers the count ofapi.dependencies.declared-and-usedinrules/registry.tomlfrom 16 to 15, and regeneratesdocs/generated/rules.md. These files are rule machinery, so a core developer other than the author needs to approve them (api.process.rule-machinery-code-owned).changelog.d/remove-household-options.removed.md. The 5.22.0 entry inCHANGELOG.mdthat announcedhousehold_optionsstays as history. Add household_options.time_period to the country metadata #4159's own fragment was already released, so the revert had no fragment to remove.No other file mentions
household_options,household_years,us_household_years,certified_spm_forecast_yearsorbuild_household_options, includingrules/registry.toml,docs/generated/rules.md, and the import-linter and deptry settings inpyproject.toml. The only remaining match is the 5.22.0 entry inCHANGELOG.md.Testing
This pull request adds and changes no test. It only removes the tests of the removed code: the nine tests in
tests/unit/test_household_options.py, andtests/unit/test_spm_settings.py::test_certified_forecast_years_are_the_artifacts_years,::test_certified_forecast_years_are_none_without_a_certified_forecastand::test_certified_forecast_years_are_none_when_the_forecast_cannot_load. So no test was run locally; CI runs the suite.uv run --frozen --extra dev ruff format --checkandruff checkonpolicyengine_api/country.py,policyengine_api/spm.pyandtests/unit/test_spm_settings.py: pass (ruff 0.15.12, the versionuv.lockpins).python scripts/run_quality_guards.py: every guard passes. Before the baseline change,declared-dependenciesfailed as described above.BASE_SHA=origin/master bash .github/scripts/check_changelog_fragment.sh: "This pull request adds 1 changelog fragment".Environment variables
No environment variables are added, removed or changed.
🤖 Generated with Claude Code