Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Remove the unused economy comparison module

Aperta
#3,935 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@anth-volk ci sta già lavorando.

Dal 14/10/2026.

  • #3936 di @anth-volk — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
18/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start with policyengine_api/services/economy_comparison.py and grep the repo for imports of it, then review its unit and snapshot tests and the snapshot data. Check the api.routes.no-domain-logic-in-http rule so only the economy comparison node is dropped. Done means the module, its tests and snapshots are gone and the test suite still passes. Pull request #3936 is already open against this issue, so review it rather than starting a parallel change.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

policyengine_api/services/economy_comparison.py (915 lines) has had no caller in the package since #2569, which removed the Public API's own society-wide simulations. Only its own unit and snapshot tests use it: about 1,600 lines of tests, plus an 8,000-line snapshot file.

It still carries code that other work has to account for:

  • The enhanced FRS weight matrix. uk_constituency_breakdown and uk_local_authority_breakdown download it from Hugging Face. PolicyEngine/policyengine.py#553 lists that as a Public API dependency to resolve before the UK default moves to a Microcosm dataset.
  • The only microdf use in the package. The weighted-microdata rules (step 1.9) would otherwise guard and baseline code that never runs.
  • Rules for dead code. A route-boundary rule (api.routes.no-domain-logic-in-http) checks that the module stays out of the HTTP layer.

Proposal

Remove the module, its unit and snapshot tests, and the snapshot data.

  • api.routes.no-domain-logic-in-http keeps its calculation-route check and drops the economy comparison node.
  • microdf_python stays declared. Removing a dependency nothing imports is a separate cleanup, which the dependency check planned for step 2.7 would flag.
Lingua principale
Python
Stelle
18
Fork
33
Merge medio
1g 18h
PR unite (30g)
23

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/policyengine-api

Tutte le issue di PolicyEngine/policyengine-api

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.