Skip to content

Commit 60278a1

Browse files
MaxGhenisclaude
andauthored
Remove SSTB/QBI compat shim, require policyengine-us 1.637.0 (#770)
* Remove SSTB/QBI compat shim now that us 1.637.0 ships natively policyengine-us 1.637.0 adds `sstb_self_employment_income`, `sstb_w2_wages_from_qualified_business`, `sstb_unadjusted_basis_qualified_property`, `sstb_self_employment_income_would_be_qualified`, `sstb_qualified_business_income`, `total_self_employment_income`, and the SSTB-aware QBI formulas as first-class variables (PR #7944). The data package no longer needs to backfill them. Bump the `policyengine-us` floor to `>=1.637.0`, delete the `ensure_policyengine_us_compat_variables` monkey-patch and its three call sites, and drop the compat-specific unit tests that validated the shim's SSTB variable registration and QBID arithmetic — those behaviors are now covered by policyengine-us's own test suite. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Lock policyengine-us 1.637.0 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Rename changelog fragment to PR number Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9d3f766 commit 60278a1

8 files changed

Lines changed: 14 additions & 578 deletions

File tree

changelog.d/770.changed.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Require `policyengine-us>=1.637.0`, which ships the SSTB QBI split inputs
2+
and formulas natively, and remove the in-package compat shim that
3+
backfilled those variables against older `policyengine-us` releases.

policyengine_us_data/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
from importlib import import_module
22

33
from .geography import ZIP_CODE_DATASET
4-
from .utils.policyengine import ensure_policyengine_us_compat_variables
5-
6-
ensure_policyengine_us_compat_variables()
74

85
_LAZY_EXPORTS = {
96
"CPS_2024": (

policyengine_us_data/db/validate_database.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111

1212
import pandas as pd
1313

14-
from policyengine_us_data.utils.policyengine import (
15-
ensure_policyengine_us_compat_variables,
16-
)
17-
1814

1915
DEFAULT_DB_PATH = (
2016
Path("policyengine_us_data") / "storage" / "calibration" / "policy_data.db"
@@ -30,8 +26,6 @@
3026

3127

3228
def validate_database(db_path: str | Path = DEFAULT_DB_PATH) -> None:
33-
ensure_policyengine_us_compat_variables()
34-
3529
from policyengine_us.system import system
3630

3731
conn = sqlite3.connect(str(db_path))

0 commit comments

Comments
 (0)