Skip to content

Conversation

@MaxGhenis
Copy link
Contributor

Summary

This PR improves code maintainability by fixing file naming inconsistencies in the codebase. It salvages valuable improvements from the old PR #1276 that are still relevant.

Changes

  • Renamed generic filenames to match their variable names:

    • credit.pyprior_year_minimum_tax_credit.py
    • credit.pyelderly_disabled_credit.py
    • credit.pygeneral_business_credit.py
  • Split multi-variable files to follow one-variable-per-file standard:

    • Split income.py into total_disability_payments.py and section_22_income.py
  • Fixed filename typos and formatting:

    • if_tanf_non_financial_eligible.pyil_tanf_non_financial_eligible.py (fixed "if" to "il" for Illinois)
    • il _cta_reduced_fare_program.pyil_cta_reduced_fare_eligible.py (removed space and matched variable name)

Testing

  • All affected variables tested and passing
  • No functional changes, only file renames

Context

This PR salvages the file naming improvements from old PR #1276, which had extensive merge conflicts. The original PR also included select statement improvements and defined_for additions, but those have already been implemented or are no longer needed.

Closes #1176 (partially - the select statement improvements were already done)

@MaxGhenis MaxGhenis closed this Jul 23, 2025
@MaxGhenis MaxGhenis reopened this Jul 23, 2025
- Rename generic filenames (credit.py, income.py, etc.) to match variable names
- Split income.py into separate files for total_disability_payments and section_22_income
- Fix Illinois filename typos and remove space from il_cta_reduced_fare_program.py
- Follows one-variable-per-file standard

Salvages improvements from old PR PolicyEngine#1276
- Move household-level variables to proper location under household entity
- Update expected decile value for single household test (gets decile 10)
- Fixes CI test failures
@MaxGhenis MaxGhenis force-pushed the add-defined-for-and-fix-naming branch from 4df54d1 to 0d3ed1d Compare July 23, 2025 03:47
@MaxGhenis MaxGhenis requested a review from PavelMakarchuk July 23, 2025 03:54
Copy link
Collaborator

@PavelMakarchuk PavelMakarchuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after test question

@PavelMakarchuk PavelMakarchuk merged commit 62fa54f into PolicyEngine:master Jul 23, 2025
3 checks passed
@MaxGhenis MaxGhenis deleted the add-defined-for-and-fix-naming branch July 23, 2025 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use default arg to select instead of a dummy True condition

2 participants