diff --git a/.github/bump_version.py b/.github/bump_version.py new file mode 100644 index 000000000..bb0fd6dd3 --- /dev/null +++ b/.github/bump_version.py @@ -0,0 +1,79 @@ +"""Infer semver bump from towncrier fragment types and update version.""" + +import re +import sys +from pathlib import Path + + +def get_current_version(pyproject_path: Path) -> str: + text = pyproject_path.read_text() + match = re.search(r'^version\s*=\s*"(\d+\.\d+\.\d+)"', text, re.MULTILINE) + if not match: + print( + "Could not find version in pyproject.toml", + file=sys.stderr, + ) + sys.exit(1) + return match.group(1) + + +def infer_bump(changelog_dir: Path) -> str: + fragments = [ + f + for f in changelog_dir.iterdir() + if f.is_file() and f.name != ".gitkeep" + ] + if not fragments: + print("No changelog fragments found", file=sys.stderr) + sys.exit(1) + + categories = {f.suffix.lstrip(".") for f in fragments} + for f in fragments: + parts = f.stem.split(".") + if len(parts) >= 2: + categories.add(parts[-1]) + + if "breaking" in categories: + return "major" + if "added" in categories or "removed" in categories: + return "minor" + return "patch" + + +def bump_version(version: str, bump: str) -> str: + major, minor, patch = (int(x) for x in version.split(".")) + if bump == "major": + return f"{major + 1}.0.0" + elif bump == "minor": + return f"{major}.{minor + 1}.0" + else: + return f"{major}.{minor}.{patch + 1}" + + +def update_file(path: Path, old_version: str, new_version: str): + text = path.read_text() + updated = text.replace( + f'version = "{old_version}"', + f'version = "{new_version}"', + ) + if updated != text: + path.write_text(updated) + print(f" Updated {path}") + + +def main(): + root = Path(__file__).resolve().parent.parent + pyproject = root / "pyproject.toml" + changelog_dir = root / "changelog.d" + + current = get_current_version(pyproject) + bump = infer_bump(changelog_dir) + new = bump_version(current, bump) + + print(f"Version: {current} -> {new} ({bump})") + + update_file(pyproject, current, new) + + +if __name__ == "__main__": + main() diff --git a/CLAUDE.md b/CLAUDE.md index 4b565ec0e..7613d2ae2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -21,7 +21,7 @@ - **Testing**: Write tests for all new functionality - **Documentation**: Document all public functions with docstrings - **Versioning**: Follow SemVer (increment patch for fixes, minor for features, major for breaking changes) -- **Pull Requests**: Must include a changelog_entry.yaml file describing the changes (GitHub Actions will automatically run `make changelog` to update the changelog) +- **Pull Requests**: Must include a changelog.d/ file describing the changes (GitHub Actions will automatically run `make changelog` to update the changelog) ## Repository Structure - **parameters/**: YAML files that define tax rates, thresholds, and other policy parameters diff --git a/Makefile b/Makefile index 1b8392194..3579f7b39 100644 --- a/Makefile +++ b/Makefile @@ -35,8 +35,5 @@ documentation: docs: documentation changelog: - build-changelog changelog.yaml --output changelog.yaml --update-last-date --start-from 0.1.0 --append-file changelog_entry.yaml - build-changelog changelog.yaml --org PolicyEngine --repo openfisca-uk --output CHANGELOG.md --template .github/changelog_template.md - bump-version changelog.yaml pyproject.toml - rm changelog_entry.yaml || true - touch changelog_entry.yaml + python .github/bump_version.py + towncrier build --yes --version $$(python -c "import re; print(re.search(r'version = \"(.+?)\"', open('pyproject.toml').read()).group(1))") \ No newline at end of file diff --git a/changelog_entry.yaml b/changelog.d/.gitkeep similarity index 100% rename from changelog_entry.yaml rename to changelog.d/.gitkeep diff --git a/changelog.d/migrate-to-towncrier.changed.md b/changelog.d/migrate-to-towncrier.changed.md new file mode 100644 index 000000000..865484add --- /dev/null +++ b/changelog.d/migrate-to-towncrier.changed.md @@ -0,0 +1 @@ +Migrated from changelog_entry.yaml to towncrier fragments to eliminate merge conflicts. diff --git a/changelog.yaml b/changelog.yaml deleted file mode 100644 index 514cfd8f7..000000000 --- a/changelog.yaml +++ /dev/null @@ -1,2297 +0,0 @@ -- changes: - added: - - Income Tax and National Insurance. - - All benefits are at least taken from survey reporting (can be switched on-off). - - Child Benefit is modelled, others such as Income Support, JSA (both types), - Tax Credits can be simulated/reformed but require more reviewing in how to account - for discrepancies caused by take-up rates. - - Four budget-neutral UBI reforms are implemented. - - 15 test cases (unit and integration) testing benefits and taxes. - - Simulation helper tools. - date: 2020-11-08 00:00:00 - version: 0.1.0 -- bump: minor - changes: - changed: - - Time periods now appropriate, using an implementation of WEEK for most benefits. - - MTRs handled properly and include a breakdown. - - Simulation tools are improved and included in a class. - date: 2020-12-05 00:00:00 -- bump: patch - changes: - changed: - - Improved documentation of parameters. - - Tests now occur in 2021 to ensure FY20-21 parameters are used. - fixed: - - Bug in CB-HITC that caused overestimation. - date: 2021-04-19 00:00:00 -- bump: patch - changes: - added: - - Jupyter-Book documentation. - - More detailed disability variables. - fixed: - - IndividualSim reform handling. - date: 2021-04-20 00:00:00 -- bump: patch - changes: - changed: - - MicroDataFrame and MicroSeries returned by default. - fixed: - - Bugs. - date: 2021-04-21 00:00:00 -- bump: minor - changes: - added: - - New interface for microsimulation. - - Sources in tax logic. - - Tests. - changed: - - Microdata now generated and loaded in-model. - - Variable time periods made more consistent. - - Derivative calculations made more efficient and have more options. - date: 2021-07-04 00:00:00 -- bump: minor - changes: - added: - - Tests for variable naming conventions. - - Postcode lookup optional features available. - - LHA rates for all BRMA areas added. - changed: - - PolicyEngine-UK now runs from the official OpenFisca-Core. - date: 2021-07-05 00:00:00 -- bump: minor - changes: - changed: - - Minor update - date: 2021-07-05 00:00:00 -- bump: minor - changes: - changed: - - Minor update - date: 2021-07-05 00:00:00 -- bump: minor - changes: - changed: - - Minor update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - changed: - - Patch update - date: 2021-07-05 00:00:00 -- bump: patch - changes: - added: - - Units for some variables. - changed: - - Code refactoring. - date: 2021-12-23 00:00:00 -- bump: minor - changes: - added: - - Historical Working Tax Credit parameters since 2002 (previously since 2016). - - Legislative references for Working Tax Credit parameters. - changed: - - Working Tax Credit child care parameters represent the maximum amount, prior - to the share covered. - fixed: - - Apply Working Tax Credit old-age provision to 60-year-olds. - - Qualify people working 30 hours for the Working Tax Credit. - - Point afcs to afcs_reported instead of AA_reported. - - Fix units on some variables. - date: 2021-12-27 00:00:00 -- bump: patch - changes: - removed: - - Benefit unit- and household-level saved random numbers for take-up. - date: 2021-12-29 00:00:00 -- bump: minor - changes: - added: - - Minimum tax credit benefit amount. - date: 2021-12-29 00:00:01 -- bump: patch - changes: - added: - - Microsimulation tests and YAML data for Child Benefit, Tax Credits and Council - Tax. - - Documentation page for Tax Credits. - - Simplified dataset usage to enhanced FRS only. - date: 2021-12-29 00:00:02 -- bump: patch - changes: - added: - - Metadata for the Dividend, Property and Trading Allowances. - date: 2022-01-07 00:00:00 -- bump: minor - changes: - added: - - Parameter representing the Child Tax Credit's child limit. - changed: - - Renamed parameter representing Universal Credit's child limit. - date: 2022-01-07 00:00:01 -- bump: patch - changes: - changed: - - Label metadata for tax variables. - date: 2022-01-08 00:00:00 -- bump: patch - changes: - changed: - - Removes the `u` prefix from all variable label strings. - date: 2022-01-08 00:00:01 -- bump: patch - changes: - added: - - Sure Start Maternity Grant (reported). - changed: - - Education benefits summed in a formula. - fixed: - - Some maternity benefits (SSMG, SMP) and WFA not included in benefits. - date: 2022-01-12 00:00:00 -- bump: patch - changes: - changed: - - PolicyEngine-UK-Data version increased to 0.7.0. - date: 2022-01-14 00:00:00 -- bump: patch - changes: - added: - - When datasets are not available, a prompt is displayed to download them or use - synthetic data. - - CLI interface trigger changed from `openfisca-uk-setup` to `openfisca-uk` and - default years updated. - date: 2022-01-16 00:00:00 -- bump: patch - changes: - added: - - Stocks/flows metadata for PolicyEngine-facing variables. - date: 2022-01-17 00:00:00 -- bump: patch - changes: - fixed: - - Household gross income calculated directly from household benefits and market - income. - - Savings allowance was previously set to zero erroneously for households in Scotland - at the starter or intermediate bands. - date: 2022-01-17 00:00:01 -- bump: patch - changes: - added: - - Metadata (period, unit, name, label) for all Universal Credit parameters. - date: 2022-01-18 00:00:00 -- bump: patch - changes: - fixed: - - Baseline HBAI-excluded income variable now uses the Synthetic FRS when the enhanced - FRS is not available. - date: 2022-01-22 00:00:00 -- bump: patch - changes: - added: - - Unit test for benefit unit rent. - changed: - - OpenFisca-Tools dependency patch increased. - date: 2022-01-22 00:00:01 -- bump: minor - changes: - added: - - Re-weighting routine for the Family Resources Survey, matching aggregates, participation - and populations. - date: 2022-02-04 00:00:00 -- bump: minor - changes: - added: - - The Energy Bills Rebate scheme. - date: 2022-02-06 00:00:00 -- bump: patch - changes: - changed: - - OpenFisca-Tools bumped to v0.3 - date: 2022-02-14 00:00:00 -- bump: patch - changes: - added: - - Basic income parameters and logic. - date: 2022-02-14 00:00:01 -- bump: patch - changes: - changed: - - Set basic income phaseout threshold default to 0. - date: 2022-02-14 00:00:02 -- bump: patch - changes: - added: - - Historical carbon emissions parameter. - date: 2022-02-25 00:00:00 -- bump: minor - changes: - added: - - Pensioner exemption switch for Income Tax rate and threshold reforms. - date: 2022-02-28 00:00:00 -- bump: minor - changes: - changed: - - Re-weighting procedure formalised with cross-validation and logging. - date: 2022-02-28 00:00:01 -- bump: patch - changes: - added: - - Added a production-based carbon emissions parameter. - date: 2022-03-04 00:00:00 -- bump: patch - changes: - changed: - - Re-weighting procedure improved with consolidated categories and added income - source targeting. - date: 2022-03-04 00:00:01 -- bump: patch - changes: - fixed: - - Basic income means-test inclusion previously didn't work correctly (when turned - off) for Housing Benefit and Pension Credit. - date: 2022-03-08 00:00:00 -- bump: patch - changes: {} - date: 2022-03-08 00:00:01 -- bump: minor - changes: - added: - - 'Forecasting to 2027: new and improved household weights.' - date: 2022-03-23 00:00:00 -- bump: minor - changes: - added: - - 'Forecasting to 2027: new and improved household weights.' - date: 2022-03-24 00:22:00 -- bump: patch - changes: - fixed: - - Pull request merge action didn't correctly update the repo. - date: 2022-03-24 03:05:39 -- bump: patch - changes: - fixed: - - Bugs related to uprating parameters. - date: 2022-03-24 03:05:39 -- bump: minor - changes: - added: - - Tax and benefit changes announced in the 2022 Spring Statement. - - Inflation and real disposable income. - - Parameters for PIP, DLA, SDA, AA and Carer's Allowance. - changed: - - Added calibration make. - date: 2022-03-27 14:13:20 -- bump: minor - changes: - fixed: - - Synthetic FRS now successfully loads. - - Incorporates better calibration and imputations. - date: 2022-04-03 19:28:24 -- bump: minor - changes: - added: - - Total wealth variable. - date: 2022-04-05 09:41:35 -- bump: patch - changes: - fixed: - - Spring Statement Class 4 NI change correctly follows 2022/23 adjustment. - date: 2022-04-05 12:28:40 -- bump: patch - changes: - added: - - Carbon tax model page added. - date: 2022-04-05 14:23:50 -- bump: patch - changes: - fixed: - - A bug preventing the Synthetic FRS from loading. - date: 2022-04-07 09:51:58 -- bump: patch - changes: - added: - - Carbon emissions (production-based) by industry. - date: 2022-04-07 10:36:03 -- bump: patch - changes: - fixed: - - Chart on carbon intensities. - date: 2022-04-08 10:35:59 -- bump: minor - changes: - added: - - Dataset generation. - date: 2022-04-14 11:46:45 -- bump: patch - changes: - fixed: - - Failed import of policyengine_uk.tools - date: 2022-04-14 12:36:43 -- bump: patch - changes: - fixed: - - Failed imports of reform tools. - date: 2022-04-14 12:48:06 -- bump: patch - changes: - fixed: - - MANIFEST.in file re-added (caused previous two issues). - date: 2022-04-14 13:10:26 -- bump: patch - changes: - fixed: - - Land and carbon are calculated based off UK-wide statistics, not in-model statistics. - date: 2022-04-22 21:26:10 -- bump: minor - changes: - changed: - - Pension Credit code quality improvements. - fixed: - - Pension Credit missing disability elements. - date: 2022-04-26 12:10:51 -- bump: minor - changes: - changed: - - Calibration process improved with country-level targets. - date: 2022-04-29 09:29:26 -- bump: minor - changes: - added: - - Household-level phase-outs for basic income. - date: 2022-05-16 14:02:26 -- bump: patch - changes: - fixed: - - National Insurance thresholds pre-July, post-Spring Statement (inflation adjustments). - date: 2022-05-19 14:58:06 -- bump: patch - changes: - changed: - - Reorganize documentation and variables. - date: 2022-05-21 16:01:32 -- bump: patch - changes: - fixed: - - Baseline variables are now generated before calibration (fixes a bug causing - overestimation of benefit caseloads). - date: 2022-05-22 15:27:50 -- bump: minor - changes: - added: - - Miscellaneous benefit payment. - date: 2022-05-26 10:46:43 -- bump: minor - changes: - added: - - UK Government cost-of-living support measures. - date: 2022-05-26 13:04:11 -- bump: minor - changes: - added: - - Disability benefits to COL support measures. - date: 2022-05-26 16:16:50 -- bump: patch - changes: - added: - - References for some tax and UC parameters. - date: 2022-06-05 20:28:29 -- bump: minor - changes: - added: - - Dashboard tool for the calibration procedure. - - Loss components for aggregates in demographic targets. - fixed: - - A bug causing Pension Credit to under-react to increases in Income Tax. - date: 2022-07-25 11:14:58 -- bump: minor - changes: - added: - - TV licence fee. - date: 2022-07-27 10:14:59 -- bump: patch - changes: - fixed: - - Round marriage allowance. - date: 2022-08-25 17:36:23 -- bump: minor - changes: - - Refactored the parameter tree into the (gov/hh/calibration/contrib)|(dept) format. - date: 2022-08-28 14:45:36 -- bump: minor - changes: - added: - - Ofgem energy price cap subsidy parameters. - date: 2022-09-07 12:15:01 -- bump: patch - changes: - added: - - New monthly CPI values until July. - date: 2022-09-11 15:04:15 -- bump: minor - changes: - added: - - Energy Price Guarantee parametric reform. - date: 2022-09-14 19:32:06 -- bump: patch - changes: - fixed: - - Validation page. - date: 2022-09-15 13:40:02 -- bump: minor - changes: - added: - - Wealth tax. - date: 2022-09-17 16:24:23 -- bump: minor - changes: - added: - - Metadata for SDLT, LTT and LBTT parameters. - date: 2022-09-21 11:06:49 -- bump: minor - changes: - added: - - Flat basic income amount. - date: 2022-09-27 15:37:07 -- bump: patch - changes: - fixed: - - UC amount for single, under-25s after the last uprating. - date: 2022-10-04 11:02:45 -- bump: minor - changes: - changed: - - Moved to PolicyEngine Core. - date: 2022-10-22 18:22:07 -- bump: minor - changes: - changed: - - Roles to 'member'. - date: 2022-12-06 12:00:54 -- bump: patch - changes: - fixed: - - PolicyEngine-Core pinned to a minor version. - date: 2022-12-07 13:31:54 -- bump: patch - changes: - fixed: - - Incorporated Core fix. - date: 2022-12-07 13:50:34 -- bump: minor - changes: - added: - - LVT - - Carbon tax - - NI BRMAs - - NI domestic rates by local authority - date: 2022-12-11 18:29:22 -- bump: patch - changes: - added: - - Metadata for contrib parameters. - date: 2022-12-13 20:20:48 -- bump: patch - changes: - added: - - Metadata for PolicyEngine. - date: 2022-12-14 16:33:27 -- bump: patch - changes: - changed: - - Bumped PolicyEngine-Core. - date: 2022-12-15 16:10:43 -- bump: patch - changes: - added: - - Variable metadata for disability variables. - - Auto-update for the API. - date: 2022-12-20 10:59:01 -- bump: patch - changes: - added: - - ENV token for the deployment action. - date: 2022-12-20 11:41:05 -- bump: patch - changes: - added: - - Token for GitHub PR filing (deployment of the API). - date: 2022-12-20 14:11:35 -- bump: minor - changes: - added: - - Normalised poverty and deep poverty variables. - date: 2022-12-27 13:53:34 -- bump: patch - changes: - fixed: - - Bug causing UC housing entitlements to be too low for single people with children. - date: 2022-12-28 17:28:42 -- bump: patch - changes: - changed: - - Reorganised variables in the input tree. - date: 2022-12-30 17:05:40 -- bump: patch - changes: - added: - - Missing label in inputs. - date: 2023-01-03 20:32:56 -- bump: patch - changes: - changed: - - PolicyEngine Core version widened. - date: 2023-01-03 23:39:07 -- bump: patch - changes: - added: - - Metadata on modelled policies. - date: 2023-01-06 10:07:28 -- bump: patch - changes: - changed: - - Use `adds` and `subtracts` everywhere. - - Replace `aggr` with `add`. - - Apply `defined_for`. - - Use `default` arg to `select` rather than dummy `True` condition. - date: 2023-01-10 17:31:54 -- bump: minor - changes: - added: - - Monthly NI calculations. - date: 2023-01-19 22:59:56 -- bump: minor - changes: - added: - - VAT imputation and implementation. - date: 2023-01-25 21:14:21 -- bump: minor - changes: - added: - - Wealth tax brackets. - - Intermediate benefit uprating (multiplies by a percentage). - date: 2023-01-26 20:09:59 -- bump: patch - changes: - changed: - - MTR calculation limited to one person for speed improvement. - - Benefit cap implementation refactored to share code between UC and HB. - fixed: - - Property income reduces UC as unearned income. - date: 2023-01-27 09:21:35 -- bump: patch - changes: - changed: - - VAT adjusted to hit administrative targets. - date: 2023-01-27 13:02:28 -- bump: patch - changes: - changed: - - Raised default age from 18 to 30. - date: 2023-02-01 00:43:08 -- bump: patch - changes: - changed: - - Increased default age from 30 to 40. - date: 2023-02-01 03:38:40 -- bump: patch - changes: - fixed: - - Bug causing pension contributions to not be correctly deducted from taxable - income. - date: 2023-02-27 13:23:51 -- bump: patch - changes: - fixed: - - Energy Price Guarantee implementation. - date: 2023-02-27 15:06:37 -- bump: patch - changes: - added: - - Seasonality to EPG modelling (simple). - - EPG documentation updates. - date: 2023-02-27 15:37:16 -- bump: patch - changes: - fixed: - - Properly exclude primary residence values from the CEC wealth tax. - date: 2023-02-27 16:01:50 -- bump: patch - changes: - fixed: - - EPG properly included in net income. - date: 2023-02-27 16:53:13 -- bump: patch - changes: - fixed: - - EPG test used the wrong variable name. - date: 2023-02-27 17:19:33 -- bump: patch - changes: - fixed: - - Parameter updates for the CoL payments. - - Metadata for the CEC wealth tax. - date: 2023-03-02 11:57:32 -- bump: minor - changes: - added: - - State Pension uprating parameter. - fixed: - - Corporate wealth for pensioners capped to ensure consistency with pension income - in some cases. - - EBC end date is before 2023. - date: 2023-03-03 16:23:13 -- bump: patch - changes: - fixed: - - Bugs relating to private pension contributions. - date: 2023-03-14 18:22:37 -- bump: minor - changes: - changed: - - Fuel duty incidence assumed to be 100% on consumers. - date: 2023-03-15 11:40:17 -- bump: minor - changes: - changed: - - PolicyEngine Core data updates accounted for. - date: 2023-03-23 08:45:05 -- bump: patch - changes: - fixed: - - Made Survey-Enhance a dev dependency. - date: 2023-03-25 23:53:14 -- bump: patch - changes: - fixed: - - Import errors due to survey-enhance. - date: 2023-03-26 00:21:18 -- bump: patch - changes: - fixed: - - Marriage Allowance previously didn't have an economic impact. - date: 2023-03-30 14:03:15 -- bump: minor - changes: - added: - - Improvements to calibration routines. - date: 2023-04-01 09:38:48 -- bump: patch - changes: - added: - - Speed improvements - - Parameter metadata fixes - date: 2023-04-10 13:36:29 -- bump: minor - changes: - added: - - Extra tax bands for the UK and Scotland. - date: 2023-04-24 12:16:00 -- bump: minor - changes: - added: - - Spring Budget 2023 policy changes. - date: 2023-04-24 14:03:45 -- bump: minor - changes: - added: - - 2023 tax rates for UK and Scotland - date: 2023-04-24 14:04:39 -- bump: minor - changes: - added: - - Savings variable from the WAS. - fixed: - - Added logging for targets in imputations for completeness. - date: 2023-05-09 17:02:36 -- bump: patch - changes: - added: - - Missing labels for parameters. - date: 2023-05-23 12:04:57 -- bump: minor - changes: - added: - - Python 3.10 support. - date: 2023-05-27 15:52:33 -- bump: patch - changes: - fixed: - - Household basic income phase-out rate unit. - date: 2023-05-28 02:23:58 -- bump: minor - changes: - added: - - Marriage tax-related reforms. - date: 2023-06-18 09:17:08 -- bump: patch - changes: - fixed: - - A bug in the income-splitting logic that caused taxable incomes to be too low. - date: 2023-06-20 19:19:13 -- bump: minor - changes: - added: - - Updates to calibration statistics from 2023 benefits and tax sources. - date: 2023-07-09 19:21:46 -- bump: minor - changes: - fixed: - - Bug affecting the two-child limit (1% of households) - date: 2023-07-17 17:10:23 -- bump: minor - changes: - changed: - - Calibration updated with new DWP statistics. - date: 2023-07-21 12:20:43 -- bump: minor - changes: - added: - - Updates values for universal credit from 2016 to 2023 - date: 2023-08-07 16:52:20 -- bump: patch - changes: - fixed: - - Temporarily remove PIP, DLA and minimum wage parameters from the app. - date: 2023-08-12 17:36:09 -- bump: patch - changes: - added: - - Documentation for fuel duty. - date: 2023-08-24 14:59:45 -- bump: patch - changes: - added: - - Documentation example. - date: 2023-09-14 13:53:16 -- bump: patch - changes: - fixed: - - TOC entry for NI documentation. - date: 2023-09-14 15:25:24 -- bump: minor - changes: - added: - - Update Universal Credit documentation - date: 2023-09-14 15:31:01 -- bump: patch - changes: - added: - - Documentation for TV licence. - date: 2023-09-14 15:35:12 -- bump: patch - changes: - fixed: - - Small issues on the NI page. - date: 2023-09-14 16:06:31 -- bump: patch - changes: - removed: - - numpy pin. - date: 2023-10-09 19:01:07 -- bump: patch - changes: - added: - - Documentation for Stamp Duty Land Tax. - date: 2023-10-12 15:11:13 -- bump: minor - changes: - added: - - Child minimum age for basic income. - date: 2023-10-17 14:55:07 -- bump: minor - changes: - added: - - Pension Credit documentation page. - date: 2023-10-19 15:46:33 -- bump: patch - changes: - fixed: - - Bug causing child minimum basic income ages to function incorrectly when the - adult UBI is nonzero. - date: 2023-10-27 20:42:43 -- bump: patch - changes: - added: - - Documentation for Land and Buildings Transaction Tax. - - Documentation for Land Transaction Tax. - fixed: - - Updated LBTT rate increase for non-primary residences. - - Fixed SDLT description. - date: 2023-11-16 16:32:22 -- bump: minor - changes: - added: - - Switch for benefit uprating. - date: 2023-11-22 12:04:13 -- bump: minor - changes: - added: - - HM Treasury baseline for CPI uprating benefits. - date: 2023-11-22 15:17:21 -- bump: minor - changes: - added: - - Update National Insurance documentation - - Update Income Tax documentation - date: 2023-11-23 16:22:19 -- bump: patch - changes: - removed: - - 19% basic rate change proposed for 2024 that was never enacted. - date: 2023-11-23 18:03:37 -- bump: patch - changes: - fixed: - - Added missing label for benefit uprating. - date: 2023-11-24 10:49:06 -- bump: patch - changes: - fixed: - - Added missing label for benefit uprating. - date: 2023-11-26 14:29:46 -- bump: minor - changes: - added: - - Enhanced FRS version for December 2023. - date: 2023-12-05 12:45:18 -- bump: patch - changes: - added: - - Test cases for TV Licence. - date: 2023-12-14 16:07:36 -- bump: patch - changes: - added: - - Missing uprating parameters for 2018. - date: 2023-12-15 14:32:51 -- bump: minor - changes: - changed: - - Validated and standardised National Insurance variables. - date: 2023-12-15 14:54:47 -- bump: patch - changes: - fixed: - - Bump policyengine-core to capture simulation randomness bug fixes. - date: 2023-12-17 10:18:46 -- bump: patch - changes: - added: - - Added tests for fuel duty. - date: 2024-01-04 16:08:24 -- bump: minor - changes: - added: - - Update PIP documentation - date: 2024-01-04 16:18:59 -- bump: minor - changes: - changed: - - Calibration routine to include benefit cap statistics. - fixed: - - Benefit cap UC bug. - date: 2024-01-28 17:39:54 -- bump: minor - changes: - added: - - Add Income Tax test. - date: 2024-02-01 16:02:50 -- bump: minor - changes: - added: - - Household wealth decile. - changed: - - Assign decile of -1 to households with negative income. - date: 2024-02-17 21:35:30 -- bump: minor - changes: - added: - - Initial version of capital gains imputations and logic. - date: 2024-02-19 22:00:58 -- bump: minor - changes: - added: - - Docker image deployment for streamlit documentation. - date: 2024-02-19 22:26:55 -- bump: patch - changes: - changed: - - Lowered rates for Class 1 and Class 4 NICs, pursuant to the Autumn Statement - 2023 - - Set Class 2 NIC rate to 0%, pursuant to the Autumn Statement 2023 - date: 2024-03-04 18:45:44 -- bump: minor - changes: - fixed: - - Carbon tax intensities for 2024. - - UK NI rate for 2024. - date: 2024-03-05 11:48:27 -- bump: minor - changes: - added: - - Fuel duty revenue projections - date: 2024-03-05 17:37:39 -- bump: minor - changes: - added: - - add Income Tax Integration Test - date: 2024-03-07 16:04:57 -- bump: minor - changes: - changed: - - OBR forecast update. - date: 2024-04-12 17:36:36 -- bump: patch - changes: - fixed: - - Bug causing frs_2021 simulations to error. - - Unnecessary system initialisation code. - date: 2024-04-16 13:18:46 -- bump: minor - changes: - fixed: - - Capital gains tax improvements. - date: 2024-04-30 17:53:26 -- bump: patch - changes: - fixed: - - Update BRMAs. - date: 2024-04-30 18:10:23 -- bump: minor - changes: - added: - - State Pension Age reforms. - date: 2024-05-01 16:32:07 -- bump: minor - changes: - added: - - U.S. progress on labour supply responses. - date: 2024-05-02 11:47:45 -- bump: minor - changes: - added: - - Abolition switch for State Pension payments. - - Freeze switch for Pension Credit payments. - fixed: - - New benefit claimants are now accounted for in reforms. - date: 2024-05-23 17:20:21 -- bump: minor - changes: - added: - - Pensioner personal allowance - date: 2024-05-27 22:27:48 -- bump: minor - changes: - added: - - Improvements to State Pension handling. - - Basic/additional State Pension splitting. - date: 2024-05-28 11:46:47 -- bump: minor - changes: - added: - - Recent reforms to Income Tax and NI. - date: 2024-06-07 08:22:24 -- bump: minor - changes: - added: - - Conservative manifesto policy to move CB HITC to household based. - date: 2024-06-10 12:42:45 -- bump: minor - changes: - added: - - Budgetary change distributional impact parameters. - date: 2024-06-11 07:51:23 -- bump: minor - changes: - fixed: - - Property sale rates at 4.5%. - date: 2024-06-11 15:49:29 -- bump: patch - changes: - changed: - - Uprated PIP, DLA, and Accessibility Account - - Re-enabled PIP and DLA within webapp - - Corrected mistakes in PIP - date: 2024-06-17 16:09:43 -- bump: patch - changes: - added: - - Private school VAT calculation - date: 2024-06-28 00:49:27 -- bump: minor - changes: - added: - - Non-dom status switch. - date: 2024-06-28 16:35:47 -- bump: minor - changes: - added: - - High-income budget switch. - removed: - - Non-dom logic. - date: 2024-06-28 19:59:31 -- bump: minor - changes: - added: - - 2022-23 FRS. - date: 2024-07-10 18:29:49 -- bump: patch - changes: - added: - - Tests to income-related variables - date: 2024-07-10 18:58:10 -- bump: patch - changes: - added: - - Auto-updating of the household API when this package is updated - date: 2024-07-10 20:08:36 -- bump: patch - changes: - changed: - - Refactor the Universal Credit parameter, variable and test files. - date: 2024-07-11 14:58:53 -- bump: patch - changes: - changed: - - Refactor the Housing Benefit parameter, variable and test files. - date: 2024-07-15 12:12:25 -- bump: patch - changes: - added: - - References to many income tax provisions. - fixed: - - Folder distribution and formatting for income tax-related variables. - - pays_scottish_income_tax now returns a Boolean value. - date: 2024-07-17 15:26:43 -- bump: patch - changes: - fixed: - - Ensure household API version script bumps UK version - date: 2024-07-17 16:23:18 -- bump: major - changes: - changed: - - Fiscal years are years by default. - date: 2024-07-19 09:43:03 -- bump: minor - changes: - changed: - - Simplified uprating indices by moving OBR parameters to gov folder. - date: 2024-07-26 08:35:13 -- bump: minor - changes: - added: - - Tax on excess pension contributions - fixed: - - Include Scottish income tax calculation within overall UK income tax calculation - - Apply allowances to all types of income - - Prevent negative income tax output - - Update Dividend Allowance values - - Correct Starter Rate for Savings taper structure - - Prevent calculation errors due to empty extra dividend bracket with conflicting - rates - date: 2024-07-27 10:02:38 -- bump: minor - changes: - added: - - Winter Fuel Allowance. - date: 2024-07-29 16:47:34 -- bump: minor - changes: - added: - - Winter Fuel Payment to household benefits. - date: 2024-07-30 13:05:05 -- bump: minor - changes: - added: - - Docs page about SPI 2020/21 validation - fixed: - - Correct Scottish income tax rates for 2020/21 - date: 2024-08-08 15:33:05 -- bump: patch - changes: - changed: - - Corrected spelling on SPI validation documentation entry - - Corrected argparse version - date: 2024-08-12 22:11:31 -- bump: minor - changes: - fixed: - - Updated inflation uprating for COICOP categories. - date: 2024-08-15 11:09:56 -- bump: minor - changes: - added: - - CPI category forecasts. - date: 2024-08-15 11:36:14 -- bump: patch - changes: - added: - - Mask applied to private_school_vat to prevent calculation error when household - weights aren't provided - date: 2024-08-22 20:35:09 -- bump: patch - changes: - added: - - Test suite for private_school_vat - - Test suite for attends_private_school - removed: - - Unnecessary print statement in winter_fuel_allowance - date: 2024-08-28 23:37:22 -- bump: patch - changes: - changed: - - Update policyengine-core. - - Apply new approach to determine if in a microsimulation. - date: 2024-09-03 22:35:35 -- bump: patch - changes: - fixed: - - Ensure rent index is tracking CPI. - date: 2024-09-16 09:32:28 -- bump: minor - changes: - fixed: - - Missing metadata in variables. - - Inflation uprating for some parameters. - - Inconsistent variable capitalisation. - date: 2024-09-16 11:41:10 -- bump: major - changes: - changed: - - Dataset handling outsourced to policyengine-uk-data. - date: 2024-09-18 10:53:42 -- bump: minor - changes: - fixed: - - Add back recursive-include. - date: 2024-09-18 11:04:12 -- bump: patch - changes: - removed: - - Survey-Enhance as a dependency. - date: 2024-09-18 11:12:23 -- bump: minor - changes: - fixed: - - Add employer NI incidence. - date: 2024-10-16 11:52:07 -- bump: minor - changes: - changed: - - UK-data bumped to 1.5. - date: 2024-10-17 10:47:06 -- bump: minor - changes: - added: - - Employee incidence percentage for employer NICs. - date: 2024-10-17 21:43:42 -- bump: minor - changes: - changed: - - UK data package bumped to 1.6. - date: 2024-10-19 09:27:21 -- bump: minor - changes: - fixed: - - Bug in budget change reforms. - date: 2024-10-19 19:58:09 -- bump: minor - changes: - added: - - Automatic allocation of post-employee-incidence employee to households (consumers/capital). - date: 2024-10-21 10:09:01 -- bump: minor - changes: - fixed: - - Adjusted private school attendance factor to 0.85. - date: 2024-10-21 13:04:20 -- bump: minor - changes: - changed: - - UK data updated to 1.8.0. - date: 2024-10-22 08:36:24 -- bump: minor - changes: - changed: - - Data bumped to 1.9.0. - date: 2024-10-22 11:24:42 -- bump: minor - changes: - added: - - Benefit uprating for 2025/26. - date: 2024-10-23 10:15:26 -- bump: minor - changes: - added: - - Capital Gains Tax elasticities. - date: 2024-10-23 14:47:21 -- bump: minor - changes: - fixed: - - Bug causing household app crashes. - - Metadat for OBR parameters. - date: 2024-10-24 11:42:25 -- bump: patch - changes: - fixed: - - Bug causing capital gains responses to be calculated for every reform simulation. - date: 2024-10-24 13:24:27 -- bump: patch - changes: - fixed: - - Threshold freeze for ST extended to 2027. - date: 2024-10-28 10:46:29 -- bump: minor - changes: - fixed: - - Bugs affecting household app calculations. - date: 2024-10-28 12:09:01 -- bump: patch - changes: - fixed: - - NI threshold in 2027. - date: 2024-10-30 14:02:58 -- bump: minor - changes: - added: - - OBR Autumn 2024 EFO economic factors. - date: 2024-10-30 17:24:57 -- bump: patch - changes: - fixed: - - Bug in budget change reforms. - date: 2024-11-05 14:05:53 -- bump: minor - changes: - changed: - - Pinned UK data to 1.9.0. - date: 2024-11-28 16:54:41 -- bump: minor - changes: - fixed: - - Scottish baseline matched with Scottish Fiscal Commission. - date: 2024-12-04 16:48:42 -- bump: minor - changes: - added: - - Scottish Winter Fuel Payment equivalent. - date: 2024-12-05 12:43:06 -- bump: minor - changes: - removed: - - Unused parameters in the calibration folder. - date: 2025-02-11 11:14:35 -- bump: patch - changes: - fixed: - - Bug causing non-default datasets to not execute. - date: 2025-02-18 16:22:32 -- bump: patch - changes: - fixed: - - Bug in LSRs. - date: 2025-02-25 14:33:57 -- bump: patch - changes: - fixed: - - Capital gains LSRs bug. - date: 2025-02-25 16:13:06 -- bump: patch - changes: - fixed: - - Bug in universal childcare entitlement. - date: 2025-02-27 14:23:28 -- bump: minor - changes: - added: - - Two-child limit reform proposal. - date: 2025-02-28 15:38:29 -- bump: minor - changes: - added: - - Two-child limit age exemption reform for Child Tax Credit. - date: 2025-02-28 16:39:12 -- bump: minor - changes: - added: - - Separate reforms to exempt parents of under [x] from the UC child limit and - from CTC child limit. - date: 2025-03-03 12:11:29 -- bump: patch - changes: - fixed: - - Bug in higher rate threshold timing. - date: 2025-03-19 20:33:18 -- bump: patch - changes: - fixed: - - PRs now run tests fully. - date: 2025-03-23 23:09:48 -- bump: patch - changes: - fixed: - - OBR forecast parameters now affect other parameters. - date: 2025-03-25 11:03:07 -- bump: patch - changes: - fixed: - - Baseline microsimulations break with no reform. - date: 2025-03-25 11:47:32 -- bump: patch - changes: - fixed: - - Bug causing UK API impacts to fail. - date: 2025-03-26 14:42:25 -- bump: patch - changes: - changed: - - Updated with OBR forecast - date: 2025-03-26 17:50:04 -- bump: patch - changes: - fixed: - - Uprating that fails on ubuntu. - date: 2025-04-03 11:12:35 -- bump: patch - changes: - fixed: - - Bug in UC child limit calculation. - date: 2025-04-03 11:26:35 -- bump: minor - changes: - added: - - Rename 'study childcare entitlement' to 'care to learn' - date: 2025-04-07 09:00:36 -- bump: patch - changes: - fixed: - - Removed uk-data as a dependency from the package. - date: 2025-04-15 08:32:54 -- bump: patch - changes: - fixed: - - Corrected the is_parent variable to properly identify parents. - - Fixed logic in childcare programs to ensure accurate calculations. - date: 2025-04-15 14:14:21 -- bump: minor - changes: - added: - - Child eligible variables for childcare programs. - date: 2025-04-16 13:04:31 -- bump: patch - changes: - fixed: - - Delete redundant weeks_per_year file from extended childcare. - date: 2025-05-06 15:36:49 -- bump: patch - changes: - added: - - Added variable to represent partial usage of extended childcare entitlement - hours - - Updated extended childcare entitlement calculation to account for partial hours - usage - date: 2025-05-08 12:42:28 -- bump: minor - changes: - added: - - Public service spending variables. - date: 2025-05-21 09:46:26 -- bump: minor - changes: - fixed: - - Implemented 2016 Savings Credit eligibility restriction in Pension Credit. - date: 2025-05-22 11:02:05 -- bump: patch - changes: - fixed: - - Backdated parameters to 2015 for safety. - date: 2025-05-22 11:07:31 -- bump: minor - changes: - fixed: - - Pension Credit income sources. - date: 2025-05-22 11:22:00 -- bump: minor - changes: - fixed: - - Pension Credit income sources. - date: 2025-05-22 13:19:28 -- bump: patch - changes: - fixed: - - Removed duplicate parameters in Pension Credit. - date: 2025-05-27 10:44:15 -- bump: patch - changes: - fixed: - - Bug in employer NI incidence parameters. - date: 2025-05-28 09:03:21 -- bump: patch - changes: - changed: - - Refactored all Variable files to follow single-responsibility principle with - one Variable class per file. - - Split approximately 70 multi-Variable Python files into individual files, improving - code organization and maintainability. - date: 2025-06-06 16:15:25 -- bump: minor - changes: - added: - - Council tax projection parameters from OBR data. - date: 2025-06-09 09:54:52 -- bump: minor - changes: - changed: - - Updated employer National Insurance contribution rate to 15% from April 6, 2025. - date: 2025-06-09 11:32:22 -- bump: minor - changes: - added: - - ONS household population data from 2001-2043. - - Council tax per household projections from OBR data. - changed: - - Updated employer National Insurance contribution rate to 15% from April 6, 2025. - date: 2025-06-09 15:26:19 -- bump: minor - changes: - added: - - Winter Fuel Allowance means-testing reform. - date: 2025-06-11 08:59:43 -- bump: patch - changes: - added: - - Add test suite for abolition parameters functionality. - date: 2025-06-11 13:52:32 -- bump: patch - changes: - fixed: - - Bug with BRMA variable name. - date: 2025-06-12 12:42:27 -- bump: patch - changes: - fixed: - - Update UK parameters. - date: 2025-06-17 12:37:38 -- bump: patch - changes: - fixed: - - Abolish Council Tax has no budgetary impact. - date: 2025-06-30 11:28:06 -- bump: minor - changes: - added: - - Growth factor documentation. - date: 2025-07-09 12:34:06 -- bump: minor - changes: - fixed: - - Statutory maternity, paternity, and sick pay variables now use the `gov.obr.consumer_price_index` - for uprating. - - SSMG no longer is uprated by inflation. - date: 2025-07-10 10:02:17 -- bump: patch - changes: - fixed: - - Triple lock uses the average earnings index from the OBR. - date: 2025-07-10 12:10:52 -- bump: patch - changes: - fixed: - - Documentation improved for HBAI income concept. - - Restructured HBAI income variables to better match the official definition. - date: 2025-07-10 14:28:02 -- bump: patch - changes: - fixed: - - Bug in private pension income uprating. - date: 2025-07-10 15:42:46 -- bump: patch - changes: - added: - - Missing HBAI variables. - date: 2025-07-10 16:12:40 -- bump: patch - changes: - fixed: - - HBAI documentation updated to include Healthy Start vouchers and external child - payments. - date: 2025-07-10 16:14:53 -- bump: minor - changes: - changed: - - Earnings uprated with OBR average earnings rather than per-capita employment - income. - date: 2025-07-11 13:43:26 -- bump: patch - changes: - fixed: - - Private pension income index set to RPI<=5% - date: 2025-07-11 14:15:07 -- bump: minor - changes: - added: - - Documentation on growth factors. - - Cleaned up non-standard uprating factors for wealth variables. - - Added triple lock uprating detail and reform switches. - - Added ability to download entity datasets from HuggingFace. - date: 2025-07-13 13:11:45 -- bump: patch - changes: - fixed: - - Bug in loading entity tables. - date: 2025-07-13 19:47:46 -- bump: minor - changes: - added: - - Water bills projections. - date: 2025-07-14 10:36:08 -- bump: minor - changes: - fixed: - - Uprating for rent split by private and social rented sectors. - date: 2025-07-14 14:10:31 -- bump: patch - changes: - fixed: - - Lag CPI correctly for benefit uprating. - date: 2025-07-14 15:03:33 -- bump: patch - changes: - fixed: - - Temporarily suspended employer_ni_fixed_cost_change as it returns impacts in - the baseline. - date: 2025-07-15 08:50:48 -- bump: minor - changes: - added: - - Codecov coverage. - - Expanded .gitignore. - date: 2025-07-15 11:58:59 -- bump: patch - changes: - fixed: - - Improved water bills projections. - date: 2025-07-16 11:08:29 -- bump: patch - changes: - fixed: - - Use outturn data for council tax growth in England, Scotland, and Wales for - 2023-2025. - date: 2025-07-17 10:41:08 -- bump: patch - changes: - fixed: - - NI domestic rates taken as reported. - date: 2025-07-17 12:45:26 -- bump: minor - changes: - added: - - UKMultiYearDataset class to handle multiple fiscal years. - - Uprating of datasets using the `uprate` method. - date: 2025-07-21 13:23:31 -- bump: patch - changes: - fixed: - - Bug in handling downloads of UKMultiYearDataset from HuggingFace. - date: 2025-07-21 15:37:49 -- bump: patch - changes: - fixed: - - Bug in uprating. - date: 2025-07-22 09:37:07 -- bump: minor - changes: - changed: - - Standardize decimals in parameters. - date: 2025-07-22 19:49:35 -- bump: patch - changes: - changed: - - Update microdf_python dependency to >=1.0.0. - date: 2025-07-22 20:55:35 -- bump: patch - changes: - fixed: - - debug LHA lowercase - date: 2025-07-24 10:30:43 -- bump: patch - changes: - fixed: - - change LHA param name - date: 2025-07-24 13:53:51 -- bump: patch - changes: - fixed: - - Parameterize age 35 threshold in LHA shared accommodation rules - date: 2025-07-24 14:41:02 -- bump: minor - changes: - changed: - - Add after housing costs deflator - date: 2025-07-25 08:57:23 -- bump: minor - changes: - added: - - Scenario class for reforms. - - Documentation of Scenario and Simulation. - - Standardisation of uprating behaviour. - date: 2025-07-26 11:31:02 -- bump: patch - changes: - changed: - - Add Python 3.13 support and update CI workflows - - Updated policyengine-core dependency to >=3.19.0 for Python 3.13 support - - Updated GitHub Actions to latest versions (checkout@v4, setup-python@v5) for - Python 3.13 compatibility - - Set all workflows to use Python 3.13 - removed: - - Removed unused tables dependency that was blocking Python 3.13 compatibility - date: 2025-07-26 14:10:57 -- bump: patch - changes: - added: - - Add pydantic dependency to fix missing import in scenario utilities - date: 2025-07-26 20:54:03 -- bump: patch - changes: - changed: - - Separated out system.py to avoid bloat. - date: 2025-07-28 10:01:47 -- bump: patch - changes: - fixed: - - WFP reforms active. - - Growthfactors extended to 2040. - date: 2025-07-28 12:35:29 -- bump: patch - changes: - fixed: - - Minor missing variable attributes. - date: 2025-07-28 22:20:17 -- bump: minor - changes: - added: - - UC rebalancing reforms. - date: 2025-07-29 14:15:32 -- bump: patch - changes: - changed: - - HBAI benefits included at top level. - date: 2025-07-29 15:40:04 -- bump: minor - changes: - added: - - Docs upgraded to jupyter book 2. - - Model baseline page added. - - Capital gains tax baseline updated. - date: 2025-07-30 14:17:20 -- bump: patch - changes: - fixed: - - Bug caused by not resetting parameter caches. - date: 2025-07-31 13:39:16 -- bump: patch - changes: - fixed: - - Bug in NI rates. - date: 2025-08-01 09:00:11 -- bump: patch - changes: - fixed: - - Moved rent uprating to warning from error if before 2022. - date: 2025-08-04 12:54:43 -- bump: patch - changes: - changed: - - Dropped direct jupyter book dependency. - date: 2025-08-04 14:23:45 -- bump: patch - changes: - added: - - Utility function for comparing simulations added to `policyengine_uk.utils.compare`. - date: 2025-08-08 10:46:25 -- bump: minor - changes: - changed: - - Long-term OBR economic growfactors for 2030-10 and onwards. - date: 2025-08-08 11:34:55 -- bump: patch - changes: - fixed: - - Forecast window extended to 2030-31. - date: 2025-08-08 11:42:38 -- bump: patch - changes: - changed: - - Updated script to open automated API update PRs - date: 2025-08-08 15:09:27 -- bump: patch - changes: - fixed: - - Minor bug in comparison function. - date: 2025-08-09 09:01:58 -- bump: minor - changes: - fixed: - - Dropped support for <3.13. - date: 2025-08-12 09:29:55 -- bump: patch - changes: - fixed: - - Bug in multi year datasets. - date: 2025-08-12 09:48:46 -- bump: patch - changes: - fixed: - - Moved `Scenario` in top-level import. - date: 2025-08-12 14:17:09 -- bump: patch - changes: - fixed: - - Scenario class now supports all Reform object types and maintains backwards - compatibility. - date: 2025-08-13 08:14:33 -- bump: patch - changes: - fixed: - - Issue causing capital gains elasticities to not take effect. - date: 2025-08-14 16:30:16 -- bump: minor - changes: - fixed: - - Fuel duty is 52.95p per litre until 2026 where the temporary 5p cut is reversed, - and then risen with RPI - date: 2025-08-27 20:32:42 -- bump: minor - changes: - fixed: - - Baseline simulation created before simulation modifier is applied. - date: 2025-08-28 13:08:00 -- bump: patch - changes: - fixed: - - Re-enabled employer NI dynamics. - date: 2025-08-29 10:32:06 -- bump: patch - changes: - fixed: - - Fix bug in capital/consumer incidence. - date: 2025-08-29 13:54:13 -- bump: patch - changes: - fixed: - - Bug causing some households to claim both CTC and UC. - date: 2025-09-01 09:09:46 -- bump: patch - changes: - fixed: - - Fix behavioral response calculations returning zero FTE impacts due to simulation - state corruption - - Fix NaN values in wage relative change calculations during labor supply responses - - Fix income effect calculations by properly handling household_net_income timing - date: 2025-09-01 13:02:52 -- bump: patch - changes: - fixed: - - Removed bug-causing high income tax change variable. - date: 2025-09-02 13:00:40 -- bump: minor - changes: - fixed: - - Add real_hbai_household_net_income_ahc variable for convenience. - date: 2025-09-03 09:15:47 -- bump: minor - changes: - fixed: - - Update reduced vat expenditure share from OBR - date: 2025-09-10 09:28:56 -- bump: minor - changes: - fixed: - - Bugs in the benefit cap exemption list. - date: 2025-09-24 12:24:39 -- bump: patch - changes: - fixed: - - Updated carbon emissions data to latest available figures - date: 2025-09-24 15:33:18 -- bump: minor - changes: - fixed: - - Bugs in the benefit cap exemption list. - date: 2025-09-25 09:22:41 -- bump: patch - changes: - fixed: - - Temporarily disabled OBR participation responses. - date: 2025-09-29 12:26:51 -- bump: minor - changes: - added: - - Dataset filter function to extract single households for analysis. - changed: - - Default target variable for labour supply calculations to HBAI household net - income. - - Default adult count for labour supply calculations to 2. - fixed: - - Labour supply response calculation issues by removing inappropriate clipping - of marginal rates. - - Potential bug in labour supply response variable initialization order. - date: 2025-09-30 14:40:31 -- bump: patch - changes: - fixed: - - Fixed randomness between runs caused by UC reform. - date: 2025-10-15 12:18:22 -- bump: patch - changes: - fixed: - - Fix bug where changes to economic assumption parameters would not change uprating - behaviour. - date: 2025-10-17 15:01:31 -- bump: minor - changes: - fixed: - - Bug in state pension formulae causing issues when using datasets with year != - 2023. - date: 2025-10-20 12:43:40 -- bump: patch - changes: - fixed: - - Bug fix in state pension scripts. - date: 2025-10-20 12:51:40 -- bump: patch - changes: - fixed: - - Bug fix for decomp analysis. - date: 2025-10-21 12:08:26 -- bump: patch - changes: - added: - - Scenario now supports `applied_before_data_load` flag to control when parameter - changes and simulation modifiers are applied relative to data loading. - date: 2025-10-22 10:03:42 -- bump: minor - changes: - added: - - Salary sacrifice pension cap policy modeling (2,000 GBP cap on NI-exempt contributions) - date: 2025-11-20 12:24:29 -- bump: patch - changes: - changed: - - Updated microsimulation test expected values to reflect salary sacrifice calculation - improvements. - fixed: - - Salary sacrifice returned to income now cannot be negative. - - Adjusted salary sacrifice pension contributions now cannot go below zero. - date: 2025-11-20 14:51:58 -- bump: minor - changes: - changed: - - Salary sacrifice pension contributions above the cap are now redirected to employee - pension contributions (which receive income tax relief but pay NI) instead of - returning only to regular employment income. This better reflects the behavioral - assumption that individuals prioritize retirement savings. - date: 2025-11-21 14:59:20 -- bump: patch - changes: - fixed: - - Correct OBR March 2025 economic projections to match detailed forecast tables - date: 2025-11-26 18:40:43 -- bump: minor - changes: - changed: - - Update economic projections to OBR November 2025 Economic and Fiscal Outlook - forecasts (CPI, RPI, CPIH, average earnings, house prices, rents, mortgage interest) - date: 2025-11-26 19:23:28 -- bump: minor - changes: - added: - - Implement November 2025 Autumn Budget income source tax rate increases. Dividends - +2pp basic/higher from April 2026, savings +2pp from April 2027, property +2pp - from April 2027. - date: 2025-11-27 09:29:34 -- bump: minor - changes: - added: - - November 2025 Autumn Budget parameter updates. Extends income tax threshold - freeze (personal allowance GBP 12,570, higher rate GBP 50,270, additional rate - GBP 125,140) and NICs secondary threshold freeze (GBP 96/week) to April 2031. - Updates fuel duty schedule with freeze until September 2026, staggered 5p cut - reversal, and RPI uprating from April 2027. - date: 2025-11-27 16:24:25 -- bump: minor - changes: - added: - - Add student loan repayment modelling with parameters for Plan 1, 2, 4, 5 and - postgraduate loans, including thresholds and repayment rates. - date: 2025-11-28 11:59:37 -- bump: patch - changes: - fixed: - - Update HH net income calculation. - date: 2025-11-28 13:48:04 -- bump: patch - changes: - fixed: - - Fix fuel duty rates to use calendar year averages instead of incorrectly selecting - first rate of each year in reform calculations. Updates 2026-2029 rates to weighted - averages (53.45p, 59.02p, 61.11p, 62.90p) with detailed documentation of actual - source values and calculation methodology. - date: 2025-11-28 14:58:06 -- bump: patch - changes: - added: - - "Add 2026 Plan 2 student loan interest rate thresholds (lower \xA329,385, upper\ - \ \xA352,885) and freeze lower threshold 2027-2029 per Budget 2025" - date: 2025-12-01 03:34:34 -- bump: patch - changes: - changed: - - Vectorised BRMA LHA rate lookup for ~3s speedup on calculate calls. - date: 2025-12-01 11:11:26 -- bump: minor - changes: - added: - - Add owns vehicle variable - date: 2025-12-02 09:19:36 -- bump: patch - changes: - added: - - Add upper interest threshold freeze for Plan 2 student loans (Budget 2025) - date: 2025-12-02 14:16:53 -- bump: minor - changes: - added: - - Added gift_aid_grossed_up variable that computes Gift Aid grossed up by basic - rate per ITA 2007 s.58. - - Added comprehensive Gift Aid tests covering basic rate relief, higher rate relief, - and PA taper interaction. - changed: - - Added legislation references (legislation.gov.uk) to gift_aid and personal_allowance - variables. - fixed: - - Fixed Personal Allowance taper calculation to deduct grossed-up Gift Aid from - ANI per ITA 2007 s.58. Previously, Gift Aid donations did not reduce ANI for - PA taper purposes, causing high earners (GBP 100k-125k) to receive less tax - relief than legally entitled. - date: 2025-12-02 16:24:40 -- bump: minor - changes: - added: - - Two child limit repeal from April 2026 (Autumn Budget 2025) - sets UC and Tax - Credits child element limit to infinity - - "Salary sacrifice pension cap of \uFFFD2,000 from April 2029 (Autumn Budget\ - \ 2025)" - - Move inflation adjustment AHC back to BHC inflation. - date: 2025-12-03 11:59:49 -- bump: patch - changes: - fixed: - - Print statement. - date: 2025-12-03 12:45:46 -- bump: minor - changes: - fixed: - - Extend fiscal year parameter conversion to cover 2015-2040, fixing issues where - policies changing on April 6 (UK fiscal year start) were not reflected in simulations - for years 2026+. - date: 2025-12-03 16:17:09 -- bump: patch - changes: - changed: - - Bump policyengine-core to 3.23.0 (adds strict enum validation). - date: 2025-12-04 14:45:58 -- bump: patch - changes: - fixed: - - Fix fuel duty rates to use OBR November 2025 RPI forecasts. - date: 2025-12-05 16:29:26 -- bump: patch - changes: - added: - - Salary sacrifice pension cap reform (GBP 2,000 cap from April 2029) with broad-base - employer response modeling. - date: 2025-12-08 10:54:42 -- bump: patch - changes: - fixed: - - Basic state pension calculation. - date: 2025-12-08 21:37:03 -- bump: patch - changes: - fixed: - - Correct 2025-26 benefit cap rates (were incorrectly showing uprated values; - benefit cap has been frozen since 2023) - - Update UC parameter legislation references to point to exact regulation sections - on legislation.gov.uk - - Add missing 2025-26 Universal Credit non-dependent deduction amount (GBP 93.02) - date: 2025-12-08 22:13:29 -- bump: patch - changes: - fixed: - - Fixed employer_ni_fixed_employer_cost_change variable returning impacts in baseline - scenarios by correcting baseline parameter access. - date: 2025-12-09 08:44:22 -- bump: patch - changes: - added: - - Add savings, net_financial_wealth, gross_financial_wealth, and shareholding - to total_wealth calculation - date: 2025-12-09 09:47:39 -- bump: patch - changes: - added: - - Legislative references for marriage allowance take-up rate (Income Tax Act 2007 - s. 55B) - - Legislative references for married couple's allowance deduction rate (Income - Tax Act 2007 s. 46) - - Legislative references for income tax additions and subtractions (Income Tax - Act 2007 s. 23) - - Labels for 11 HMRC income tax parameters including annual allowance, personal - savings allowance, and savings starter rate parameters - changed: - - All HMRC income tax parameters now have proper labels and legislative references - date: 2025-12-09 10:09:16 -- bump: patch - changes: - fixed: - - Refactor variables with redundant adds/subtracts and formula definitions to - prevent sync issues - date: 2025-12-09 16:16:37 -- bump: minor - changes: - fixed: - - LHA freeze parameter. - date: 2026-01-12 16:12:34 -- bump: minor - changes: - added: - - Scottish Child Payment - a benefit provided by Social Security Scotland for - eligible children under 16 in low-income families receiving qualifying benefits - (UC, tax credits, etc.). - date: 2026-01-13 14:23:42 -- bump: minor - changes: - added: - - 2025-26 Scottish income tax rates. - date: 2026-01-13 15:46:23 -- bump: patch - changes: - fixed: - - Dataset uprating bug where region values weren't converted to strings for rent - indexing - - Salary sacrifice default behavior to be static (0) instead of fully optimized - (1.0) - date: 2026-01-13 17:13:11 -- bump: minor - changes: - added: - - Scottish Child Payment baby bonus reform. - date: 2026-01-15 15:17:19 -- bump: minor - changes: - changed: - - Remove randomness from country package by moving stochastic variable generation - to data package. Variables now read pre-computed values from datasets for deterministic, - reproducible calculations. - date: 2026-01-17 04:45:58 -- bump: patch - changes: - fixed: - - CI now runs on dependency updates (pyproject.toml, uv.lock changes) - - Fixed Scottish Child Payment test format to use array notation for person-level - output - date: 2026-01-17 17:17:54 -- bump: patch - changes: - added: - - Per-value legislative references for income tax allowances and minimum wage - rates - date: 2026-01-17 17:37:48 -- bump: patch - changes: - fixed: - - Extended childcare entitlement hours expansion date corrected from 2026-01-01 - to 2025-09-01 for children aged 9 months to 2 years, implementing the September - 2025 policy change that doubled free childcare from 15 to 30 hours per week - for working parents. - date: 2026-01-17 17:42:23 -- bump: patch - changes: - changed: - - Standardized all parameter labels to use sentence case, while preserving proper - names (e.g., "Bank of England", "Child Benefit") and acronyms (e.g., "HMRC", - "VAT", "NHS") - date: 2026-01-17 17:45:51 -- bump: patch - changes: - fixed: - - CI workflows now handle missing HUGGING_FACE_TOKEN gracefully, allowing Dependabot - PRs to run tests without failing on empty Bearer token errors. - date: 2026-01-17 18:05:46 -- bump: patch - changes: - fixed: - - Fixed Scottish Child Payment baby bonus reform to use Person-level variable - structure, matching the refactored base variable. The reform now correctly uses - parameterized baby bonus rates instead of hardcoded values. - - Fixed SCP baby bonus effective date to 2027-04-01 (fiscal year 2027-28) per - Scottish Budget 2026-27. - date: 2026-01-17 18:33:41 -- bump: patch - changes: - fixed: - - Skip behavioral response tests when HUGGING_FACE_TOKEN is not available (enables - Dependabot PRs to pass CI). - date: 2026-01-17 18:37:47 -- bump: minor - changes: - added: - - Scottish Child Payment increased to 28.20/week for 2026-27, per Scottish Budget - 2026-27. - date: 2026-01-17 18:39:20 -- bump: patch - changes: - fixed: - - Reverted premature SCP 2026-27 rate increase (not yet law). - - "Refactored SCP baby bonus reform to use \xA340/week total as the policy parameter\ - \ instead of a fixed bonus amount." - date: 2026-01-17 18:54:27 -- bump: minor - changes: - added: - - Scottish Child Payment rates from 2026-27 to 2030-31 per Scottish Fiscal Commission - forecasts. - - Scottish Child Payment baby boost under-1 total from 2027-28 to 2030-31 per - SFC forecasts. - - CPI uprating for SCP parameters for projections beyond 2030-31. - date: 2026-01-20 12:32:14 -- bump: patch - changes: - fixed: - - Add 2026-27 Scottish income tax threshold freeze to baseline (higher, advanced, - and top rates) per Scottish Budget 2025-26. - date: 2026-01-20 12:44:50 -- bump: patch - changes: - fixed: - - Scottish top rate (48%) threshold corrected from 125,140 to 112,570 (above personal - allowance). The threshold was incorrectly stored as the total income value instead - of the amount above PA, causing the top rate to effectively start at 137,710 - instead of 125,140. - date: 2026-01-21 11:55:12 -- bump: patch - changes: - changed: - - Bumped policyengine-core minimum version to 3.23.5 for pandas 3.0 compatibility - date: 2026-01-25 14:13:02 -- bump: patch - changes: - changed: - - Vectorised BRMA LHA rate lookup for ~3s speedup on calculate calls. - date: 2026-02-18 10:18:43 -- bump: minor - changes: - added: - - Student loan plan uprating in economic assumptions: re-labels Plan 1/2/5 each - year based on cohort start year, writes off loans after 29 years, and samples - new Plan 5 entrants for England using empirical age/income take-up probabilities. - date: 2026-02-19 17:30:26 -- bump: patch - changes: - fixed: - - Skip student loan uprating if column doesn't exist yet during dataset creation. - date: 2026-02-19 17:57:15 -- bump: patch - changes: - fixed: - - Enum columns now decode to string labels when accessing .person/.benunit/.household - on datasets loaded via non-URL paths (e.g. UKSingleYearDataset or UKMultiYearDataset - passed directly) - date: 2026-02-23 13:07:05 -- bump: minor - changes: - fixed: - - Include employer pension contributions and salary sacrifice in the Annual Allowance - tax charge calculation, per Finance Act 2004 s.233. - date: 2026-02-23 13:44:25 diff --git a/policyengine_uk/tests/microsimulation/reforms_config.yaml b/policyengine_uk/tests/microsimulation/reforms_config.yaml index af9f1a57a..be5a7f8ea 100644 --- a/policyengine_uk/tests/microsimulation/reforms_config.yaml +++ b/policyengine_uk/tests/microsimulation/reforms_config.yaml @@ -16,7 +16,7 @@ reforms: parameters: gov.hmrc.child_benefit.amount.additional: 25 - name: Reduce Universal Credit taper rate to 20% - expected_impact: -43.2 + expected_impact: -41.9 parameters: gov.dwp.universal_credit.means_test.reduction_rate: 0.2 - name: Raise Class 1 main employee NICs rate to 10% diff --git a/pyproject.toml b/pyproject.toml index bcad6ebf4..fb790af51 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,10 +67,44 @@ dev = [ "snowballstemmer>=2,<3", "jupyter-book>=2.0.0a0", "linecheck", - "rich", + "rich", "towncrier>=24.8.0", + ] [tool.pytest.ini_options] markers = [ "microsimulation: marks tests that use full microsimulation (deselect with '-m \"not microsimulation\"')", ] + +[tool.towncrier] +package = "policyengine_uk" +directory = "changelog.d" +filename = "CHANGELOG.md" +title_format = "## [{version}] - {project_date}" +issue_format = "" +underlines = ["", "", ""] + +[[tool.towncrier.type]] +directory = "breaking" +name = "Breaking changes" +showcontent = true + +[[tool.towncrier.type]] +directory = "added" +name = "Added" +showcontent = true + +[[tool.towncrier.type]] +directory = "changed" +name = "Changed" +showcontent = true + +[[tool.towncrier.type]] +directory = "fixed" +name = "Fixed" +showcontent = true + +[[tool.towncrier.type]] +directory = "removed" +name = "Removed" +showcontent = true