PolicyEngine / PolicyEngine/policyengine-core

Add fully-functional `ParameterNode.__repr__`

Open
#274 1 comment 0 reactions 1 assignee View on GitHub

@SylviaDu99 is already working on this.

Since Oct 15, 2024.

enhancement help wanted
Dominant language
Python
Stars
22
Forks
30
Avg merge
14h 33m
Merged PRs (30d)
7

Description

Currently we read in parameters from YAML files, and calling print on a loaded ParameterNode (which often represents a single YAML file) will print out some of the original YAML read in. But a hugely impactful feature would be to have str(parameter_node) be exactly equal to the original YAML file (or better, with some sorting of keys).

This could cut runtimes in the US significantly, because currently we run lots of operations on the parameter nodes at load time (making parameter breakdowns uniform, adding missing US state values, etc.). If we could easily print out the YAML file versions of parameters we've applied these operations too, we could just commit them to the codebase and remove the need for these operations at runtime.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.