Store every simulation result as rows in the simulation schema

Aberta
#948 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
15/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
python, sql
Domínio
backend, databases

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Python
Estrelas
1
Forks
1
Merge médio
1d 12h
PRs com merge (30d)
71

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de PolicyEngine/policyengine-sim-api

Todas as issues de PolicyEngine/policyengine-sim-api

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.