Skip to content

Conversation

@MaxGhenis
Copy link
Contributor

Summary

  • Adds test suite verifying policyengine-us works with pandas 3.0 changes
  • Tests state-based parameter lookups (StringArray handling)
  • Tests string-typed variables (filled_array with StringDtype)
  • Tests enum variables

Test plan

  • All 3 new pandas 3 compatibility tests pass locally
  • CI passes

These tests require policyengine-core >= 3.9.1 which has the pandas 3 compatibility fixes (merged in PolicyEngine/policyengine-core#424).

🤖 Generated with Claude Code

Tests verify that policyengine-us works with pandas 3.0 changes:
- State-based parameter lookups (StringArray handling)
- String-typed variables (filled_array with StringDtype)
- Enum variables

These tests require policyengine-core >= 3.9.1 which has the pandas 3 fixes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Jan 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.80%. Comparing base (7e781d3) to head (447180e).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##              main    #7233       +/-   ##
============================================
- Coverage   100.00%   75.80%   -24.20%     
============================================
  Files           12     3687     +3675     
  Lines          205    53026    +52821     
  Branches         0      263      +263     
============================================
+ Hits           205    40196    +39991     
- Misses           0    12769    +12769     
- Partials         0       61       +61     
Flag Coverage Δ
unittests 75.80% <ø> (-24.20%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

MaxGhenis and others added 3 commits January 24, 2026 10:47
Input variable for weeks looking for work during the year.
Sourced from CPS ASEC variable LKWEEKS.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove pandas <3.0 cap to allow pandas 3.0.0
- Add tests that directly test policyengine-core's:
  - filled_array handling of pandas StringDtype
  - VectorialParameterNodeAtInstant handling of StringArray

These tests will FAIL until policyengine-core >= 3.9.1 is released
with the pandas 3 compatibility fixes. This demonstrates TDD - the
tests catch the bug when the fix is not present.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
policyengine-core 3.23.4 includes fixes for:
- filled_array handling of pandas StringDtype
- VectorialParameterNodeAtInstant handling of StringArray

Tests should now pass with pandas 3.0.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
MaxGhenis and others added 2 commits January 24, 2026 23:23
policyengine-core 3.23.5 includes the fix for KeyError when encoding
Enum variables with pandas 3.0 StringDtype index.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This was accidentally included in the pandas 3.0 PR. Removing to
get Quick Feedback tests to pass (the new variable was triggering
full test suite instead of selective tests).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@MaxGhenis MaxGhenis merged commit 1412af8 into main Jan 25, 2026
8 of 9 checks passed
@MaxGhenis MaxGhenis deleted the add-pandas3-tests branch January 25, 2026 13:03
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.

2 participants