Conversation
|
Hello - My apologies, but this PR has been open for several weeks and I can't move forward until after this PR Is processed. |
|
Thanks, I'll review it later today when I get some time. |
Thank you |
|
Hi @EntilZha , let me know if you are still maintaining this project. I ask because you have yet to approve/comment on this PR after 3 or more weeks. It's okay if you don't want people to create PRs for this project due to not having enough free time or whatever the reason, but let us know so we can use our time more constructively on other projects. Thanks |
|
Hi @samer-hamood, I still maintain the project, but my time is often pretty bursty as I have free time. Thanks for the Kotlin example, thats enough to convince me its worth adding. I'll do a quick review of code and leave any comments and/or approve. |
|
|
||
| [tool.poetry.group.dev.dependencies] | ||
| black = "^23.1" | ||
| parametrize = "^0.1.1" |
There was a problem hiding this comment.
It looks like pytest has this natively https://docs.pytest.org/en/stable/how-to/parametrize.html, so I'd prefer using that and it doesnt look like parametrize has been updated since 2021.
There was a problem hiding this comment.
The issue is that pytest parametrize does not work with unittest.TestCase which your tests are using, that's why the library was added; has that changed?
There was a problem hiding this comment.
Not that I know, I just didn't realize it didn't work.
| self.assertIteratorEqual(result, e) | ||
| self.assert_type(result) | ||
|
|
||
| @parametrize( |
There was a problem hiding this comment.
Using https://docs.pytest.org/en/stable/how-to/parametrize.html would avoid adding another library
There was a problem hiding this comment.
Yes. It would also seemingly mean I would have to move the test out of the class or change it somehow to fit pytest parameterize, which would be more work, possibly refactoring the tests in that file.
I was hoping to avoid this by adding the library; it wasn't something I wanted to do.
There was a problem hiding this comment.
Fair enough, I didn't realize until reading about the library that you couldn't use pytest natively with classes.
EntilZha
left a comment
There was a problem hiding this comment.
Overall, LGTM. If you can swap the parametrize from the standalone library to the pytest version https://docs.pytest.org/en/stable/how-to/parametrize.html, I'm happy to merge
This PR adds the
zip_with_nextfunction, which zips together adjacent elements, or seq[0:-1] with seq[1:].Its functionality is common (think of how many algorithms require processing adjacent elements together), therefore it makes sense to include it in Pyfunctional's API and not leave it to clients to add it as an @extend function.
Kotlin's collections API already has this function, and adding it to Pyfunctional makes it even more serviceable and versatile.