Skip to content

Commit a668c95

Browse files
committed
Fix bug in datasets
1 parent c918a0b commit a668c95

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

changelog_entry.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- bump: patch
2+
changes:
3+
fixed:
4+
- Bug where all datasets would be the last year.

src/policyengine/tax_benefit_models/uk/datasets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def create_datasets(
164164
name=f"{dataset}-year-{year}",
165165
description=f"UK Dataset for year {year} based on {dataset}",
166166
filepath=f"{data_folder}/{Path(dataset).stem}_year_{year}.h5",
167-
year=year,
167+
year=int(year),
168168
data=UKYearData(
169169
person=MicroDataFrame(person_df, weights="person_weight"),
170170
benunit=MicroDataFrame(
@@ -199,7 +199,7 @@ def load_datasets(
199199
name=f"{dataset}-year-{year}",
200200
description=f"UK Dataset for year {year} based on {dataset}",
201201
filepath=filepath,
202-
year=year,
202+
year=int(year),
203203
)
204204
uk_dataset.load()
205205

src/policyengine/tax_benefit_models/us/datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def create_datasets(
269269
name=f"{dataset}-year-{year}",
270270
description=f"US Dataset for year {year} based on {dataset}",
271271
filepath=f"{data_folder}/{Path(dataset).stem}_year_{year}.h5",
272-
year=year,
272+
year=int(year),
273273
data=USYearData(
274274
person=MicroDataFrame(person_df, weights="person_weight"),
275275
household=MicroDataFrame(

0 commit comments

Comments
 (0)