Document UK breakdown results' withheld area codes, and stop serving breakdowns cached without them
Les mainteneurs répondent en général sous 3 jours
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 43/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- openapi, python
- Domaine
- api, backend, documentation
Piste de recherche
Read the completed breakdown result description around line 887 in openapi_spec.yaml and inspect _breakdown_result_kind_error in services/economy_impact_execution.py. Find the options hash and its schema version handling, then check the contract tests for breakdown results. Done means the OpenAPI description documents withheld codes and older breakdown cache entries are bypassed while national result cache entries remain unaffected.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Problem
The simulation API will return, for each level of a UK local-area breakdown, the ONS codes of the areas disclosure control withheld (https://github.com/PolicyEngine/policyengine-sim-api/issues/968). The Public API already stores and returns a breakdown result unchanged once its kind is local_areas (_breakdown_result_kind_error in services/economy_impact_execution.py), so the new fields will pass through. Two things still need doing.
- Documentation. The OpenAPI description of the annual economy route's completed breakdown result (
openapi_spec.yaml, about line 887) listskind, the two area lists and the dataset and version fields. It should also describe the withheld codes, and that they are absent from results computed before the simulation API reported them. - Cached results. Breakdown results cached before the change stay cached for up to 30 days without the new fields. A simulation API deploy that keeps the same .py version doesn't change the cache key, so clients would get the list for existing reports only once those entries expire. Bumping
RUNTIME_CACHE_SCHEMA_VERSIONS["economy_impact"]would recompute every cached economy result, not just breakdowns. Instead, give breakdown requests their own schema version in the options hash, so that only breakdown results computed before the change are recomputed on the next request.
Done when
- The OpenAPI description covers the withheld codes.
- A contract test shows a breakdown result with the withheld codes is stored and returned unchanged.
- Breakdown results cached before the change are not served, and national results' cache entries are unaffected.
Notes
- Order: merge after the simulation API change is deployed.
- Related: the app will hatch only the listed codes as "Not reported" and show any other absent area as "No data" (PolicyEngine/policyengine-app-v2#1448 review).
- Langage dominant
- Python
- Étoiles
- 18
- Forks
- 33
- Merge moyen
- 2 j 16 h
- PR mergées (30 j)
- 53
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PolicyEngine/policyengine-api
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
PolicyEngine/policyengine-api#4037 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
PolicyEngine/policyengine-api#3911 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
PolicyEngine/policyengine-api#3910 ·
Les mainteneurs répondent en général sous 3 jours
-
Return a 400 for economy years the simulation service's model cannot projectPeut-être pris @anth-volk l’a pris aujourd’hui. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
PolicyEngine/policyengine-api#4093 ·
Les mainteneurs répondent en général sous 3 jours
-
Telemetry error report splits a simulation worker failure between its exception and the recorded copyPeut-être pris @anth-volk l’a pris aujourd’hui. Ouvertebug
Difficulté 3/5 1-2 jours Accessibilité débutants 20/100
PolicyEngine/policyengine-api#4088 ·
Les mainteneurs répondent en général sous 3 jours
Toutes les issues de PolicyEngine/policyengine-api
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
521xueweihan/HelloGitHub#4150 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
aws-samples/sample-per-model-bedrock#595 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour
-
bug connectors
Difficulté 1/5 Moins d'une heure Accessibilité débutants 67/100
pyinfra-dev/pyinfra#2036 ·
Les mainteneurs répondent en général sous 9 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour