Skip to content
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

Add support to postgres range fields #80

Merged
merged 20 commits into from
Jul 21, 2020
Merged

Conversation

berinhard
Copy link
Member

@berinhard berinhard commented Jun 13, 2020

Fixes #70
Fixes #81

This PR add supports to Postgres's range fields.

@berinhard
Copy link
Member Author

@anapaulagomes and @amureki I think we can relase a new version of model bakery once we merge this. Although, the ideal release would also have #81 fixed and merged in.

@anapaulagomes
Copy link
Contributor

Sounds good to me. But @berinhard did you mean #81 or another issue?

@berinhard
Copy link
Member Author

Yep, because while working on this PR to fix the issue #70, I noticed that there were other range types besides DecimalRangeField. In this PR I focused only on fixing the numeric ranges but the issue #81 covers the others.

In my opinion, a more consistent release would cover all range fields, so that's why I think it would be nice for us to have #81 fixed as well =)

Copy link
Contributor

@anapaulagomes anapaulagomes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding these fields to Model Bakery, @berinhard! 🏅 I've got only minor comments and one question about letting DecimalRangeField separated from the other fields added.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
model_bakery/generators.py Show resolved Hide resolved
@berinhard
Copy link
Member Author

@anapaulagomes I've updated this PR and also fixed the conflict in the Changelog. Can you review it again, please?

Copy link
Contributor

@anapaulagomes anapaulagomes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🏆

model_bakery/generators.py Show resolved Hide resolved
@berinhard berinhard requested a review from anapaulagomes June 24, 2020 13:50
@berinhard
Copy link
Member Author

berinhard commented Jun 24, 2020

@anapaulagomes sorry but by the time you've left your approval, I was adding support to DateRangeField and DateTimeRangeField (4 minutes difference =S). The code is pretty much the same as before, but introducing 2 new generators. I'll wait for you review on the 2 new commits to merge this PR and release a new version as well.

@berinhard
Copy link
Member Author

@amureki can you review this PR? @anapaulagomes will be offline for a while, so it's up to the 2 of us to keep on with the project =)

Copy link
Collaborator

@amureki amureki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Bernardo!
Great work, this is definitely needed change. :)

I had some small comments to be checked, feel free to drop me a line about those!

docs/source/how_bakery_behaves.rst Outdated Show resolved Hide resolved
model_bakery/generators.py Show resolved Hide resolved
model_bakery/generators.py Show resolved Hide resolved
tests/generic/models.py Outdated Show resolved Hide resolved
@berinhard berinhard merged commit f0f5bb3 into master Jul 21, 2020
@berinhard berinhard deleted the feature/decimal-range branch July 21, 2020 18:52
amureki pushed a commit that referenced this pull request Jul 22, 2020
berinhard pushed a commit that referenced this pull request Jul 22, 2020
(follow-up to #80)

Co-authored-by: Rust Saiargaliev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support postgres date range fields DecimalRangeField support requested
3 participants