Skip to content

Conversation

zion-off
Copy link
Contributor

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?

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.

@zion-off zion-off mentioned this pull request Sep 20, 2025
@petyaslavova
Copy link
Collaborator

Hi @zion-off, thank you for your contribution!

Copy link
Contributor

@Copilot Copilot AI left a 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 and Post 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.

@petyaslavova petyaslavova added the maintenance Maintenance (CI, Releases, etc) label Sep 25, 2025
Copy link
Collaborator

@petyaslavova petyaslavova left a 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.

@zion-off zion-off force-pushed the pipeline-w-builder-pattern branch from 4f55202 to b2ee010 Compare September 25, 2025 12:23
@zion-off zion-off force-pushed the pipeline-w-builder-pattern branch from b2ee010 to 4a4324c Compare September 25, 2025 12:26
@zion-off
Copy link
Contributor Author

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!

@zion-off zion-off force-pushed the pipeline-w-builder-pattern branch from 4a4324c to f8fc581 Compare September 25, 2025 20:23
Copy link
Collaborator

@petyaslavova petyaslavova left a comment

Choose a reason for hiding this comment

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

LGTM.

@petyaslavova petyaslavova merged commit 8f56b52 into redis:master Sep 29, 2025
71 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance (CI, Releases, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants