Document UK breakdown results' withheld area codes, and stop serving breakdowns cached without them
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 43/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- openapi, python
- Área
- api, backend, documentation
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- Python
- Estrellas
- 18
- Forks
- 33
- Merge medio
- 2 d 13 h
- PR fusionados (30 d)
- 56
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PolicyEngine/policyengine-api
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
PolicyEngine/policyengine-api#4037 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
PolicyEngine/policyengine-api#3911 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
PolicyEngine/policyengine-api#3910 ·
Los mantenedores suelen responder en 2 días
-
Serve economy reports on the v2 routes and save v2 report and simulation IDsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
PolicyEngine/policyengine-api#4107 ·
Los mantenedores suelen responder en 2 días
-
Drop the unused x and y columns from API v2's UK area impact tablesPosiblemente ocupada @anth-volk la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
PolicyEngine/policyengine-api#4102 ·
Los mantenedores suelen responder en 2 días
Todos los issues de PolicyEngine/policyengine-api
Issues similares
-
factory
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Arize-ai/phoenix#17420 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
FireDynamics/LEDSmokeAnalysis#176 ·
Los mantenedores suelen responder en 1 día
-
PC
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Make `ocifs` optionalAbiertodependencies
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dlt-contrib/dlt-filesystem#51 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día