policyengine-uk 2.40.0__py3-none-any.whl → 2.40.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.
- policyengine_uk/data/dataset_schema.py +5 -6
- policyengine_uk/system.py +6 -2
- policyengine_uk/tests/microsimulation/reforms_config.yaml +5 -5
- {policyengine_uk-2.40.0.data → policyengine_uk-2.40.1.data}/data/share/openfisca/openfisca-country-template/CHANGELOG.md +7 -0
- {policyengine_uk-2.40.0.dist-info → policyengine_uk-2.40.1.dist-info}/METADATA +1 -1
- {policyengine_uk-2.40.0.dist-info → policyengine_uk-2.40.1.dist-info}/RECORD +10 -10
- {policyengine_uk-2.40.0.data → policyengine_uk-2.40.1.data}/data/share/openfisca/openfisca-country-template/LICENSE +0 -0
- {policyengine_uk-2.40.0.data → policyengine_uk-2.40.1.data}/data/share/openfisca/openfisca-country-template/README.md +0 -0
- {policyengine_uk-2.40.0.dist-info → policyengine_uk-2.40.1.dist-info}/WHEEL +0 -0
- {policyengine_uk-2.40.0.dist-info → policyengine_uk-2.40.1.dist-info}/licenses/LICENSE +0 -0
@@ -213,12 +213,11 @@ class UKMultiYearDataset:
|
|
213
213
|
|
214
214
|
# Check if the file contains datasets for multiple years
|
215
215
|
with h5py.File(file_path, "r") as f:
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
raise ValueError("No household dataset found in the file.")
|
216
|
+
for required_dataset in ["person", "benunit", "household"]:
|
217
|
+
if not any(f"{required_dataset}" in key for key in f.keys()):
|
218
|
+
raise ValueError(
|
219
|
+
f"Dataset '{required_dataset}' not found in the file: {file_path}"
|
220
|
+
)
|
222
221
|
|
223
222
|
def load(self):
|
224
223
|
data = {}
|
policyengine_uk/system.py
CHANGED
@@ -202,9 +202,13 @@ class Microsimulation(CoreMicrosimulation):
|
|
202
202
|
dataset = UKMultiYearDataset(
|
203
203
|
file_path=dataset_file_path
|
204
204
|
)
|
205
|
-
except:
|
205
|
+
except Exception as e:
|
206
206
|
pass
|
207
|
-
|
207
|
+
|
208
|
+
if not isinstance(
|
209
|
+
dataset, (UKSingleYearDataset, UKMultiYearDataset)
|
210
|
+
):
|
211
|
+
dataset = Dataset.from_file(dataset_file_path)
|
208
212
|
|
209
213
|
super().__init__(*args, dataset=dataset, **kwargs)
|
210
214
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
reforms:
|
2
2
|
- name: Raise basic rate by 1pp
|
3
|
-
expected_impact: 7.
|
3
|
+
expected_impact: 7.5
|
4
4
|
parameters:
|
5
5
|
gov.hmrc.income_tax.rates.uk[0].rate: 0.21
|
6
6
|
- name: Raise higher rate by 1pp
|
7
|
-
expected_impact: 4.
|
7
|
+
expected_impact: 4.7
|
8
8
|
parameters:
|
9
9
|
gov.hmrc.income_tax.rates.uk[1].rate: 0.42
|
10
10
|
- name: Raise personal allowance by ~800GBP/year
|
@@ -16,7 +16,7 @@ reforms:
|
|
16
16
|
parameters:
|
17
17
|
gov.hmrc.child_benefit.amount.additional: 25
|
18
18
|
- name: Reduce Universal Credit taper rate to 20%
|
19
|
-
expected_impact: -36.
|
19
|
+
expected_impact: -36.4
|
20
20
|
parameters:
|
21
21
|
gov.dwp.universal_credit.means_test.reduction_rate: 0.2
|
22
22
|
- name: Raise Class 1 main employee NICs rate to 10%
|
@@ -24,10 +24,10 @@ reforms:
|
|
24
24
|
parameters:
|
25
25
|
gov.hmrc.national_insurance.class_1.rates.employee.main: 0.1
|
26
26
|
- name: Raise VAT standard rate by 2pp
|
27
|
-
expected_impact: 18.
|
27
|
+
expected_impact: 18.9
|
28
28
|
parameters:
|
29
29
|
gov.hmrc.vat.standard_rate: 0.22
|
30
30
|
- name: Raise additional rate by 3pp
|
31
|
-
expected_impact: 5.
|
31
|
+
expected_impact: 5.3
|
32
32
|
parameters:
|
33
33
|
gov.hmrc.income_tax.rates.uk[2].rate: 0.48
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [2.40.1] - 2025-07-21 15:37:49
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
|
12
|
+
- Bug in handling downloads of UKMultiYearDataset from HuggingFace.
|
13
|
+
|
8
14
|
## [2.40.0] - 2025-07-21 13:23:31
|
9
15
|
|
10
16
|
### Added
|
@@ -1974,6 +1980,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
1974
1980
|
|
1975
1981
|
|
1976
1982
|
|
1983
|
+
[2.40.1]: https://github.com/PolicyEngine/openfisca-uk/compare/2.40.0...2.40.1
|
1977
1984
|
[2.40.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.39.3...2.40.0
|
1978
1985
|
[2.39.3]: https://github.com/PolicyEngine/openfisca-uk/compare/2.39.2...2.39.3
|
1979
1986
|
[2.39.2]: https://github.com/PolicyEngine/openfisca-uk/compare/2.39.1...2.39.2
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: policyengine-uk
|
3
|
-
Version: 2.40.
|
3
|
+
Version: 2.40.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
|
@@ -3,9 +3,9 @@ policyengine_uk/entities.py,sha256=9yUbkUWQr3WydNE-gHhUudG97HGyXIZY3dkgQ6Z3t9A,1
|
|
3
3
|
policyengine_uk/model_api.py,sha256=D5OuQpQbdBXiF6r7LvCLWjsTkAWtkeBJWz2ebsJ-GN0,189
|
4
4
|
policyengine_uk/modelled_policies.yaml,sha256=TLhvmkuI9ip-Fjq63n66RzDErCkN8K4BzY6XLxLMtFg,463
|
5
5
|
policyengine_uk/repo.py,sha256=-dqpIMUD7UUj94ql9XwaMrFJUYKvNhFQ_9uj83Z8uh0,55
|
6
|
-
policyengine_uk/system.py,sha256=
|
6
|
+
policyengine_uk/system.py,sha256=jfMN-0cDBMsbqIgTenRxCblSY3o69YIeSWGFaBgF76s,9719
|
7
7
|
policyengine_uk/data/__init__.py,sha256=J0bZ3WnvPzZ4qfVLYcwOc4lziMUMdbcMqJ3xwjoekbM,101
|
8
|
-
policyengine_uk/data/dataset_schema.py,sha256=
|
8
|
+
policyengine_uk/data/dataset_schema.py,sha256=aiBxxEwuYQ5TobkX1U8PM0sQK9c58MGJHnHfL2Aymso,8215
|
9
9
|
policyengine_uk/data/economic_assumptions.py,sha256=YOwoY2Id5Zrhvz5hFbjZEc-maPCzNvNgsVD7xXzu5v4,5825
|
10
10
|
policyengine_uk/data/uprating_indices.yaml,sha256=kQtfeGWyqge4dbJhs0iF4kTMqovuegill_Zfs8orJi4,2394
|
11
11
|
policyengine_uk/parameters/gov/README.md,sha256=bHUep1_2pLHD3Or8SwjStOWXDIbW9OuYxOd4ml8IXcM,13
|
@@ -528,7 +528,7 @@ policyengine_uk/reforms/policyengine/disable_simulated_benefits.py,sha256=siEs1E
|
|
528
528
|
policyengine_uk/tests/test_parameter_metadata.py,sha256=_2w2dSokAf5Jskye_KIL8eh80N7yIrUszlmqnZtwQws,450
|
529
529
|
policyengine_uk/tests/code_health/test_variables.py,sha256=9Y-KpmzhyRGy9eEqocK9z91NXHX5QIF3mDMNGvegb7Q,1398
|
530
530
|
policyengine_uk/tests/microsimulation/README.md,sha256=1toB1Z06ynlUielTrsAaeo9Vb-c3ZrB3tbbR4E1xUGk,3924
|
531
|
-
policyengine_uk/tests/microsimulation/reforms_config.yaml,sha256=
|
531
|
+
policyengine_uk/tests/microsimulation/reforms_config.yaml,sha256=nBWu7nUmxnK4DddKvtpYwqcBeMVKFMUo_hxyy84JPqg,1086
|
532
532
|
policyengine_uk/tests/microsimulation/test_reform_impacts.py,sha256=xM3M2pclEhA9JIFpnuiPMy1fEBFOKcSzroRPk73FPls,2635
|
533
533
|
policyengine_uk/tests/microsimulation/test_validity.py,sha256=RWhbSKrnrZCNQRVmGYlM8hnpe1_Blo5_xP8vr8u3kV0,694
|
534
534
|
policyengine_uk/tests/microsimulation/update_reform_impacts.py,sha256=2pxp2RNLWxV4CesGKKHmg3qBs79Jq2Jcq3GJIBk4euU,4824
|
@@ -1367,10 +1367,10 @@ policyengine_uk/variables/misc/spi_imputed.py,sha256=iPVlBF_TisM0rtKvO-3-PQ2UYCe
|
|
1367
1367
|
policyengine_uk/variables/misc/uc_migrated.py,sha256=zFNcUJaO8gwmbL1iY9GKgUt3G6J9yrCraqBV_5dCvlM,306
|
1368
1368
|
policyengine_uk/variables/misc/categories/lower_middle_or_higher.py,sha256=C54tHYz2DmOyvQYCC1bF8RJwRZinhAq_e3aYC-9F5fM,157
|
1369
1369
|
policyengine_uk/variables/misc/categories/lower_or_higher.py,sha256=81NIbLLabRr9NwjpUZDuV8IV8_mqmp5NM-CZvt55TwE,129
|
1370
|
-
policyengine_uk-2.40.
|
1371
|
-
policyengine_uk-2.40.
|
1372
|
-
policyengine_uk-2.40.
|
1373
|
-
policyengine_uk-2.40.
|
1374
|
-
policyengine_uk-2.40.
|
1375
|
-
policyengine_uk-2.40.
|
1376
|
-
policyengine_uk-2.40.
|
1370
|
+
policyengine_uk-2.40.1.data/data/share/openfisca/openfisca-country-template/CHANGELOG.md,sha256=1thWgvi6m-2TluD4E_pjDHWlMO9yylKoKoJI44sAWOw,57255
|
1371
|
+
policyengine_uk-2.40.1.data/data/share/openfisca/openfisca-country-template/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
|
1372
|
+
policyengine_uk-2.40.1.data/data/share/openfisca/openfisca-country-template/README.md,sha256=PCy7LRLdUDQS8U4PaeHeBVnyBZAqHv1dAVDDvEcom20,1976
|
1373
|
+
policyengine_uk-2.40.1.dist-info/METADATA,sha256=daR6DOfA6QpGQy4k8iW-m4nS-rpSt4sljKKw8Vk8Oac,3502
|
1374
|
+
policyengine_uk-2.40.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
1375
|
+
policyengine_uk-2.40.1.dist-info/licenses/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
|
1376
|
+
policyengine_uk-2.40.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|