PolicyEngine / PolicyEngine/policyengine-app-v2
Update modelled_policies handling for programs.yaml structural changes
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1
- Forks
- 3
- Avg merge
- 1d 50m
- Merged PRs (30d)
- 39
Description
Context
policyengine-us#7716 updates the structure of policyengine_us/programs.yaml, changing the verified_years string field to separate verified_start_year/verified_end_year integers.
This matters for app-v2 because modelled_policies in the API metadata response is sourced directly from programs.yaml via the modelled_policies class attribute in policyengine_us/system.py:
modelled_policies = COUNTRY_DIR / "programs.yaml"
Current state in app-v2
metadataUtils.ts:181readsdata.modelled_policiesand normalises it into state with a safe fallback (?? { core: {}, filtered: {} })metadataReducer.tsstores it asstate.modelledPolicies- The type is defined in
types/metadata.ts - No UI component in app-v2 currently renders this data (unlike the old app, which had
PoliciesModelledPopup.jsx)
What needs to happen
- Update the
modelled_policiesTypeScript type intypes/metadata.tsto reflect the newverified_start_year/verified_end_yearinteger fields once PR #7716 merges - Decide whether to implement a UI equivalent to the old app's
PoliciesModelledPopupusing this richer structured data, or keep it as unused state
References
- policyengine-us PR: https://github.com/PolicyEngine/policyengine-us/pull/7716
- Old app popup:
PolicyEngine/policyengine-app→src/modals/PoliciesModelledPopup.jsx - app-v2 consumer:
app/src/libs/metadataUtils.ts:181,app/src/reducers/metadataReducer.ts:99
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with types/metadata.ts, then trace app/src/libs/metadataUtils.ts:181 and app/src/reducers/metadataReducer.ts:99 to understand the current modelled_policies flow. Review policyengine-us PR #7716 and the old PoliciesModelledPopup.jsx reference; done means the TypeScript type matches the new fields and the issue's UI-versus-unused-state decision is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100