Store every simulation result as rows in the simulation schema

Ouverte
#948 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
15/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
python, sql
Domaine
backend, databases

Piste de recherche

Start from the SingleYearMacroOutput result model, which defines every section and field that needs a column, and from the region catalog that supplies constituency and local-authority names by code. The issue names no file paths, so locate the Simulation Entrypoint and the current JSON-per-run storage first. Done means a round-trip test on the fixed sample reproduces each result exactly and every model field maps to a column.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

The Simulation Entrypoint will record every run's result itself. Results should be stored once, as rows, so they can be queried and kept across model and data versions, rather than as one JSON value per run:

  • one table per section of today's economy result model, SingleYearMacroOutput: a simulation's own figures (poverty rates, inequality, cliff exposure) on its simulation run, as each comparison computed them, and the comparison (budget, programs, income and wealth deciles, labour supply, congressional districts, constituencies, local authorities) on the report run;
  • a computed household as one JSON value on its simulation run;
  • links to each run's stored files, offered for 30 days while result rows stay for good;
  • a writer that validates a result and writes its rows in the transaction that marks the run succeeded, and a reader that rebuilds today's result format exactly, taking constituency and local-authority names and map positions from the region catalog by code;
  • tests: a round trip on a fixed sample (US national, state and congressional district; UK national, nation, constituency and local authority; a budget-window year; a household) reproduces each result exactly, and every field of the result model maps to a column.

No route writes results yet.

Langage dominant
Python
Étoiles
1
Forks
1
Merge moyen
1 j 12 h
PR mergées (30 j)
71

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de PolicyEngine/policyengine-sim-api

Toutes les issues de PolicyEngine/policyengine-sim-api

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.