Repository navigation
Remove the unused economy comparison module - #3936
Merged
Merged
Conversation
anth-volk
added this pull request to stack #3917
October 14, 2026 21:56
anth-volk
force-pushed
the
remove-economy-comparison
branch
4 times, most recently
from
October 15, 2026 00:06
a6b3066 to
8887f8e
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
2 times, most recently
from
October 15, 2026 15:45
89149d0 to
f7e306d
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
from
October 15, 2026 17:21
f7e306d to
8e75b50
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
2 times, most recently
from
October 16, 2026 06:00
9bf8980 to
ba5d037
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
2 times, most recently
from
October 16, 2026 06:45
dbf072d to
554a3d8
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
4 times, most recently
from
October 19, 2026 13:39
315d39f to
b0509e1
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
3 times, most recently
from
October 19, 2026 18:48
0312903 to
bdd6308
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
from
October 19, 2026 19:14
bdd6308 to
62bc929
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
from
October 19, 2026 21:42
cf3f89a to
7e4a8f5
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
from
October 20, 2026 12:36
7e4a8f5 to
50f2364
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
from
October 20, 2026 12:42
50f2364 to
2882578
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
from
October 20, 2026 14:00
2882578 to
07e7bf7
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
from
October 20, 2026 16:31
07e7bf7 to
e083b9a
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
from
October 20, 2026 18:01
e083b9a to
00cb62f
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
4 times, most recently
from
October 21, 2026 15:49
1f375ec to
8fe1310
Compare
anth-volk
force-pushed
the
remove-economy-comparison
branch
2 times, most recently
from
October 21, 2026 21:53
9767392 to
e5f3835
Compare
policyengine_api/services/economy_comparison.py has had no caller in the package since #2569 removed the Public API's own society-wide simulations; only its tests and snapshot data used it. Remove the module, its unit and snapshot tests, and the route-boundary test that checked it stayed out of the HTTP layer. api.routes.no-domain-logic-in-http now covers the calculation route alone, and a docstring that pointed at the module now points at the codebase's other Pydantic models. Nothing in the package imports microdf any more, but microdf_python stays declared; removing an unused dependency is a separate cleanup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk
force-pushed
the
remove-economy-comparison
branch
from
October 21, 2026 22:31
e5f3835 to
f953ff1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3936 +/- ##
==========================================
- Coverage 87.86% 87.72% -0.15%
==========================================
Files 259 258 -1
Lines 16149 15864 -285
Branches 2630 2594 -36
==========================================
- Hits 14190 13917 -273
+ Misses 1283 1280 -3
+ Partials 676 667 -9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch was successfully 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 #3935
Summary
Stacked on #3934.
policyengine_api/services/economy_comparison.pyhas had no caller in the package since #2569, which removed the Public API's own society-wide simulations. This PR removes the module with its unit tests, its snapshot tests and its snapshot data: 915 lines of code, about 1,600 lines of tests and an 8,000-line JSON file.policyengine_apiimports the module. The only other matches foreconomy_comparisonare theeconomy_comparisonreport kind inreport_spec_service.py, which is a string, and a docstring.uk_constituency_breakdownanduk_local_authority_breakdowndownloaded the enhanced FRS constituency and local-authority weight matrices. UK: certify a Microcosm national dataset as the UK default, with separate national and local-area datasets and a corrected local-authority list policyengine.py#553 lists that as a Public API dependency to resolve before a Microcosm UK default.api.routes.no-domain-logic-in-httpdropstest_economy_comparison_logic_is_not_in_the_http_layer, which only checked that the module stayed out of the HTTP layer.AGENTS.mdanddocs/generated/rules.mdare re-rendered.microdf_pythonstays declared, although nothing imports microdf any more. Removing an unused dependency is a separate cleanup; step 2.7's dependency check would flag it.The weighted-microdata rules (step 1.9) are the next PR in the stack. With this module gone, they start enforced with no findings.
Testing
pytest tests/unit: 2,727 passed. The 97 removed tests are exactly the module's unit and snapshot tests, plus the one route-boundary test.uv run --frozen --extra dev mypy: no issues. The module was outside the type-check scope, so the file count is unchanged.python scripts/run_quality_guards.py: migration-contracts, rules-registry and ci-scripts passed.python -m scripts.rules renderleaves no diff, andpython -m scripts.rules guardpasses.ruff check .andruff format --check .(ruff 0.15.12, fromuv.lock) are clean.🤖 Generated with Claude Code