chore(dev): add factory_boy seed data and seed_db management commands#10
Conversation
aleattene
commented
Mar 27, 2026
- Add factory_boy and faker to requirements_dev
- Add factories/ package with factories for all models
- Add seed_db management command (with --flush option)
- Document seed command in README
- Add factory_boy + faker to requirements_dev - Add factories/ package with factories for all models - Add seed_db management command (with --flush option) - Document seed command in README
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10 +/- ##
==========================================
+ Coverage 95.17% 95.72% +0.55%
==========================================
Files 89 98 +9
Lines 1119 1427 +308
==========================================
+ Hits 1065 1366 +301
- Misses 54 61 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a development-only seeding workflow to generate realistic local data using factory_boy/faker, along with documentation for how to run it.
Changes:
- Added
factory-boyandfakerto dev requirements. - Introduced a
factories/package with model factories across apps. - Added a
seed_dbmanagement command (with optional--flush) and documented usage in the README.
Reviewed changes
Copilot reviewed 12 out of 15 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
users/management/commands/seed_db.py |
New management command to seed dev data (users, athletes, enrollments, finance docs, etc.). |
factories/__init__.py |
Central export surface for all factories used by the seed command. |
factories/users.py |
CustomUser factory. |
factories/staff.py |
Trainer factory. |
factories/athletes.py |
Category/Athlete factories. |
factories/enrollments.py |
Enrollment factory. |
factories/doctors.py |
SportDoctor factory. |
factories/certificates.py |
SportCertificate factory with date relationship logic. |
factories/finance.py |
Company, PaymentMethod, Invoice, Receipt factories. |
requirements_dev.in |
Declares new dev dependencies (factory-boy, faker). |
requirements_dev.txt |
Compiled/pinned dev dependency set reflecting the new inputs. |
README.md |
Documents how to run seed_db and seed_db --flush. |
.gitignore |
Ignores docs/DEVELOPMENT.md. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 18 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 20 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 19 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 19 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 19 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 19 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 19 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 19 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.