-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[DOC] Add complex chaining example using pipelines with builder pattern #3774
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
[DOC] Add complex chaining example using pipelines with builder pattern #3774
Conversation
Hi @zion-off, thank you for your contribution! |
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.
Pull Request Overview
This PR adds a comprehensive example demonstrating the builder pattern for chaining complex Redis pipeline operations, helping users understand how to implement fluent interfaces with Redis pipelines.
- Adds a new notebook cell with an advanced chaining example using custom repository class
- Implements a
RedisRepository
class that uses the builder pattern for method chaining - Demonstrates real-world usage with
User
andPost
dataclasses for a social media-like application
Comments suppressed due to low confidence (3)
docs/examples/pipeline_examples.ipynb:1
- Using
post.title[0]
as a key component will cause collisions when multiple posts have titles starting with the same character. Consider using a unique identifier like a UUID or incrementing counter instead.
{
docs/examples/pipeline_examples.ipynb:1
- Using
post.title[0]
as a key component will cause collisions when multiple posts have titles starting with the same character. Consider using a unique identifier like a UUID or incrementing counter instead.
{
docs/examples/pipeline_examples.ipynb:1
- This code could raise an IndexError if the email doesn't contain '@'. Consider adding validation or using a more robust email parsing approach for the example.
{
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Overall, it looks fine; you just need to apply the suggested improvements, and it will be ready for merging.
4f55202
to
b2ee010
Compare
b2ee010
to
4a4324c
Compare
hi @petyaslavova, thanks so much for your review! i've amended my commit with your suggestion. just @ me if you'd like me to modify anything else! |
4a4324c
to
f8fc581
Compare
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.
LGTM.
Pull Request check-list
Please make sure to review and check all of these items:
NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
This PR adds an example of using the builder pattern for to chain complex pipeline operations.
See #1744.