policyengine-us icon indicating copy to clipboard operation
policyengine-us copied to clipboard

Add automated uprating metadata detection

Open PavelMakarchuk opened this issue 5 months ago • 2 comments

Fixes #6689

Implements a test and CLI tool to detect parameters that have been manually updated annually for 3+ years but lack uprating metadata.

Features:

  • Automated pytest that fails if missing uprating metadata detected
  • Command-line tool for detailed reporting
  • Growth rate filtering (0-10%) to distinguish inflation from policy changes
  • Centralized configuration for exclusions and thresholds
  • Comprehensive documentation

Files added:

  • policyengine_us/tests/code_health/uprating_metadata.py - pytest test
  • policyengine_us/tools/detect_missing_uprating.py - CLI detection tool
  • policyengine_us/tools/uprating_config.py - shared configuration
  • UPRATING_DETECTION.md - main documentation
  • HOW_TO_ADD_UPRATING_EXCLUSIONS.md - quick reference guide

Current findings: 414 parameters in 41 files need review

🤖 Generated with Claude Code

PavelMakarchuk avatar Oct 18 '25 07:10 PavelMakarchuk

Will update after merging #6672 which contains uprating changes

PavelMakarchuk avatar Oct 19 '25 12:10 PavelMakarchuk

Codecov Report

:x: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 90.00%. Comparing base (bb9ac27) to head (f226bdb). :warning: Report is 25 commits behind head on master.

Files with missing lines Patch % Lines
...gross_income/above_the_line_deductions/loss_ald.py 50.00% 1 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##            master    #6688       +/-   ##
============================================
- Coverage   100.00%   90.00%   -10.00%     
============================================
  Files            1        1               
  Lines           22       20        -2     
  Branches         0        1        +1     
============================================
- Hits            22       18        -4     
- Misses           0        1        +1     
- Partials         0        1        +1     
Flag Coverage Δ
unittests 90.00% <50.00%> (-10.00%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Oct 22 '25 13:10 codecov[bot]

@MaxGhenis reminder here, would help fill in some gaps

PavelMakarchuk avatar Nov 23 '25 09:11 PavelMakarchuk