Skip to content

Commit

Permalink
Merge pull request #8 from StefanGreve/rewrite
Browse files Browse the repository at this point in the history
Version 0.0.5
  • Loading branch information
StefanGreve authored Jan 29, 2023
2 parents 13377fc + aa9ea45 commit c3a511d
Show file tree
Hide file tree
Showing 13 changed files with 1,510 additions and 565 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11-dev']
python-version: [ '3.8', '3.9', '3.10', '3.11.1', '3.12.0-alpha.3']
os: [ ubuntu-latest, macOS-latest, windows-latest ]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: [ 3.7 ]
python-version: [ 3.8 ]

steps:
- uses: actions/checkout@v2
Expand Down
198 changes: 126 additions & 72 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,68 @@
# Changelog

## Version 0.0.5 (29 Jan 2023)

> Note that this update introduces breaking changes.
Implement a `Functions` helper class for common procedures such as

- `invert`
- `is_even`
- `is_odd`
- `miller_rabin`
- `sign`

The overload in the `Iter` constructor was removed in favor of a static `Iter.range`
method to enforce separation of concerns more diligently. Additional minor modifications
were made to pretty much all doc strings to reflect the recent changes that are
to be consolidated for more information. In brief,

- the `chunk_by` method now also provides `eject` as an optional argument
- the `concat` method was renamed to `union`
- `iterable` and `iter` keyword arguments were renamed to `iter_`
- the method signature of the `range` method has changed and added support for
decrements
- the `empty` method was renamed to `is_empty`

The following methods are new:

- `self.cartesian`
- `self.combinations`
- `self.combinations_with_replacement`
- `self.difference`
- `self.duplicates`
- `self.flatten`
- `self.intersects`
- `self.is_disjoint`
- `self.is_subset`
- `self.is_superset`
- `Iter.linspace`
- `Iter.open`
- `self.permutations`
- `self.save`
- `self.symmetric_difference`
- `Iter.randint`
- `self.to_dict`
- `self.to_list`
- `self.transpose`
- `self.__eq__`
- `self.__ne__`
- `self.__iter__`
- `self.__next__`

Starting with version `0.0.5`, this library now also pulls in `typing_extensions`
as an external dependency. Support for Python 3.7 has been dropped which makes
version 3.8 the new baseline in this project.

## Version 0.0.4 (17 May 2022)

Refactors code and improves the doc strings here and there. The `Iter.__ctor` method
was removed in favor of `Iter.range` for implementing the `Iter.__init__` overload.

Additionally, the following methods have been removed as well:

- `self.each`
- `self.fetch`
- `self.each`
- `self.fetch`

Turns out they are not that useful in Python after all.

Expand All @@ -22,76 +76,76 @@ all at once. Perhaps there will be a `Stream`-like structure in the future that'
compatible with `Iter`, though it remains to be seen whether such a thing will be
implemented in the future.

- [x] `self.__init__`
- [x] `self.all`
- [x] `self.any`
- [x] `self.at`
- [x] `self.avg`
- [x] `self.chunk_by`
- [x] `self.chunk_every`
- [ ] `self.chunk_while`
- [x] `self.concat`
- [x] `self.count`
- [x] `self.count_until`
- [x] `self.dedup`
- [x] `self.dedup_by`
- [x] `self.drop`
- [x] `self.drop_every`
- [x] `self.drop_while`
- [x] `self.each`
- [x] `self.empty`
- [x] `self.fetch`
- [x] `self.filter`
- [x] `self.find`
- [x] `self.find_index`
- [x] `self.find_value`
- [x] `self.flat_map`
- [ ] `self.flat_map_reduce`
- [x] `self.frequencies`
- [x] `self.frequencies_by`
- [x] `self.group_by`
- [x] `self.intersperse`
- [x] `self.into`
- [x] `self.join`
- [x] `self.map`
- [x] `self.map_every`
- [x] `self.map_intersperse`
- [x] `self.map_join`
- [x] `self.map_reduce`
- [x] `self.max`
- [x] `self.member`
- [x] `self.min`
- [x] `self.min_max`
- [x] `self.product`
- [x] `self.random`
- [x] `Iter.range`
- [x] `self.reduce`
- [x] `self.reduce_while`
- [x] `self.reject`
- [x] `self.reverse`
- [x] `self.reverse_slice`
- [x] `self.scan`
- [x] `Iter.shorten`
- [x] `self.shuffle`
- [x] `self.slice`
- [x] `self.slide`
- [x] `self.sort`
- [x] `self.split`
- [x] `self.split_while`
- [x] `self.split_with`
- [x] `self.sum`
- [x] `self.take`
- [x] `self.take_every`
- [x] `self.take_random`
- [x] `self.take_while`
- [x] `self.uniq`
- [x] `self.unzip`
- [x] `self.with_index`
- [x] `self.zip`
- [ ] `self.zip_reduce`
- [ ] `self.zip_with`
- [x] `self.__repr__`
- [x] `self.__str__`
- [x] `self.__init__`
- [x] `self.all`
- [x] `self.any`
- [x] `self.at`
- [x] `self.avg`
- [x] `self.chunk_by`
- [x] `self.chunk_every`
- [ ] `self.chunk_while`
- [x] `self.concat`
- [x] `self.count`
- [x] `self.count_until`
- [x] `self.dedup`
- [x] `self.dedup_by`
- [x] `self.drop`
- [x] `self.drop_every`
- [x] `self.drop_while`
- [x] `self.each`
- [x] `self.empty`
- [x] `self.fetch`
- [x] `self.filter`
- [x] `self.find`
- [x] `self.find_index`
- [x] `self.find_value`
- [x] `self.flat_map`
- [ ] `self.flat_map_reduce`
- [x] `self.frequencies`
- [x] `self.frequencies_by`
- [x] `self.group_by`
- [x] `self.intersperse`
- [x] `self.into`
- [x] `self.join`
- [x] `self.map`
- [x] `self.map_every`
- [x] `self.map_intersperse`
- [x] `self.map_join`
- [x] `self.map_reduce`
- [x] `self.max`
- [x] `self.member`
- [x] `self.min`
- [x] `self.min_max`
- [x] `self.product`
- [x] `self.random`
- [x] `Iter.range`
- [x] `self.reduce`
- [x] `self.reduce_while`
- [x] `self.reject`
- [x] `self.reverse`
- [x] `self.reverse_slice`
- [x] `self.scan`
- [x] `Iter.shorten`
- [x] `self.shuffle`
- [x] `self.slice`
- [x] `self.slide`
- [x] `self.sort`
- [x] `self.split`
- [x] `self.split_while`
- [x] `self.split_with`
- [x] `self.sum`
- [x] `self.take`
- [x] `self.take_every`
- [x] `self.take_random`
- [x] `self.take_while`
- [x] `self.uniq`
- [x] `self.unzip`
- [x] `self.with_index`
- [x] `self.zip`
- [ ] `self.zip_reduce`
- [ ] `self.zip_with`
- [x] `self.__repr__`
- [x] `self.__str__`

The static non-standard functions `Iter.range` and `Iter.shorten` have been added
for convenience purposes only. The method signature `uniq_by` does not appear in
Expand Down
Loading

0 comments on commit c3a511d

Please sign in to comment.