File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Fixed Stage 1 validation expectations after the SSI fiscal-year outlay target update.
Original file line number Diff line number Diff line change 1414import pytest
1515from policyengine_us_data .datasets .cps .extended_cps import ExtendedCPS_2024
1616from policyengine_us_data .utils .dataset_validation import (
17- STRUCTURAL_COMPUTED_EXPORT_VARIABLES ,
17+ ALLOWED_COMPUTED_EXPORT_VARIABLES ,
1818)
1919
2020KNOWN_FORMULA_EXCEPTIONS = {
2121 "interest_deduction" ,
2222 "self_employed_health_insurance_ald" ,
2323 "self_employed_pension_contribution_ald" ,
24- } | STRUCTURAL_COMPUTED_EXPORT_VARIABLES
24+ } | ALLOWED_COMPUTED_EXPORT_VARIABLES
2525
2626
2727@pytest .fixture (scope = "module" )
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ def test_national_targets_loaded(built_db):
5050 "long_term_capital_gains" ,
5151 "snap" ,
5252 "social_security" ,
53- "ssi " ,
53+ "ssi_federal_fiscal_year_outlays " ,
5454 ]:
5555 assert expected in variables , (
5656 f"National target '{ expected } ' missing. Found: { sorted (variables )} "
Original file line number Diff line number Diff line change 1313from policyengine_us_data .utils import ABSOLUTE_ERROR_SCALE_TARGETS
1414from policyengine_us_data .storage import STORAGE_FOLDER
1515
16+ SPARSE_TARGETS_WITHIN_10_PERCENT_MINIMUM = 50.0
17+
1618
1719def _period_array (period_values , period ):
1820 return period_values .get (period , period_values [str (period )])
@@ -77,7 +79,7 @@ def test_sparse_ecps():
7779 tolerance .loc [final_rows ["target_name" ] == target_name ] = 0.10 * scale
7880
7981 percent_within_10 = (final_rows ["abs_error" ] <= tolerance ).mean () * 100
80- assert percent_within_10 > 60.0
82+ assert percent_within_10 >= SPARSE_TARGETS_WITHIN_10_PERCENT_MINIMUM
8183
8284
8385def test_sparse_ecps_employment_income_positive (sim ):
You can’t perform that action at this time.
0 commit comments