Skip to content

Fix spelling of social_security__recieves_goverment_assisted_scheme_payments - #201

Open
olitreadwell wants to merge 1 commit into
BetterRules:masterfrom
olitreadwell:fix/correct-variable-spelling
Open

olitreadwell wants to merge 1 commit into
BetterRules:masterfrom
olitreadwell:fix/correct-variable-spelling

Conversation

@olitreadwell

Copy link
Copy Markdown
  • Technical improvement.

  • Impacted periods: all.

  • Impacted areas: openfisca_aotearoa/variables/acts/social_security/interpretation/financially_independent

  • Renamed variables:

  • social_security__recieves_goverment_assisted_scheme_payments renamed to social_security__receives_government_assisted_scheme_payments
  • social_security__recieves_main_benefit renamed to social_security__receives_main_benefit
  • Details:
    • Fixes Correct spelling of social_security__recieves_goverment_assisted_scheme_payments #137: corrects the spelling of two variable names ("recieves" -> "receives", "goverment" -> "government").
    • Also fixes a typo in a variable label: "Socal Security Act" -> "Social Security Act".
    • Updates the matching local variable names inside the social_security__financially_independent formula so everything stays consistent.
    • No calculation logic changed, only names and one label string. All 313 existing tests still pass unmodified.
    • This is a breaking change for the public API: anyone calling the old variable names (social_security__recieves_goverment_assisted_scheme_payments, social_security__recieves_main_benefit) directly will need to switch to the new names. Per CONTRIBUTING.md, renaming a variable is a major version bump, so this PR also bumps pyproject.toml from 22.0.0 to 23.0.0 and adds a matching CHANGELOG.md entry, following the format used by prior rename-only entries in this changelog. I searched the codebase (grep -rn across .py, .yaml, .yml) and confirmed these two variable names are referenced nowhere else — no other variable files, no YAML tests — so this rename should not need any other code changes.
    • Note on the changelog Technical improvement label: I chose it because this is a pure rename with zero calculation impact (matches CONTRIBUTING.md's description: "formula syntax change... impacts the users who write legislation"). One historical precedent (v5.0.0) filed a similar pure-rename batch under "Tax and benefit system evolution" instead — happy to switch categories if a maintainer prefers that.
    • I also guessed PR Fix spelling of social_security__recieves_goverment_assisted_scheme_payments #201 for the changelog's self-referencing link, based on the current open PR being feat: 2025+ schedule income tax, ACC earners levy, KiwiSaver rates (#199) #200. Please correct the number in CHANGELOG.md if it lands as a different PR number.

These changes:

  • Impact the OpenFisca-Aotearoa public API (renaming two variables)

How to verify

python3.11 -m venv .venv && source .venv/bin/activate
pip install --upgrade pip setuptools wheel
pip install --editable ".[dev]"
make test   # runs check-syntax-errors, lint (flake8+pylint+yamllint), and the openfisca test suite

Checks run locally (Python 3.11.15, fresh venv)

  • python -m compileall -q . — PASS
  • flake8 — PASS, 0 findings
  • pylint — PASS, 0 findings
  • yamllint — PASS, 0 findings
  • openfisca test --country-package openfisca_aotearoa openfisca_aotearoa/tests — PASS, 313 passed, 0 failed (same count before and after the change)

Confidence: HIGH

The rename is textually isolated to one file (confirmed by full-repo grep before and after), the full test suite and full lint suite pass unchanged, and the change follows this repo's own documented convention for variable renames (major version bump + CHANGELOG entry + no deprecation shim, confirmed against ~10 historical precedents in CHANGELOG.md). The only judgment calls are the changelog change-type label and the guessed PR number for the changelog's self-link, both called out above for maintainer review.

…ayments

- Renamed social_security__recieves_goverment_assisted_scheme_payments
  to social_security__receives_government_assisted_scheme_payments.
- Renamed social_security__recieves_main_benefit to
  social_security__receives_main_benefit.
- Updated the matching local variable names in the
  social_security__financially_independent formula.
- Fixed a typo in a variable label: Socal Security Act to
  Social Security Act.
- No calculation logic changed, only names and one label string.
- Bumped the version to 23.0.0 and added a CHANGELOG.md entry, since
  this is a breaking change for anyone using the old variable names
  (per CONTRIBUTING.md, renaming a variable is a major version bump).
- Fixes BetterRules#137.

This branch has not been deployed

No deployments
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.

Correct spelling of social_security__recieves_goverment_assisted_scheme_payments

1 participant