Drop the empty simulation-domain tables and retired association columns from the v2 schema
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
- #3963 của @anth-volk — đã đóng, không merge
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 18
- Fork
- 33
- Merge trung bình
- 2 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 36
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PolicyEngine/policyengine-api
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
PolicyEngine/policyengine-api#3911 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
PolicyEngine/policyengine-api#3910 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Remove the v1 user routes and keep complete simulation and report results finalCó thể đã có người làm @MaxGhenis đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
PolicyEngine/policyengine-api#4028 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Store the metadata v3 reads in the v2 catalog, from PolicyEngine.py's public recordsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
PolicyEngine/policyengine-api#4022 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Publish v2 catalog regions from the Public API's own region reference filesCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
PolicyEngine/policyengine-api#4019 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của PolicyEngine/policyengine-api
Issue tương tự
-
good first issue infrastructure
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
kuznia-rdzeni/coreblocks#1135 ·
-
good first issue server
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation priority: high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
a-lex-s/mealie-telegram-bot#54 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type/test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
SaltedTan/virgil-language-server#218 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
btclib-org/btclib-wallet#541 ·
Maintainer thường phản hồi trong vòng 1 ngày