-
Notifications
You must be signed in to change notification settings - Fork 27
✨ feat: add development environment configuration and update sample data generation #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| DJANGO_SETTINGS_MODULE=pythonie.settings.dev | ||
| PGDATABASE=pythonie | ||
| PGUSER=postgres | ||
| PGPASSWORD=pythonie | ||
| PGHOST=postgres | ||
| REDISCLOUD_URL=redis://redis:6379 | ||
|
|
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When you modify requirements/dev.in (for example by adding wagtail-factories), you need to remember to regenerate the lockfile requirements/dev.txt. To do this, you can simply run For the commit message, you can explain that you've recompiled the dependencies and remind that after any modification to |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| -c main.txt | ||
| coverage | ||
| django-debug-toolbar | ||
| factory-boy | ||
| wagtail-factories | ||
| fakeredis | ||
| isort | ||
| model_mommy | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that in commit 33e042e, you replaced the existing factory-boy classes with wrapper functions. I'd like to explain why the original approach was actually better and should have been kept.
What Changed
Before your commit, we had proper factory-boy classes:
After your commit, these became simple wrapper functions:
Why This Is a Step Backward
The original code was following factory-boy best practices. Here's why the wrapper functions are problematic:
SponsorshipLevelFactory, they expect a class, not a function. This creates confusion.
factory.LazyFunction(), factory.SubFactory(), etc. You're essentially bypassing the framework you've added as a dependency.
is misleading for anyone reading or maintaining the code.
SponsorshipLevel.objects.get_or_create) that doesn't add value. The factory-boy class was already the right abstraction.