Sim's table models still map the report columns API v1 drops

Đang mở Phù hợp với người mới
#1,110 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@anth-volk đang làm issue này rồi.

Từ ngày 19/11/2026.

  • #1111 của @anth-volk — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, python, sqlalchemy
Lĩnh vực
ci-cd, database

Hướng nghiên cứu

Bắt đầu với libs/policyengine-simulation-persistence/src/policyengine_simulation_persistence/tables.py và so sánh các ánh xạ Report, ReportRun và BudgetWindowRun với những thay đổi bảng API v1 được liệt kê trong issue. Kiểm tra test_the_models_match_the_public_api_tables và public-api-schema-drift.yml để xem quá trình so sánh schema được chạy như thế nào. Hoàn tất khi các cột, ràng buộc và chỉ mục được liệt kê đã bị xóa, đồng thời libs/policyengine-simulation-persistence/public-api-commit chỉ đến merge commit của #4335.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

API v1's revision 4e30076d4b9f (PolicyEngine/policyengine-api#4335, C1 · 41) drops nine columns from the v2 report tables:

  • reports.label, description and user_id, with the foreign key fk_reports_user_id_users and the index ix_reports_user_id;
  • report_runs.trigger, baseline_cliff_gap, baseline_cliff_share, reform_cliff_gap and reform_cliff_share, with the check ck_report_runs_cliff_impact_complete;
  • budget_window_runs.trigger.

Sim's mapped classes in libs/policyengine-simulation-persistence/src/policyengine_simulation_persistence/tables.py still declare all of them. Once #4335 merges, test_the_models_match_the_public_api_tables fails against API v1's master, so the weekly drift run (public-api-schema-drift.yml) fails, and no PR can move public-api-commit past that merge.

Done when:

  • Report, ReportRun and BudgetWindowRun declare none of these columns, constraints or indexes.
  • libs/policyengine-simulation-persistence/public-api-commit names #4335's merge commit, so the comparison and the weekly drift run pass.
Ngôn ngữ chính
Python
Star
1
Fork
1
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
71

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PolicyEngine/policyengine-sim-api

Tất cả issue của PolicyEngine/policyengine-sim-api

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.