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

Aperta
#9 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
tooling

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
0
Fork
0
Merge medio
1g 19h
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/us-cliffs-2017

Tutte le issue di PolicyEngine/us-cliffs-2017

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.