policyengine-uk 2.44.1__py3-none-any.whl → 2.45.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of policyengine-uk might be problematic. Click here for more details.

@@ -1,6 +1,11 @@
1
1
  description: Capital gains tax rate on additional rate taxpayers. This parameter is under active development and reforms including it should not be cited.
2
2
  values:
3
3
  2015-01-01: 0.2
4
+ 2025-04-06: 0.24
4
5
  metadata:
5
6
  unit: /1
6
7
  label: Capital Gains Tax additional rate
8
+ reference:
9
+ - title: Finance Act 2025(7)
10
+ href: https://www.legislation.gov.uk/ukpga/2025/8/section/7
11
+
@@ -1,6 +1,11 @@
1
1
  description: Capital gains tax rate on basic rate taxpayers. This parameter is under active development and reforms including it should not be cited.
2
2
  values:
3
3
  2015-01-01: 0.1
4
+ 2025-04-06: 0.18
4
5
  metadata:
5
6
  unit: /1
6
7
  label: Capital Gains Tax basic rate
8
+ reference:
9
+ - title: Finance Act 2025(7)
10
+ href: https://www.legislation.gov.uk/ukpga/2025/8/section/7
11
+
@@ -1,6 +1,10 @@
1
1
  description: Capital gains tax rate on higher rate taxpayers. This parameter is under active development and reforms including it should not be cited.
2
2
  values:
3
3
  2015-01-01: 0.2
4
+ 2025-04-06: 0.24
4
5
  metadata:
5
6
  unit: /1
6
7
  label: Capital Gains Tax higher rate
8
+ reference:
9
+ - title: Finance Act 2025(7)
10
+ href: https://www.legislation.gov.uk/ukpga/2025/8/section/7
@@ -10,8 +10,8 @@ values:
10
10
  reference:
11
11
  - title: National Insurance rates and thresholds
12
12
  href: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/882271/Table-a4.pdf
13
- 2025-04-06:
13
+ 2025-01-01:
14
14
  value: 0.15
15
15
  reference:
16
- - title: National Insurance rates and letters
17
- href: https://www.gov.uk/national-insurance-rates-letters
16
+ - title: National Insurance Contributions (Secondary Class 1 Contributions) Act 2025(1)
17
+ href: https://www.legislation.gov.uk/ukpga/2025/11/section/1
@@ -23,9 +23,13 @@ values:
23
23
  and National Insurance Funds Payments) Regulations 2022(6)
24
24
  value: 175
25
25
  2024-01-01: 175
26
- 2027-04-01:
27
- value: 175
28
- metadata:
29
- reference:
30
- - title: Spring Statement 2022
31
- href: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1062486/Spring_Statement_2022_Web_Accessible.pdf
26
+ 2025-01-01:
27
+ value: 96
28
+ reference:
29
+ - title: National Insurance Contributions (Secondary Class 1 Contributions) Act 2025(2)
30
+ href: https://www.legislation.gov.uk/ukpga/2025/11/section/2
31
+ 2027-01-01:
32
+ value: 96
33
+ reference:
34
+ - title: National Insurance Contributions (Secondary Class 1 Contributions) Act 2025(2)
35
+ href: https://www.legislation.gov.uk/ukpga/2025/11/section/2
@@ -117,6 +117,8 @@ class Simulation(CoreSimulation):
117
117
 
118
118
  # Apply structural modifiers
119
119
 
120
+ self.tax_benefit_system.reset_parameter_caches()
121
+
120
122
  if scenario is not None:
121
123
  if scenario.simulation_modifier is not None:
122
124
  scenario.simulation_modifier(self)
@@ -56,6 +56,13 @@ class CountryTaxBenefitSystem(TaxBenefitSystem):
56
56
  modelled_policies = COUNTRY_DIR / "modelled_policies.yaml"
57
57
  auto_carry_over_input_variables: bool = True
58
58
 
59
+ def reset_parameter_caches(self):
60
+ """Reset all caches in the tax-benefit system."""
61
+ self._parameters_at_instant_cache = {}
62
+ for parameter in self.parameters.get_descendants():
63
+ parameter._at_instant_cache = {}
64
+ self.parameters._at_instant_cache = {}
65
+
59
66
  def reset_parameters(self) -> None:
60
67
  """Reset parameters by reloading from the parameters directory."""
61
68
  self._parameters_at_instant_cache = {}
@@ -90,6 +97,7 @@ class CountryTaxBenefitSystem(TaxBenefitSystem):
90
97
  self.parameters.gov = convert_to_fiscal_year_parameters(
91
98
  self.parameters.gov
92
99
  )
100
+ self.reset_parameter_caches()
93
101
 
94
102
  def __init__(self):
95
103
  """Initialize the UK tax-benefit system with entities and parameters."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: policyengine-uk
3
- Version: 2.44.1
3
+ Version: 2.45.1
4
4
  Summary: PolicyEngine tax and benefit system for the UK
5
5
  Project-URL: Homepage, https://github.com/PolicyEngine/policyengine-uk
6
6
  Project-URL: Repository, https://github.com/PolicyEngine/policyengine-uk
@@ -21,6 +21,7 @@ Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Topic :: Scientific/Engineering :: Information Analysis
23
23
  Requires-Python: >=3.10
24
+ Requires-Dist: jupyter-book>=2.0.0a0
24
25
  Requires-Dist: microdf-python>=1.0.2
25
26
  Requires-Dist: policyengine-core>=3.19.3
26
27
  Requires-Dist: pydantic>=2.11.7
@@ -3,9 +3,9 @@ policyengine_uk/entities.py,sha256=9yUbkUWQr3WydNE-gHhUudG97HGyXIZY3dkgQ6Z3t9A,1
3
3
  policyengine_uk/microsimulation.py,sha256=k2u8v6TlHiu8hO5gCjd8-qOsfzorCnjrKfnvs8cbGOc,2676
4
4
  policyengine_uk/model_api.py,sha256=KdwJCL2HkXVxDpL6fCsCnQ9Sub6Kqp7Hyxlis3MNIx4,241
5
5
  policyengine_uk/modelled_policies.yaml,sha256=TLhvmkuI9ip-Fjq63n66RzDErCkN8K4BzY6XLxLMtFg,463
6
- policyengine_uk/simulation.py,sha256=OSozr0-Uk9Itz8feSi5SKkq-NZOhGCbN6QT4XDIrwKU,15157
6
+ policyengine_uk/simulation.py,sha256=laMnITFnpWqrx1h6F_0WTfjKOiNAsrH9d9obQmrQ0k8,15215
7
7
  policyengine_uk/system.py,sha256=Z-ax_ImUq5k4tycuThczTxQNW5iTE6ikBJIBQdKfIzU,91
8
- policyengine_uk/tax_benefit_system.py,sha256=7cahlxO7v-SzmyYSsteklCpkMuFOyOMomcYeh0LoRK8,4762
8
+ policyengine_uk/tax_benefit_system.py,sha256=7d5zITUezBcVw9AGvwXsE2Tb_AN-3HY4jMcueFRFaD4,5096
9
9
  policyengine_uk/data/__init__.py,sha256=J0bZ3WnvPzZ4qfVLYcwOc4lziMUMdbcMqJ3xwjoekbM,101
10
10
  policyengine_uk/data/dataset_schema.py,sha256=e4ST_kHSdlwX7Fd8rO5MRr2kXMejIJGXb0mUlKlVnEE,9912
11
11
  policyengine_uk/data/economic_assumptions.py,sha256=4ZmE6z8Bbf21n0Hm-IpsS04Astg2NJAypv9TdA_udEk,6189
@@ -325,10 +325,10 @@ policyengine_uk/parameters/gov/hmrc/minimum_wage.yaml,sha256=1oMbevU0ESHR51mcAG3
325
325
  policyengine_uk/parameters/gov/hmrc/business_rates/README.md,sha256=9ud50i_gMjGj6VymF-nzFDTzkFRMMJx6ybpLwbWzvpI,17
326
326
  policyengine_uk/parameters/gov/hmrc/business_rates/statistics.yaml,sha256=DkG5FmVI7l3tOiSZuwvxEzSjKFd0cUzCUy-9ybLO9MM,1341
327
327
  policyengine_uk/parameters/gov/hmrc/cgt/README.md,sha256=7CYCRXpmL-WnUN3FBmMcFYvYFW-aBT4b7a__pEccwF4,20
328
- policyengine_uk/parameters/gov/hmrc/cgt/additional_rate.yaml,sha256=B9GCGD79uf4vqLPakKPqHFXJCAjUfL6Ycl_Hl2UQNiE,245
328
+ policyengine_uk/parameters/gov/hmrc/cgt/additional_rate.yaml,sha256=zF-GLwlkZD6IHtOQR-TAAClqO4Q9KKj3lGI50y1lnlM,377
329
329
  policyengine_uk/parameters/gov/hmrc/cgt/annual_exempt_amount.yaml,sha256=fn9KWOkL2JRlcNx9adAOzvmPXyv-LdSNMKwZJXqF4LI,970
330
- policyengine_uk/parameters/gov/hmrc/cgt/basic_rate.yaml,sha256=eMsgUNlv3Ne942WwOigM9lgVMcrOtvGkx1gMZz54OEQ,235
331
- policyengine_uk/parameters/gov/hmrc/cgt/higher_rate.yaml,sha256=9HXdymGQ4mijqfuF1aAu7xsVGoksNtBF-d8DSn2JhXk,237
330
+ policyengine_uk/parameters/gov/hmrc/cgt/basic_rate.yaml,sha256=m1VeU51E1YCM-VLg-pIBr2Wk0hvDaBCYPBgED_qLgPA,367
331
+ policyengine_uk/parameters/gov/hmrc/cgt/higher_rate.yaml,sha256=8K0OSTM22QQ3ANfbe_0mrsg9VmiuNj06WxfhrbEFJZg,368
332
332
  policyengine_uk/parameters/gov/hmrc/child_benefit/README.md,sha256=I1wBH6qrEHjl-ZKj0RUuFxqISERrGrOfj14SKj6m4h0,16
333
333
  policyengine_uk/parameters/gov/hmrc/child_benefit/opt_out_rate.yaml,sha256=v_M5aLb3nbfAMnpCMI4fq2YUP-7ueHB3QfqMGTHnm4E,506
334
334
  policyengine_uk/parameters/gov/hmrc/child_benefit/amount/additional.yaml,sha256=YIpbNkGQxHjwYX2vkLvz6v49aznscREEqccOUMEsrM4,2437
@@ -386,14 +386,14 @@ policyengine_uk/parameters/gov/hmrc/national_insurance/README.md,sha256=a3h4gsZg
386
386
  policyengine_uk/parameters/gov/hmrc/national_insurance/index.yaml,sha256=EjxEdbkPMScjXDq1cxY7j6r9c9Qjg_VesFb0Pd6QYxM,105
387
387
  policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/README.md,sha256=xWgdlKZfJPDaUQEFwiEkBjiC4-1uxWfzx_dtwd8Vjag,10
388
388
  policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/rates/README.md,sha256=7BQUZXeqLAYckXMwDUfcQBuFTvTECmSMdGf9xDeTXNY,8
389
- policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/rates/employer.yaml,sha256=BxZ9RBToZEzj3YKclfCdcZbpmno0Ey86kw3L1XSNy3U,597
389
+ policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/rates/employer.yaml,sha256=-0Mvrd2dtxK4KxJ_2XAGILHx4IQ_4ULrWCQDF6HIozQ,642
390
390
  policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/rates/employee/README.md,sha256=I9TSeENJLqEroihEgmacXcpLSTYk6xD0rZIdDtoyRlI,11
391
391
  policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/rates/employee/additional.yaml,sha256=27_wnSiLAkvmaYx8YayjA4hqZ3QifL6xvGRX22olMU0,844
392
392
  policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/rates/employee/main.yaml,sha256=TPGUGN6wMf5qU7-oOTB4J3yV-9JhVoFraxqUzfmj5wU,1347
393
393
  policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/thresholds/README.md,sha256=A3U8dX-UwsRqx6VISR_0HE3DvhJN-LedFoylZYQA4gg,13
394
394
  policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/thresholds/lower_earnings_limit.yaml,sha256=11ys64O-72FSt_bjyl2vZiYdgFNw_iGfhxzZh6a7wzE,1220
395
395
  policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/thresholds/primary_threshold.yaml,sha256=lFwaQAMvG7KO9awxYU6fGSL13iQvFbodE3Q8pP3p1MU,1488
396
- policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/thresholds/secondary_threshold.yaml,sha256=ngK5a4ED9FW0Xfl9pu0KiZYZMdjy4l49rdA-utAUli0,1219
396
+ policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/thresholds/secondary_threshold.yaml,sha256=7bGrfWbg85Nj41gmE2EBwZGzq9S5aOLJX-0MJVkXQ5A,1373
397
397
  policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/thresholds/upper_earnings_limit.yaml,sha256=siF2hhpJUUqfZ-oSOlU_rsuFwQ6k80U62kbGreQvFhw,704
398
398
  policyengine_uk/parameters/gov/hmrc/national_insurance/class_2/README.md,sha256=FUkXZpnOvHr6Ydifr9-o9FgL3hdkz1xzTn__5CyFzMk,10
399
399
  policyengine_uk/parameters/gov/hmrc/national_insurance/class_2/flat_rate.yaml,sha256=V5mZcTaIULBUSYhADoxfOx6hUllB8ut0aozezhx7ffg,1134
@@ -1380,7 +1380,7 @@ policyengine_uk/variables/misc/spi_imputed.py,sha256=iPVlBF_TisM0rtKvO-3-PQ2UYCe
1380
1380
  policyengine_uk/variables/misc/uc_migrated.py,sha256=zFNcUJaO8gwmbL1iY9GKgUt3G6J9yrCraqBV_5dCvlM,306
1381
1381
  policyengine_uk/variables/misc/categories/lower_middle_or_higher.py,sha256=C54tHYz2DmOyvQYCC1bF8RJwRZinhAq_e3aYC-9F5fM,157
1382
1382
  policyengine_uk/variables/misc/categories/lower_or_higher.py,sha256=81NIbLLabRr9NwjpUZDuV8IV8_mqmp5NM-CZvt55TwE,129
1383
- policyengine_uk-2.44.1.dist-info/METADATA,sha256=pB_nOkDf0PjdEd8q_FNPtp8ADnKiMeZxFX3-rj9454E,3919
1384
- policyengine_uk-2.44.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
1385
- policyengine_uk-2.44.1.dist-info/licenses/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
1386
- policyengine_uk-2.44.1.dist-info/RECORD,,
1383
+ policyengine_uk-2.45.1.dist-info/METADATA,sha256=3Ic8Erdzpsb59DIllkD8rAMdq449rfO-Sn_8M7EMOH0,3956
1384
+ policyengine_uk-2.45.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
1385
+ policyengine_uk-2.45.1.dist-info/licenses/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
1386
+ policyengine_uk-2.45.1.dist-info/RECORD,,