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

オープン 初心者向け
#1,110 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@anth-volk がすでに取り組んでいます。

2026年11月19日 から。

  • #1111 @anth-volk による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, python, sqlalchemy
領域
ci-cd, database

調査の方向性

まず libs/policyengine-simulation-persistence/src/policyengine_simulation_persistence/tables.py から始め、Report、ReportRun、BudgetWindowRun のマッピングを、issue に記載された API v1 のテーブル変更と比較します。test_the_models_match_the_public_api_tables と public-api-schema-drift.yml を確認し、スキーマ比較の実行方法を把握します。記載された列、制約、インデックスが削除され、libs/policyengine-simulation-persistence/public-api-commit が #4335 のマージコミットを指していれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
Python
スター
1
フォーク
1
平均マージ
1日 12時間
マージ済み PR(30日)
71

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PolicyEngine/policyengine-sim-api のほかの issue

PolicyEngine/policyengine-sim-api の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。