From 1600947dc69e3e0ea78fdc6d8347973d1f742523 Mon Sep 17 00:00:00 2001 From: Nikhil Woodruff <35577657+nikhilwoodruff@users.noreply.github.com> Date: Thu, 24 Oct 2024 11:56:43 +0100 Subject: [PATCH] Fix bugs (#983) * Fix Economy parameters have the wrong units #981 * Fix Re-add household net income adds and subtracts lists #982 * Versioning --- CHANGELOG.md | 8 ++++++++ changelog.yaml | 6 ++++++ policyengine_uk/parameters/gov/obr/average_earnings.yaml | 1 - .../parameters/gov/obr/consumer_price_index.yaml | 1 - policyengine_uk/parameters/gov/obr/house_prices.yaml | 1 - .../gov/obr/inflation/food_beverages_and_tobacco.yaml | 1 - .../parameters/gov/obr/inflation/utilities.yaml | 1 - policyengine_uk/parameters/gov/obr/mortgage_interest.yaml | 1 - policyengine_uk/variables/household/income/income.py | 7 +++++++ setup.py | 2 +- 10 files changed, 22 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index baccb70f0..8170f5e0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.13.0] - 2024-10-24 11:42:25 + +### Fixed + +- Bug causing household app crashes. +- Metadat for OBR parameters. + ## [2.12.0] - 2024-10-23 14:47:21 ### Added @@ -1554,6 +1561,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +[2.13.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.12.0...2.13.0 [2.12.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.11.0...2.12.0 [2.11.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.10.0...2.11.0 [2.10.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.9.0...2.10.0 diff --git a/changelog.yaml b/changelog.yaml index 0467b8e34..e7d4e5db2 100644 --- a/changelog.yaml +++ b/changelog.yaml @@ -1304,3 +1304,9 @@ 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 diff --git a/policyengine_uk/parameters/gov/obr/average_earnings.yaml b/policyengine_uk/parameters/gov/obr/average_earnings.yaml index e05d93696..2b4b75201 100644 --- a/policyengine_uk/parameters/gov/obr/average_earnings.yaml +++ b/policyengine_uk/parameters/gov/obr/average_earnings.yaml @@ -23,7 +23,6 @@ values: 2028-01-01: 168.9 2029-01-01: 173.3 # Projected metadata: - unit: /1 reference: - title: OBR March 2024 EFO href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2024/ diff --git a/policyengine_uk/parameters/gov/obr/consumer_price_index.yaml b/policyengine_uk/parameters/gov/obr/consumer_price_index.yaml index 323e2005e..3cf7fe8ca 100644 --- a/policyengine_uk/parameters/gov/obr/consumer_price_index.yaml +++ b/policyengine_uk/parameters/gov/obr/consumer_price_index.yaml @@ -18,7 +18,6 @@ values: 2028-01-01: 143.7 2029-01-01: 146.6 # Projected metadata: - unit: /1 reference: - title: OBR March 2024 EFO href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2024/ \ No newline at end of file diff --git a/policyengine_uk/parameters/gov/obr/house_prices.yaml b/policyengine_uk/parameters/gov/obr/house_prices.yaml index 87221b682..caafb7c17 100644 --- a/policyengine_uk/parameters/gov/obr/house_prices.yaml +++ b/policyengine_uk/parameters/gov/obr/house_prices.yaml @@ -23,7 +23,6 @@ values: 2028-01-01: 159.5 2029-01-01: 165.7 # Projected metadata: - unit: currency-GBP reference: - title: OBR March 2024 EFO href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2024/ \ No newline at end of file diff --git a/policyengine_uk/parameters/gov/obr/inflation/food_beverages_and_tobacco.yaml b/policyengine_uk/parameters/gov/obr/inflation/food_beverages_and_tobacco.yaml index 92300aaa5..ad3e18ace 100644 --- a/policyengine_uk/parameters/gov/obr/inflation/food_beverages_and_tobacco.yaml +++ b/policyengine_uk/parameters/gov/obr/inflation/food_beverages_and_tobacco.yaml @@ -13,6 +13,5 @@ values: 2028-01-01: 1.461 2029-01-01: 1.497 # Projected metadata: - unit: currency-GBP reference: OBR label: Food and beverages inflation \ No newline at end of file diff --git a/policyengine_uk/parameters/gov/obr/inflation/utilities.yaml b/policyengine_uk/parameters/gov/obr/inflation/utilities.yaml index 91141c161..14acd0a87 100644 --- a/policyengine_uk/parameters/gov/obr/inflation/utilities.yaml +++ b/policyengine_uk/parameters/gov/obr/inflation/utilities.yaml @@ -13,6 +13,5 @@ values: 2028-01-01: 1.365 2029-01-01: 1.418 # Projected metadata: - unit: currency-GBP reference: OBR label: Utilities inflation \ No newline at end of file diff --git a/policyengine_uk/parameters/gov/obr/mortgage_interest.yaml b/policyengine_uk/parameters/gov/obr/mortgage_interest.yaml index 8b3351641..25f5dc8a3 100644 --- a/policyengine_uk/parameters/gov/obr/mortgage_interest.yaml +++ b/policyengine_uk/parameters/gov/obr/mortgage_interest.yaml @@ -23,7 +23,6 @@ values: 2028-01-01: 125.2 2029-01-01: 130.7 # Projected metadata: - unit: currency-GBP reference: - title: OBR March 2024 EFO href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2024/ \ No newline at end of file diff --git a/policyengine_uk/variables/household/income/income.py b/policyengine_uk/variables/household/income/income.py index f56a7686d..81be2cd11 100644 --- a/policyengine_uk/variables/household/income/income.py +++ b/policyengine_uk/variables/household/income/income.py @@ -185,6 +185,13 @@ class household_net_income(Variable): definition_period = YEAR value_type = float unit = GBP + adds = [ + "household_market_income", + "household_benefits", + ] + subtracts = [ + "household_tax", + ] def formula(household, period, parameters): market_income = household("household_market_income", period) diff --git a/setup.py b/setup.py index ebbb3f66c..b13609d50 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name="PolicyEngine-UK", - version="2.12.0", + version="2.13.0", author="PolicyEngine", author_email="nikhil@policyengine.org", classifiers=[