File tree Expand file tree Collapse file tree
policyengine_us_data/datasets/cps/long_term Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 name : Documentation
5858 runs-on : ubuntu-latest
5959 if : |
60- github.event.head_commit.message != 'Update publication candidate' &&
61- github.event.head_commit.message != 'Finalize package version'
60+ !startsWith( github.event.head_commit.message, 'Update publication candidate') &&
61+ !startsWith( github.event.head_commit.message, 'Finalize package version')
6262 permissions :
6363 contents : write
6464 steps :
9393 - policyengine-us-freshness
9494 - data-release-version
9595 if : |
96- github.event.head_commit.message != 'Update publication candidate' &&
97- github.event.head_commit.message != 'Finalize package version'
96+ !startsWith( github.event.head_commit.message, 'Update publication candidate') &&
97+ !startsWith( github.event.head_commit.message, 'Finalize package version')
9898 outputs :
9999 version_sha : ${{ steps.version-commit.outputs.sha }}
100100 steps :
@@ -139,7 +139,7 @@ jobs:
139139 - run-context
140140 - policyengine-us-freshness
141141 - data-release-version
142- if : github.event.head_commit.message == 'Update publication candidate'
142+ if : startsWith( github.event.head_commit.message, 'Update publication candidate')
143143 permissions :
144144 actions : write
145145 contents : read
Original file line number Diff line number Diff line change 1+ Hardened publication workflow commit-message guards against squash commit bodies and fixed clone-all long-run support sanitization for partnership SE income.
Original file line number Diff line number Diff line change @@ -2423,7 +2423,7 @@ def _dependent_rows(df: pd.DataFrame | None) -> pd.DataFrame:
24232423 cloned ,
24242424 cloned .index ,
24252425 base_year = base_year ,
2426- raw_columns = WORKER_DONOR_NON_TARGET_INCOME_COMPONENTS ,
2426+ raw_columns = NON_TARGET_CLONE_INCOME_COMPONENTS ,
24272427 )
24282428 cloned .attrs ["sanitized_clone_non_target_income_columns" ] = tuple (
24292429 sanitized_columns
@@ -2834,7 +2834,7 @@ def build_role_composite_augmented_input_dataframe(
28342834 sanitized_worker_non_target_income_columns
28352835 ),
28362836 "clone_non_target_income_requested_components" : list (
2837- WORKER_DONOR_NON_TARGET_INCOME_COMPONENTS
2837+ NON_TARGET_CLONE_INCOME_COMPONENTS
28382838 ),
28392839 "clone_non_target_income_sanitized_columns" : sorted (
28402840 sanitized_clone_non_target_income_columns
Original file line number Diff line number Diff line change @@ -3069,6 +3069,13 @@ def test_compose_role_donor_rows_can_sanitize_worker_non_target_income():
30693069 0.0 ,
30703070 8_000.0 ,
30713071 ]
3072+ enriched ["partnership_se_income__2024" ] = [
3073+ 0.0 ,
3074+ 0.0 ,
3075+ - 9_000.0 ,
3076+ 0.0 ,
3077+ - 11_000.0 ,
3078+ ]
30723079
30733080 older_rows = enriched [enriched ["person_tax_unit_id__2024" ] == 201 ].copy ()
30743081 worker_rows = enriched [enriched ["person_tax_unit_id__2024" ] == 301 ].copy ()
@@ -3152,6 +3159,13 @@ def test_compose_role_donor_rows_can_sanitize_all_clone_non_target_income():
31523159 0.0 ,
31533160 8_000.0 ,
31543161 ]
3162+ enriched ["partnership_se_income__2024" ] = [
3163+ 0.0 ,
3164+ 0.0 ,
3165+ - 9_000.0 ,
3166+ 0.0 ,
3167+ - 11_000.0 ,
3168+ ]
31553169
31563170 older_rows = enriched [enriched ["person_tax_unit_id__2024" ] == 201 ].copy ()
31573171 worker_rows = enriched [enriched ["person_tax_unit_id__2024" ] == 301 ].copy ()
@@ -3199,10 +3213,15 @@ def test_compose_role_donor_rows_can_sanitize_all_clone_non_target_income():
31993213 )
32003214 assert clone ["taxable_private_pension_income__2024" ] == pytest .approx (0.0 )
32013215 assert clone ["partnership_s_corp_income__2024" ] == pytest .approx (0.0 )
3216+ assert clone ["partnership_se_income__2024" ] == pytest .approx (0.0 )
32023217 assert older_clone ["social_security_retirement__2024" ] == pytest .approx (20_000.0 )
32033218 assert worker_clone ["employment_income_before_lsr__2024" ] == pytest .approx (50_000.0 )
32043219 assert (
32053220 "long_term_capital_gains_before_response__2024"
32063221 in clone_df .attrs ["sanitized_clone_non_target_income_columns" ]
32073222 )
3223+ assert (
3224+ "partnership_se_income__2024"
3225+ in clone_df .attrs ["sanitized_clone_non_target_income_columns" ]
3226+ )
32083227 assert "sanitized_worker_non_target_income_columns" not in clone_df .attrs
You can’t perform that action at this time.
0 commit comments