Skip to content

Commit

Permalink
Increase to v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cleoold committed Dec 2, 2021
1 parent 47f1b8f commit cb6605c
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 40 deletions.
12 changes: 6 additions & 6 deletions doc/api/more/types_linq.more.more_enumerable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Example
[(0, 2), (1, 4), (2, 6)]

Revisions:
- main: New.
- v1.0.0: New.

----

Expand All @@ -128,7 +128,7 @@ Example
[(16, 'x'), (16, 't')]

Revisions:
- main: Renamed from ``except_by()`` to this name to accommodate the update to Enumerable class.
- v1.0.0: Renamed from ``except_by()`` to this name to accommodate the update to Enumerable class.
- v0.2.1: Added preliminary support for unhashable keys.

----
Expand Down Expand Up @@ -346,7 +346,7 @@ Example
[6, 5, 2, 3, 3, 5, 4, 7, 8, 1, 3] # 101 is largest, so has rank of 1

Revisions:
- main: New.
- v1.0.0: New.

----

Expand All @@ -365,7 +365,7 @@ Such comparer takes two values and return positive ints when lhs > rhs, negative
if lhs < rhs, and 0 if they are equal.

Revisions:
- main: New.
- v1.0.0: New.

----

Expand Down Expand Up @@ -397,7 +397,7 @@ Example
{3: ['Frank'], 2: ['Alica', 'Rogers'], 1: ['Erika']}
Revisions:
- main: New.
- v1.0.0: New.

----

Expand All @@ -417,7 +417,7 @@ Such comparer takes two values and return positive ints when lhs > rhs, negative
if lhs < rhs, and 0 if they are equal.

Revisions:
- main: New.
- v1.0.0: New.

----

Expand Down
31 changes: 18 additions & 13 deletions doc/api/types_linq.enumerable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Example
1000
Revisions:
- main: New.
- v1.0.0: New.

----

Expand Down Expand Up @@ -557,7 +557,7 @@ Example
[6561, 19683, 59049, 177147]
Revisions:
- main: New.
- v1.0.0: New.

----

Expand Down Expand Up @@ -727,7 +727,7 @@ Example
[1, 4, 6, 3, 99]

Revisions:
- main: New. The method with same name (but different return type) in MoreEnumerable class
- v1.0.0: New. The method with same name (but different return type) in MoreEnumerable class
was removed.

----
Expand Down Expand Up @@ -762,7 +762,7 @@ Example
100
Revisions:
- main: Added support for negative index.
- v1.0.0: Added support for negative index.

----

Expand Down Expand Up @@ -794,7 +794,7 @@ Example
0
Revisions:
- main: Added support for negative index.
- v1.0.0: Added support for negative index.

----

Expand Down Expand Up @@ -858,7 +858,7 @@ Example
[(16, 'x'), (16, 't')]

Revisions:
- main: New. The method with same name (but different usage) in MoreEnumerable class was
- v1.0.0: New. The method with same name (but different usage) in MoreEnumerable class was
renamed as ``except_by2()`` to accommodate this.

----
Expand Down Expand Up @@ -1195,7 +1195,7 @@ Example
['+1', '-3', '+5', '+9']

Revisions:
- main: New.
- v1.0.0: New.

----

Expand Down Expand Up @@ -1431,7 +1431,7 @@ Example
'dddd'

Revisions:
- main: New.
- v1.0.0: New.

----

Expand All @@ -1452,7 +1452,7 @@ Such comparer takes two values and return positive ints when lhs > rhs, negative
if lhs < rhs, and 0 if they are equal.

Revisions:
- main: New.
- v1.0.0: New.

----

Expand Down Expand Up @@ -1526,7 +1526,7 @@ Returns the minimal element of the sequence based on the given key selector. Rai
`InvalidOperationError` if there is no value.

Revisions:
- main: New.
- v1.0.0: New.

----

Expand All @@ -1547,7 +1547,7 @@ Such comparer takes two values and return positive ints when lhs > rhs, negative
if lhs < rhs, and 0 if they are equal.

Revisions:
- main: New.
- v1.0.0: New.

----

Expand Down Expand Up @@ -2197,6 +2197,9 @@ Returns

Produces a subsequence defined by the given slice notation.

This method always uses a generic list slicing method regardless the implementation of the
wrapped iterable.

This method currently is identical to `elements_in()` when it takes a slice.

Example
Expand All @@ -2209,7 +2212,7 @@ Example
[10, 100]
Revisions:
- main: New.
- v1.0.0: New.

----

Expand Down Expand Up @@ -2404,7 +2407,7 @@ Example
[1, 9, -2, -7, 14, 15, -26] # abs(-2) == abs(2)

Revisions:
- main: New.
- v1.0.0: New.

----

Expand Down Expand Up @@ -2636,6 +2639,8 @@ Produces a subsequence defined by the given slice notation.
This method always uses a generic list slicing method regardless the implementation of the
wrapped iterable.

This method currently is identical to `take()` when it takes a slice.

Example
.. code-block:: python
Expand Down
14 changes: 14 additions & 0 deletions doc/to-start/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ Changelog

`GitHub Releases <https://github.com/cleoold/types-linq/releases>`_

v1.0.0
********

- Add enumerate(), rank() and rank_by() to MoreEnumerable class
- Add chunk(), max_by(), min_by(), intersect_by() and union_by() to Enumerable class
- Enumerable.element_at() now supports negative index
- Enumerable.take() now supports taking a slice (which is same as Enumerable.elements_in()) to be consistent with
.NET 6
- Enumerable.__getitem__() now supports providing a default value
- **Breaking**: Add Enumerable.distinct_by() that returns an Enumerable instance. MoreEnumerable.distinct_by() that
returned a MoreEnumerable instance is removed
- **Breaking**: Add Enumerable.except_by(). The previous MoreEnumerable.except_by() that took homogeneous values as
the second iterable is now renamed as MoreEnumerable.except_by2()

v0.2.1
********

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='types-linq',
version='v0.2.1',
version='v1.0.0',
url='https://github.com/cleoold/types-linq',
license='BSD 2-Clause License',
author='cleoold',
Expand All @@ -22,7 +22,7 @@
platforms='any',
classifiers=[
'Topic :: Utilities',
'Development Status :: 3 - Alpha',
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
Expand Down
31 changes: 18 additions & 13 deletions types_linq/enumerable.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
1000
Revisions:
- main: New.
- v1.0.0: New.
'''

@overload
Expand Down Expand Up @@ -420,7 +420,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
[6561, 19683, 59049, 177147]
Revisions:
- main: New.
- v1.0.0: New.
'''

def concat(self, second: Iterable[TSource_co]) -> Enumerable[TSource_co]:
Expand Down Expand Up @@ -535,7 +535,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
[1, 4, 6, 3, 99]
Revisions:
- main: New. The method with same name (but different return type) in MoreEnumerable class
- v1.0.0: New. The method with same name (but different return type) in MoreEnumerable class
was removed.
'''

Expand Down Expand Up @@ -563,7 +563,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
100
Revisions:
- main: Added support for negative index.
- v1.0.0: Added support for negative index.
'''

@overload
Expand All @@ -587,7 +587,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
0
Revisions:
- main: Added support for negative index.
- v1.0.0: Added support for negative index.
'''

@staticmethod
Expand Down Expand Up @@ -632,7 +632,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
[(16, 'x'), (16, 't')]
Revisions:
- main: New. The method with same name (but different usage) in MoreEnumerable class was
- v1.0.0: New. The method with same name (but different usage) in MoreEnumerable class was
renamed as ``except_by2()`` to accommodate this.
'''

Expand Down Expand Up @@ -905,7 +905,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
['+1', '-3', '+5', '+9']
Revisions:
- main: New.
- v1.0.0: New.
'''

def join(self,
Expand Down Expand Up @@ -1078,7 +1078,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
'dddd'
Revisions:
- main: New.
- v1.0.0: New.
'''

@overload
Expand All @@ -1094,7 +1094,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
if lhs < rhs, and 0 if they are equal.
Revisions:
- main: New.
- v1.0.0: New.
'''

@overload
Expand Down Expand Up @@ -1135,7 +1135,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
`InvalidOperationError` if there is no value.
Revisions:
- main: New.
- v1.0.0: New.
'''

@overload
Expand All @@ -1151,7 +1151,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
if lhs < rhs, and 0 if they are equal.
Revisions:
- main: New.
- v1.0.0: New.
'''

def of_type(self, t_result: Type[TResult]) -> Enumerable[TResult]:
Expand Down Expand Up @@ -1603,6 +1603,9 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
'''
Produces a subsequence defined by the given slice notation.
This method always uses a generic list slicing method regardless the implementation of the
wrapped iterable.
This method currently is identical to `elements_in()` when it takes a slice.
Example
Expand All @@ -1615,7 +1618,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
[10, 100]
Revisions:
- main: New.
- v1.0.0: New.
'''

def take_last(self, count: int) -> Enumerable[TSource_co]:
Expand Down Expand Up @@ -1740,7 +1743,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
[1, 9, -2, -7, 14, 15, -26] # abs(-2) == abs(2)
Revisions:
- main: New.
- v1.0.0: New.
'''

def where(self, predicate: Callable[[TSource_co], bool]) -> Enumerable[TSource_co]:
Expand Down Expand Up @@ -1902,6 +1905,8 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
This method always uses a generic list slicing method regardless the implementation of the
wrapped iterable.
This method currently is identical to `take()` when it takes a slice.
Example
.. code-block:: python
Expand Down
Loading

0 comments on commit cb6605c

Please sign in to comment.