Skip to content

Commit 43d1c9f

Browse files
committed
Merge branch 'master' into update-microdf-v1
2 parents 4300343 + 8bdad4b commit 43d1c9f

674 files changed

Lines changed: 14018 additions & 7984 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/update_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
def main():
66
# First, find the current package version number from the setup.py file
7-
with open("setup.py", "r") as f:
7+
with open("pyproject.toml", "r") as f:
88
setup = f.read()
9-
version = setup.split("version=")[1].split(",")[0].strip('"')
9+
version = setup.split("version = ")[1].split(",")[0].strip('"')
1010
# Then, clone the https://github.com/policyengine/policyengine-api repo using the GitHub CLI
1111
pat = os.environ["GITHUB_TOKEN"]
1212
os.system(

.github/workflows/code_changes.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
args: ". -l 79 --check"
2323
Test:
24-
runs-on: ubuntu-latest
24+
runs-on: macos-latest
2525
permissions:
2626
contents: "read"
2727
id-token: "write"
@@ -44,15 +44,15 @@ jobs:
4444
run: uv pip install -e .[dev] --system
4545
- name: Install policyengine
4646
run: uv pip install policyengine --system
47-
- name: Run tests
47+
- name: UV sync
48+
run: uv sync
49+
- name: Run tests with coverage
4850
run: make test
4951
env:
5052
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
51-
- name: Build documentation
52-
run: make documentation
53-
- name: Deploy documentation
54-
uses: JamesIves/github-pages-deploy-action@releases/v3
53+
- name: Upload coverage to Codecov
54+
uses: codecov/codecov-action@v3
5555
with:
56-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57-
BRANCH: gh-pages # The branch the action should deploy to.
58-
FOLDER: docs/book/_build/html # The folder the action should deploy.
56+
file: ./coverage.xml
57+
fail_ci_if_error: false
58+
verbose: true

.github/workflows/pr_code_changes.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ jobs:
2121
with:
2222
args: ". -l 79 --check"
2323
Test:
24-
strategy:
25-
matrix:
26-
os: [ubuntu-latest, macos-latest]
27-
runs-on: ${{ matrix.os }}
24+
runs-on: macos-latest
2825
permissions:
2926
contents: "read"
3027
id-token: "write"
@@ -37,7 +34,7 @@ jobs:
3734
- name: Set up Python
3835
uses: actions/setup-python@v2
3936
with:
40-
python-version: '3.12'
37+
python-version: '3.11'
4138
- uses: "google-github-actions/auth@v2"
4239
with:
4340
workload_identity_provider: "projects/322898545428/locations/global/workloadIdentityPools/policyengine-research-id-pool/providers/prod-github-provider"
@@ -47,9 +44,17 @@ jobs:
4744
run: uv pip install -e .[dev] --system
4845
- name: Install policyengine
4946
run: uv pip install policyengine --system
50-
- name: Run tests
47+
- name: UV sync
48+
run: uv sync
49+
- name: Run tests with coverage
5150
run: make test
5251
env:
5352
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
53+
- name: Upload coverage to Codecov
54+
uses: codecov/codecov-action@v3
55+
with:
56+
file: ./coverage.xml
57+
fail_ci_if_error: false
58+
verbose: true
5459
- name: Test documentation builds
5560
run: make documentation

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,29 @@ policyengine_uk/calibration/*.h5
5454

5555
*.ipynb
5656
!docs/**/*.ipynb
57+
!uprating_growth_factors.csv
58+
59+
# Virtual environments
60+
.venv/
61+
venv/
62+
env/
63+
ENV/
64+
.env
65+
env.bak/
66+
venv.bak/
67+
.env*
68+
69+
# Coverage / testing
70+
htmlcov/
71+
.tox/
72+
.nox/
73+
.coverage
74+
.coverage.*
75+
.cache
76+
nosetests.xml
77+
coverage.xml
78+
*.cover
79+
*.py,cover
80+
.hypothesis/
81+
.pytest_cache/
82+
cover/

CHANGELOG.md

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,211 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.41.0] - 2025-07-22 19:49:35
9+
10+
### Changed
11+
12+
- Standardize decimals in parameters.
13+
14+
## [2.40.2] - 2025-07-22 09:37:07
15+
16+
### Fixed
17+
18+
- Bug in uprating.
19+
20+
## [2.40.1] - 2025-07-21 15:37:49
21+
22+
### Fixed
23+
24+
- Bug in handling downloads of UKMultiYearDataset from HuggingFace.
25+
26+
## [2.40.0] - 2025-07-21 13:23:31
27+
28+
### Added
29+
30+
- UKMultiYearDataset class to handle multiple fiscal years.
31+
- Uprating of datasets using the `uprate` method.
32+
33+
## [2.39.3] - 2025-07-17 12:45:26
34+
35+
### Fixed
36+
37+
- NI domestic rates taken as reported.
38+
39+
## [2.39.2] - 2025-07-17 10:41:08
40+
41+
### Fixed
42+
43+
- Use outturn data for council tax growth in England, Scotland, and Wales for 2023-2025.
44+
45+
## [2.39.1] - 2025-07-16 11:08:29
46+
47+
### Fixed
48+
49+
- Improved water bills projections.
50+
51+
## [2.39.0] - 2025-07-15 11:58:59
52+
53+
### Added
54+
55+
- Codecov coverage.
56+
- Expanded .gitignore.
57+
58+
## [2.38.2] - 2025-07-15 08:50:48
59+
60+
### Fixed
61+
62+
- Temporarily suspended employer_ni_fixed_cost_change as it returns impacts in the baseline.
63+
64+
## [2.38.1] - 2025-07-14 15:03:33
65+
66+
### Fixed
67+
68+
- Lag CPI correctly for benefit uprating.
69+
70+
## [2.38.0] - 2025-07-14 14:10:31
71+
72+
### Fixed
73+
74+
- Uprating for rent split by private and social rented sectors.
75+
76+
## [2.37.0] - 2025-07-14 10:36:08
77+
78+
### Added
79+
80+
- Water bills projections.
81+
82+
## [2.36.1] - 2025-07-13 19:47:46
83+
84+
### Fixed
85+
86+
- Bug in loading entity tables.
87+
88+
## [2.36.0] - 2025-07-13 13:11:45
89+
90+
### Added
91+
92+
- Documentation on growth factors.
93+
- Cleaned up non-standard uprating factors for wealth variables.
94+
- Added triple lock uprating detail and reform switches.
95+
- Added ability to download entity datasets from HuggingFace.
96+
97+
## [2.35.1] - 2025-07-11 14:15:07
98+
99+
### Fixed
100+
101+
- Private pension income index set to RPI<=5%
102+
103+
## [2.35.0] - 2025-07-11 13:43:26
104+
105+
### Changed
106+
107+
- Earnings uprated with OBR average earnings rather than per-capita employment income.
108+
109+
## [2.34.5] - 2025-07-10 16:14:53
110+
111+
### Fixed
112+
113+
- HBAI documentation updated to include Healthy Start vouchers and external child payments.
114+
115+
## [2.34.4] - 2025-07-10 16:12:40
116+
117+
### Added
118+
119+
- Missing HBAI variables.
120+
121+
## [2.34.3] - 2025-07-10 15:42:46
122+
123+
### Fixed
124+
125+
- Bug in private pension income uprating.
126+
127+
## [2.34.2] - 2025-07-10 14:28:02
128+
129+
### Fixed
130+
131+
- Documentation improved for HBAI income concept.
132+
- Restructured HBAI income variables to better match the official definition.
133+
134+
## [2.34.1] - 2025-07-10 12:10:52
135+
136+
### Fixed
137+
138+
- Triple lock uses the average earnings index from the OBR.
139+
140+
## [2.34.0] - 2025-07-10 10:02:17
141+
142+
### Fixed
143+
144+
- Statutory maternity, paternity, and sick pay variables now use the `gov.obr.consumer_price_index` for uprating.
145+
- SSMG no longer is uprated by inflation.
146+
147+
## [2.33.0] - 2025-07-09 12:34:06
148+
149+
### Added
150+
151+
- Growth factor documentation.
152+
153+
## [2.32.4] - 2025-06-30 11:28:06
154+
155+
### Fixed
156+
157+
- Abolish Council Tax has no budgetary impact.
158+
159+
## [2.32.3] - 2025-06-17 12:37:38
160+
161+
### Fixed
162+
163+
- Update UK parameters.
164+
165+
## [2.32.2] - 2025-06-12 12:42:27
166+
167+
### Fixed
168+
169+
- Bug with BRMA variable name.
170+
171+
## [2.32.1] - 2025-06-11 13:52:32
172+
173+
### Added
174+
175+
- Add test suite for abolition parameters functionality.
176+
177+
## [2.32.0] - 2025-06-11 08:59:43
178+
179+
### Added
180+
181+
- Winter Fuel Allowance means-testing reform.
182+
183+
## [2.31.0] - 2025-06-09 15:26:19
184+
185+
### Added
186+
187+
- ONS household population data from 2001-2043.
188+
- Council tax per household projections from OBR data.
189+
190+
### Changed
191+
192+
- Updated employer National Insurance contribution rate to 15% from April 6, 2025.
193+
194+
## [2.30.0] - 2025-06-09 11:32:22
195+
196+
### Changed
197+
198+
- Updated employer National Insurance contribution rate to 15% from April 6, 2025.
199+
200+
## [2.29.0] - 2025-06-09 09:54:52
201+
202+
### Added
203+
204+
- Council tax projection parameters from OBR data.
205+
206+
## [2.28.3] - 2025-06-06 16:15:25
207+
208+
### Changed
209+
210+
- Refactored all Variable files to follow single-responsibility principle with one Variable class per file.
211+
- Split approximately 70 multi-Variable Python files into individual files, improving code organization and maintainability.
212+
8213
## [2.28.2] - 2025-05-28 09:03:21
9214

10215
### Fixed
@@ -1787,6 +1992,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
17871992

17881993

17891994

1995+
[2.41.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.40.2...2.41.0
1996+
[2.40.2]: https://github.com/PolicyEngine/openfisca-uk/compare/2.40.1...2.40.2
1997+
[2.40.1]: https://github.com/PolicyEngine/openfisca-uk/compare/2.40.0...2.40.1
1998+
[2.40.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.39.3...2.40.0
1999+
[2.39.3]: https://github.com/PolicyEngine/openfisca-uk/compare/2.39.2...2.39.3
2000+
[2.39.2]: https://github.com/PolicyEngine/openfisca-uk/compare/2.39.1...2.39.2
2001+
[2.39.1]: https://github.com/PolicyEngine/openfisca-uk/compare/2.39.0...2.39.1
2002+
[2.39.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.38.2...2.39.0
2003+
[2.38.2]: https://github.com/PolicyEngine/openfisca-uk/compare/2.38.1...2.38.2
2004+
[2.38.1]: https://github.com/PolicyEngine/openfisca-uk/compare/2.38.0...2.38.1
2005+
[2.38.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.37.0...2.38.0
2006+
[2.37.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.36.1...2.37.0
2007+
[2.36.1]: https://github.com/PolicyEngine/openfisca-uk/compare/2.36.0...2.36.1
2008+
[2.36.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.35.1...2.36.0
2009+
[2.35.1]: https://github.com/PolicyEngine/openfisca-uk/compare/2.35.0...2.35.1
2010+
[2.35.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.34.5...2.35.0
2011+
[2.34.5]: https://github.com/PolicyEngine/openfisca-uk/compare/2.34.4...2.34.5
2012+
[2.34.4]: https://github.com/PolicyEngine/openfisca-uk/compare/2.34.3...2.34.4
2013+
[2.34.3]: https://github.com/PolicyEngine/openfisca-uk/compare/2.34.2...2.34.3
2014+
[2.34.2]: https://github.com/PolicyEngine/openfisca-uk/compare/2.34.1...2.34.2
2015+
[2.34.1]: https://github.com/PolicyEngine/openfisca-uk/compare/2.34.0...2.34.1
2016+
[2.34.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.33.0...2.34.0
2017+
[2.33.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.32.4...2.33.0
2018+
[2.32.4]: https://github.com/PolicyEngine/openfisca-uk/compare/2.32.3...2.32.4
2019+
[2.32.3]: https://github.com/PolicyEngine/openfisca-uk/compare/2.32.2...2.32.3
2020+
[2.32.2]: https://github.com/PolicyEngine/openfisca-uk/compare/2.32.1...2.32.2
2021+
[2.32.1]: https://github.com/PolicyEngine/openfisca-uk/compare/2.32.0...2.32.1
2022+
[2.32.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.31.0...2.32.0
2023+
[2.31.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.30.0...2.31.0
2024+
[2.30.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.29.0...2.30.0
2025+
[2.29.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.28.3...2.29.0
2026+
[2.28.3]: https://github.com/PolicyEngine/openfisca-uk/compare/2.28.2...2.28.3
17902027
[2.28.2]: https://github.com/PolicyEngine/openfisca-uk/compare/2.28.1...2.28.2
17912028
[2.28.1]: https://github.com/PolicyEngine/openfisca-uk/compare/2.28.0...2.28.1
17922029
[2.28.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.27.0...2.28.0

0 commit comments

Comments
 (0)