Skip to content

Commit c9c4478

Browse files
2023 CPS is uprated one year too few
Fixes #2544
1 parent eeb5a81 commit c9c4478

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

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 with the 2023 CPS.

policyengine_api/jobs/calculate_economy_simulation_job.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,9 @@ def _create_simulation_us(
637637
region_sim = Microsimulation(
638638
dataset=filter_dataset,
639639
reform=reform,
640+
default_input_period=(
641+
2023 if "2023" in filter_dataset else None
642+
),
640643
)
641644
df = region_sim.to_input_dataframe()
642645
state_code = region_sim.calculate(
@@ -653,6 +656,7 @@ def _create_simulation_us(
653656

654657
if dataset == "default" and region == "us":
655658
sim_options["dataset"] = datasets["us"]["cps"]
659+
sim_options["default_input_period"] = 2023
656660

657661
# Return completed simulation
658662
return Microsimulation(**sim_options)

0 commit comments

Comments
 (0)