Skip to content

Decode enum values in US household results - #526

Merged
anth-volk merged 2 commits into
mainfrom
fix/459-decode-household-enums
Sep 22, 2026
Merged

anth-volk merged 2 commits into
mainfrom
fix/459-decode-household-enums

Conversation

@anth-volk

@anth-volk anth-volk commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #459

Summary

  • Request decoded enum values from the US country model when assembling household results.
  • Preserve the existing numerical result conversion.
  • Add regression coverage for scalar and axes-based enum outputs.
  • Update household snapshots to record enum names instead of numeric indices.

Testing

  • make format
  • make lint
  • uv run pytest tests -q --disable-warnings --cov=policyengine --cov-report= (1,116 passed, 9 skipped; four expected enum snapshot mismatches subsequently updated)
  • uv run pytest tests/test_household_calculator_snapshot.py tests/test_household_impact.py -q --disable-warnings (47 passed)
  • uv run mypy src/policyengine is blocked by an installed NumPy type-definition syntax error before project code is checked.

@anth-volk
anth-volk marked this pull request as ready for review September 22, 2026 15:49
@anth-volk
anth-volk merged commit 3faa7ed into main Sep 22, 2026
12 checks passed
@anth-volk
anth-volk deleted the fix/459-decode-household-enums branch September 22, 2026 15:49
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.

Household results return numeric indices for enum variables (state_code -> 4.0, filing_status -> 0.0)

1 participant