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

Rework ChunkedItemsIterator #75

Merged
merged 2 commits into from
Sep 29, 2022

Conversation

theofidry
Copy link
Collaborator

  • Introduce a ::fromStream() static factory which makes it more convenient to create the iterator for STDIN whilst allowing testing easily without relying on STDIN
  • Rename ::create() to ::fromItemOrCallable()
  • Move the normalization of items from __construct() to the static factories, this makes testing a lot easier
  • Simplify some tests: when testing the static factories we are only interested in the items themselves since the batchSize is just forwarded. The chunk logic is tested when testing the constructor directly

Verified

This commit was signed with the committer’s verified signature.
theofidry Théo FIDRY
@theofidry theofidry merged commit 5614166 into webmozarts:master Sep 29, 2022
@theofidry theofidry deleted the feature/chunked-items branch September 29, 2022 22:54
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.

1 participant