Skip to content

Test Data Seed Script #43

@calebyhan

Description

@calebyhan

Motivation

Both backend integration tests and frontend development need realistic sample data. A seed script provides consistent, repeatable test data that makes development and demos easier.

Deliverables

  • Create backend/script/seed_data.py that populates all tables with realistic sample data:
    • 3 admin accounts (2 admin, 1 staff)
    • 5 districts with mapping values
    • 15 senators across districts
    • 6 leadership positions
    • 4 committees with memberships
    • 10 news articles (mix of published/draft)
    • 8 legislation entries with 2-4 actions each
    • 10 calendar events
    • 4 carousel slides
    • 1 finance hearing config with 3 dates
    • 5 staff members
    • 6 static pages (powers, bill-process, disclosure, elections, how-to-apply, budget-process)
    • Budget data for 1 fiscal year with 5 top-level categories and sub-categories
    • 2 app config entries (staffer_app_open, finance_hearing_active)
  • Script should be idempotent (clear and re-seed)
  • Add to README instructions

Important Notes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions