Hi, I wanted to contribute to this project, but the setup was a bit of a barrier. I followed the instructions in the README, and even set it up in a clean environment (see, container) to try to get it working. There's a few issues I've encountered trying to develop, and I just don't have the willpower to spend 5 hours to figure them out. If you can give me a working dev container or Dockerfile, I will gladly do things myself.
def chunk(self, n) -> TEnumerable:
"""
Split elements into Enumerable chunks of no greater than n
:param n: Maximum chunk size
:return: new Enumerable object
"""
it = iter(self)
items = [item for item in itertools.takewhile(lambda x: x, (Enumerable(data=itertools.islice(it, n)) for _ in itertools.count()))]
return Enumerable(items)
Criticism welcome.
I also attempted to add this test. Clearly, I do not understand the framework going on here. It kept throwing this error that does not make sense to me.
def test_non_executors(enumerable: Enumerable, expected: List) -> None:
> assert enumerable.to_list() == expected
E assert [[1, 2], [3]] == [[1, 2], [3]]
E At index 0 diff: [1, 2] != [1, 2]
E Full diff:
E [[1, 2], [3]]
tests/test_functions.py:593: AssertionError
--------------- generated xml file: /tmp/tmp-290lAdGLKlVoyy8.xml ---------------
=========================== short test summary info ============================
FAILED tests/test_functions.py::test_non_executors[enumerable18-expected18]
============================== 1 failed in 0.48s ===============================
Hi, I wanted to contribute to this project, but the setup was a bit of a barrier. I followed the instructions in the README, and even set it up in a clean environment (see, container) to try to get it working. There's a few issues I've encountered trying to develop, and I just don't have the willpower to spend 5 hours to figure them out. If you can give me a working dev container or Dockerfile, I will gladly do things myself.
Anyway, with that preamble out of the way, I suppose I have a feature request and a half-baked implementation for the chunk function Chunk.cs. ChunkTests.cs
Here is what I came up with:
Criticism welcome.
I also attempted to add this test. Clearly, I do not understand the framework going on here. It kept throwing this error that does not make sense to me.
Here's partial output from the debug console: