Remove traced_reads() from scripts/audit_parameters.py once policyengine-core records scale and by-path reads

オープン
#9 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
tooling

調査の方向性

Start in scripts/audit_parameters.py at traced_reads(), TracedLeaf, the get_traced_child patch and the TracingParameterNode.__getattr__ patch. First confirm the installed policyengine-core release contains PolicyEngine/policyengine-core#664, then run the audit and compare the produced CSV with the current output to verify ParameterRecorder results are unchanged. Remove the now-duplicated tracing code, update the docstring paragraph about what core's tracer misses, and finish when the audit still produces the same CSV.

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

説明

PolicyEngine/policyengine-core#664 makes core's tracer record both kinds of read that traced_reads() in scripts/audit_parameters.py adds:

  • scale reads through .calc, recorded with a description of the schedule;
  • reads by path, such as parameters.gov.X(instant), recorded at the parameter's path and instant.

With that core, the get_traced_child patch records each scale read a second time, and the TracingParameterNode.__getattr__ patch replaces core's own handling of reads by path. ParameterRecorder keys reads by name, so the CSV does not change, but traced_reads() and TracedLeaf can be removed. The docstring's paragraph on what core's tracer misses then needs updating.

Do this after the first policyengine-core release that contains #664.

主要言語
Python
スター
0
フォーク
0
平均マージ
1日 19時間
マージ済み PR(30日)
2

環境構築

はじめの一歩

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

PolicyEngine/us-cliffs-2017 のほかの issue

PolicyEngine/us-cliffs-2017 の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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