Skip to content

Rename labor to labour in LSR parameters#1607

Open
vahid-ahmadi wants to merge 2 commits intomainfrom
fix/labor-to-labour-lsr-853
Open

Rename labor to labour in LSR parameters#1607
vahid-ahmadi wants to merge 2 commits intomainfrom
fix/labor-to-labour-lsr-853

Conversation

@vahid-ahmadi
Copy link
Copy Markdown
Collaborator

Summary

  • Renames labor to labour (British English) across all LSR parameter and variable directory names, file names, labels, descriptions, import paths, and test references

Fixes #853

Test plan

  • Verify parameter paths resolve correctly (gov.simulation.labour_supply_responses.*)
  • Run LSR-related tests: pytest policyengine_uk/tests/test_labour_supply_response_formulas.py -v
  • Run behavioral response tests: pytest policyengine_uk/tests/test_behavioral_responses.py -v

🤖 Generated with Claude Code

vahid-ahmadi and others added 2 commits April 16, 2026 10:48
Use British English spelling throughout the labour supply response
module: directory names, file names, parameter labels, descriptions,
import paths, and test references. Fixes #853.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MaxGhenis
Copy link
Copy Markdown
Collaborator

Clean rename but it's a breaking API change on an externally-referenced parameter path, so we can't merge standalone.

policyengine-app (the legacy app, still in production) hardcodes these two paths in src/pages/policy/PolicyRightSidebar.jsx:

  • gov.simulation.labor_supply_responses.income_elasticity
  • gov.simulation.labor_supply_responses.substitution_elasticity

Merging this as-is will silently break the LSR sliders in the policy sidebar the next time the app rebuilds against a policyengine-uk that has these parameters at labour_supply_responses.*.

Options to unblock:

  1. Cross-repo rename. Land a companion policyengine-app PR that updates those two path strings, merge both together. Simplest if we accept one short window of breakage on the deployed app between the two merges.
  2. Deprecation alias. Add gov.simulation.labor_supply_responses as an alias pointing to the renamed tree (or keep the old paths live for one release cycle), then remove in a later PR once consumers have migrated. Slower but zero external breakage.

I'd lean toward (1) — the app reference is only two lines and nothing else external uses these paths (I checked policyengine-api, policyengine-app-v2, policyengine-uk-data, policyengine-core). If you want, I can stage the companion app PR and link it here.

Blocking on that decision.

vahid-ahmadi added a commit to PolicyEngine/policyengine-app that referenced this pull request Apr 17, 2026
The UK labour supply response parameters are being renamed from
gov.simulation.labor_supply_responses.* to
gov.simulation.labour_supply_responses.* in PolicyEngine/policyengine-uk#1607.
Update the two UK-only path strings in PolicyRightSidebar so the LSR
sliders keep resolving after that merges. US paths unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vahid-ahmadi
Copy link
Copy Markdown
Collaborator Author

Going with option 1. Opened the companion app PR: PolicyEngine/policyengine-app#2829.

It updates just the two UK-only path strings in src/pages/policy/PolicyRightSidebar.jsx (income_elasticity, substitution_elasticity) — US paths are untouched since they live in policyengine-us and aren't being renamed here.

Suggested merge order to minimize the breakage window:

  1. Merge the app PR first so the frontend expects the new paths.
  2. Merge this PR, then bump policyengine-uk in the app.

Ready for review here once you're happy with the app-side change.

@vahid-ahmadi vahid-ahmadi self-assigned this Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

labor -> labour in LSR parameters

2 participants