Skip to content

Add label column to variables table with search support#101

Merged
anth-volk merged 1 commit intomainfrom
add-variable-labels
Mar 11, 2026
Merged

Add label column to variables table with search support#101
anth-volk merged 1 commit intomainfrom
add-variable-labels

Conversation

@anth-volk
Copy link
Contributor

Fixes #100

Summary

  • Add nullable label column to variables table (Alembic migration)
  • Update seed script to persist label from policyengine.py Variable objects
  • Include label in search filter for GET /variables?search=
  • Add fixtures_variables.py with factory functions and 11 new tests

Test plan

  • TestListVariablesLabel — label returned, null when absent, empty preserved
  • TestSearchVariablesByLabel — search matches label, case-insensitive, partial
  • TestGetVariableLabel — GET by ID returns label and null label
  • TestVariablesByNameLabel — POST by-name returns labels correctly
  • TestVariableLabelCountryIsolation — label search respects country boundaries

🤖 Generated with Claude Code

Adds a nullable `label` column to the variables table so variable labels
from OpenFisca are persisted and searchable. Includes Alembic migration,
seed script update, label search in GET /variables, and 11 new tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Base automatically changed from app-v2-migration to main March 5, 2026 18:54
@anth-volk anth-volk marked this pull request as ready for review March 5, 2026 19:05
@anth-volk anth-volk requested a review from SakshiKekre March 5, 2026 19:05
@anth-volk anth-volk merged commit bb13933 into main Mar 11, 2026
1 check passed
@anth-volk anth-volk deleted the add-variable-labels branch March 11, 2026 20:34
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.

Add label column to variables table

1 participant