-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
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.pythat 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
- Depends on SQLAlchemy Models — Core Entities (Admin, Senator, District, Leadership) #3, SQLAlchemy Models — Content Entities (News, Committee, Staff, Config) #4, SQLAlchemy Models — Legislation, Events, Carousel, Finance, Budget #5 (all models must exist)
- Use realistic UNC-related data (e.g., real committee names like "Finance", "Rules and Judiciary", "Student Affairs")
- Calendar events should be centered around the current date (some past, some future)
- This script replaces the placeholder
reset_devscript referenced in README
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels