Drop the empty simulation-domain tables and retired association columns from the v2 schema
Mantenedores costumam responder em até 3 dias
Ninguém assumiu esta issue ainda.
- #3963 de @anth-volk — fechado sem integrar
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 20/100
Direção de pesquisa
Start with the v2 models in policyengine_api/data/v2/models/reports.py, simulations.py, and households.py, plus policyengine_api/data/v2/report_runs.py; first verify that #3960 is deployed and operators have confirmed the tables are empty in both environments. Then inspect the v2 Alembic migration and the named publication, qualification, metadata validation, and static check entry points. Done means the tables, enum types, and retired columns are dropped, remaining code no longer depends on the models, and validation prevents their return.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Problem
The Public API's v2 (Supabase) schema still has dormant copies of the simulation-domain tables: household_jobs, simulations, reports, report_runs and the 11 report-run output tables (aggregates, change_aggregates, budget_summary, decile_impacts, intra_decile_impacts, inequality, poverty, program_statistics, congressional_district_impacts, constituency_impacts and local_authority_impacts). Nothing writes to them. The simulation service will own jobs, reports and their results in its own simulation schema and will create the tables it needs there, so these copies and their SQLModel models only invite new code to start using the wrong tables. Proposals that build on v2 reports in the Public API, such as #3818's report_validations table, belong on the simulation service's report tables instead.
user_simulation_associations and user_report_associations also still have the country and label columns that Stage 12A retired and left nullable.
Proposed change
Once #3960 (which stops the application from using these tables and columns) is deployed to both environments, and once an operator has confirmed in both environments that the tables are empty:
- Remove the simulation-domain models (
policyengine_api/data/v2/models/reports.py,simulations.py, andHouseholdJobinhouseholds.py) and the unusedpolicyengine_api/data/v2/report_runs.py. - Add an autogenerated v2 Alembic revision that drops the 15 tables, their 8 native enum types and the 4 retired association columns.
catalog/publication.py: check only dataset-version rows before and after publication.household_migration_qualification.py: count the dropped tables by name for targets that still have them, instead of through the removed models.- Reject the dropped table names in the v2 metadata validation, and add a registered static check (
api.v2.simulation-tables-stay-removed) that fails if code imports the removed models again.
- Linguagem predominante
- Python
- Estrelas
- 18
- Forks
- 33
- Merge médio
- 2d 18h
- PRs com merge (30d)
- 36
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de PolicyEngine/policyengine-api
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
PolicyEngine/policyengine-api#3911 ·
Mantenedores costumam responder em até 3 dias
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
PolicyEngine/policyengine-api#3910 ·
Mantenedores costumam responder em até 3 dias
-
Stop serving economy results cached with ×100 decile relative changesTalvez já em andamento @anth-volk assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 45/100
PolicyEngine/policyengine-api#4025 ·
Mantenedores costumam responder em até 3 dias
-
Store the metadata v3 reads in the v2 catalog, from PolicyEngine.py's public recordsTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
PolicyEngine/policyengine-api#4022 ·
Mantenedores costumam responder em até 3 dias
-
Request UK constituency and local-authority impacts separately from the national economy resultTalvez já em andamento @anth-volk assumiu hoje. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
PolicyEngine/policyengine-api#4021 ·
Mantenedores costumam responder em até 3 dias
Todas as issues de PolicyEngine/policyengine-api
Issues semelhantes
-
[oblt-aw][autodoc] Update workflow docs for gh-aw v0.92.5 and detector permission scopeTalvez já em andamento @github-actions assumiu hoje. Aberta
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
feat(ide): VS Code access through the shipped MCP server (config doc and tool-list smoke test)Abertaroadmap-100
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
comp/tools P2 tool/browser tool/file type/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
NousResearch/hermes-agent#143418 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
python-hyper/uritemplate#164 ·