Drop the empty simulation-domain tables and retired association columns from the v2 schema
Maintainer antworten meist innerhalb von 3 Tagen
Dieses Issue hat noch niemand übernommen.
- #3963 von @anth-volk — ohne Merge geschlossen
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 20/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Python
- Sterne
- 18
- Forks
- 33
- Ø Merge
- 2 T. 6 Std.
- Gemergte PRs (30 T.)
- 32
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus PolicyEngine/policyengine-api
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
PolicyEngine/policyengine-api#3911 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
PolicyEngine/policyengine-api#3910 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Report each day's production telemetry error groups as GitHub issuesEvtl. vergeben @anth-volk hat das heute übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 20/100
PolicyEngine/policyengine-api#3989 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Include each variable's quantity type (stock or flow) in the country metadataEvtl. vergeben @anth-volk hat das vor 1 Tag übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 30/100
PolicyEngine/policyengine-api#3986 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Enforce SQLAlchemy-only database connections and Alembic-only schema changesEvtl. vergeben @anth-volk hat das vor 1 Tag übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
PolicyEngine/policyengine-api#3978 ·
Maintainer antworten meist innerhalb von 3 Tagen
Alle Issues in PolicyEngine/policyengine-api
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
zach-blumenfeld/aip#13 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
nathanmarlor/foxess_modbus#1287 ·
Maintainer antworten meist innerhalb von 4 Tagen
-
bug good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
OpenLakeForge/openlakeforge#498 ·
Maintainer antworten meist innerhalb von 1 Tag
-
good first issue hacktoberfest help wanted python
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 69/100
pollen-robotics/reachy_mini#1493 ·
Maintainer antworten meist innerhalb von 1 Tag