feat(seed): sample feed, catalogue, crews and dev persons #73
No reviewers
Labels
No labels
in-progress
in-review
ready-for-agent
seam-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
patrick/Polaris!73
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/db-seed"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Adds
polaris seed: one command that loads a fully demoable Polaris database. It fills in the full catalogue planners and admins work against (service types, the skills they require, and reason codes covering every hold/cancel/unplan/failure/rejection kind), stands up three crews with their people, home bases and a complete week of shifts, links a technician account (and the other four LDAP dev logins) to realpersonrows by username, and loads the sample telematics feed document from the design doc so there's something to look at before the real ingest pipeline exists. Running the command again is a no-op — nothing gets duplicated, so it's safe to include in any dev/demo bootstrap.Related Issues
Closes #14. Row PH1.6 in
docs/12-implementation-plan.md.Type of Change
Breaking Changes
None.
Test Plan
Tests green (unit + integration against a real Postgres+PostGIS via testcontainers). Also verified manually end to end outside pytest: ran the Alembic migrations against a fresh Postgres+PostGIS container, then ran
polaris seedtwice — the second run reported the same four applied modules and left every table's row count unchanged (3 crews, 7 crew members, 7 crew-skill links, 21 shifts, 11 persons, 4 skills, 5 service types, 6 service-type-skill links, 9 reason codes, 1 vehicle, 1 ingest record), and every audit row was written in the same transaction as its row.Checklist
docs/updated for any behavioural change (ADR added if a prior decision was reversed)polaris.domainAdditional Context
This row's owned-paths list only names
backend/src/polaris/seed/**andbackend/tests/fixtures/feed/**, but delivering a runnablepolaris seedcommand needs one small additive file outside that glob:backend/src/polaris/cli/seed.py(plus its test,backend/tests/unit/cli/test_seed_command.py), dropped into the existing CLI-discovery seam exactly the way PH1.4 addedcli/replay_run.py— no edit tocli/__init__.py, so it can't conflict with any other branch's own newcli/*.pyfile. Also added new (nobody else's) test directoriesbackend/tests/unit/seed/**andbackend/tests/integration/seed/**for discovery and idempotency coverage. Posted this as a comment on #14 before opening this PR.No schema change — this PR only inserts through the existing typed mapped classes from PH1.1/PH1.2.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoNrSy7Reyp7evkfcdHeLX