Request UK constituency and local-authority impacts separately from the national economy result
I maintainer di solito rispondono entro 3 giorni
Una pull request collegata è già stata integrata.
- #4024 di @anth-volk — integrata
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
Read the annual economy route and its request validation, calculation options and cache key handling, then trace how it builds simulation API requests and handles upstream errors. Check the existing dataset and .py bundle configuration for the requested updates, including the Northern Ireland region mapping. Done means the supported UK requests produce separately cached local-area results and invalid combinations or upstream refusals return the specified errors; coordinate deployment with simulation API change #881 and the app change.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What this is about
.py 6.10.0 runs UK national economy reports on a national dataset (microcosm_uk_2024_25) that has no area codes, so a national run no longer returns constituency or local-authority impacts. The simulation API (PolicyEngine/policyengine-sim-api#881) adds a separate run on the local-area dataset that returns only those impacts. The Public API needs a way to ask for that run.
What changes in the Public API
- The annual economy route,
GET /{country}/economy/{reform}/over/{baseline}, accepts a new optional query parameter,breakdown=local_areas. The budget-window route does not accept it. - The parameter is valid only for the UK, with
regionset toukor a UK country (country/*), and not withtarget=cliff. Any other combination, or any other value, returns HTTP 400. - When the parameter is set, it becomes part of the calculation options, so the request gets its own options hash and its own cached result. Requests without it keep their current options hash and cached results.
- The Public API sends
"breakdown": "local_areas"to the simulation API only when the parameter is set, and stores and returns the result the simulation API sends back (kind: "local_areas", withconstituency_impactandlocal_authority_impact). - If the simulation API refuses a breakdown request with HTTP 400 or 422 (for example, because the deployed .py release cannot run it), the Public API returns a 502 error that says so, instead of a generic 500.
- UK reports for Northern Ireland use
country/niin the Public API's metadata, but .py's region registry names that regioncountry/northern_ireland. The Public API translates the name when it builds the simulation request. - The .py bundle moves from 6.7.5 to 6.10.0 (this replaces #3991), and the reviewed UK default dataset becomes
microcosm_uk_2024_25.
Order of deployment
This change has to merge after the simulation API change (PolicyEngine/policyengine-sim-api#881) is deployed with .py 6.10.0, and after the app change that requests the breakdown is merged.
- Lingua principale
- Python
- Stelle
- 18
- Fork
- 33
- Merge medio
- 2g 18h
- PR unite (30g)
- 36
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PolicyEngine/policyengine-api
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
PolicyEngine/policyengine-api#3911 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
PolicyEngine/policyengine-api#3910 ·
I maintainer di solito rispondono entro 3 giorni
-
Remove the unauthenticated v2 household listForse già presa @MaxGhenis l’ha presa oggi. Aperta
PolicyEngine/policyengine-api#4031 ·
I maintainer di solito rispondono entro 3 giorni
-
Remove the v1 user routes and keep complete simulation and report results finalForse già presa @MaxGhenis l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
PolicyEngine/policyengine-api#4028 ·
I maintainer di solito rispondono entro 3 giorni
-
Store the metadata v3 reads in the v2 catalog, from PolicyEngine.py's public recordsForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
PolicyEngine/policyengine-api#4022 ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di PolicyEngine/policyengine-api
Issue simili
-
Project submission:Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
slavakurilyak/awesome-ai-agents#845 ·
I maintainer di solito rispondono entro 1 giorno
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directoryForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertadifficulty:2 enhancement good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
MakazhanAlpamys/Soup#2178 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-valuesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
scverse/rapids-singlecell#854 ·
I maintainer di solito rispondono entro 1 giorno
-
Slang input: int8_t4_packed and uint8_t4_packed are copied into CrossGLForse già presa @ninglinLiu l’ha presa oggi. Apertaarea:frontend backend:slang bug direction:input
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
random_elements(unique=True) on an OrderedDict: ZeroDivisionError once only zero weights remain, AssertionError with use_weighting=FalseForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 13 giorni