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

Version 0.0.5 #8

Merged
merged 46 commits into from
Jan 29, 2023
Merged

Version 0.0.5 #8

merged 46 commits into from
Jan 29, 2023

Conversation

StefanGreve
Copy link
Owner

@StefanGreve StefanGreve commented Jan 2, 2023

This PR also closes issue #12.

  • deprecate Python 3.7 support
  • edit README
  • implement open function
  • implement save method
  • implement randint function
  • implement cartesian method
  • implement permutations method
  • implement combinations method
  • implement combinations_with_replacement method
  • implement intersects method
  • implement difference method
  • implement symmetric_difference method
  • implement is_disjoint method
  • implement is_subset method
  • implement is_superset method
  • implement to_list method
  • implement is_prime
  • implement miller_rabin
  • implement __next__ and __iter__
  • implement __eq__ and __ne__
  • add additional parameter to union method
  • update CHANGELOG

> Note that this update introduces breaking changes.

Implement a `Functions` helper class for common procedures such as

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

The overload in the `Iter` constructor was removed in favor of a static `Iter.range`
method to enforce separation of concerns more strictly. Additional minor changes
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 following methods are new:

- `duplicates`
- `flatten`
- `linspace`
- `transpose`
@StefanGreve StefanGreve added the enhancement New feature or request label Jan 2, 2023
@StefanGreve StefanGreve self-assigned this Jan 2, 2023
* remove redundat lines from project template
* update classifiers
* fix exception message (wrong package name)
* remove the concatenation from the implementation
  since this can also be done with a prepended flatten
  method, and use the built-in set method for performing
  the union of two hashable objects
* doc strings should start with the 'Test' verb if a function
  returns a boolean
* implements is_subset and is_superset based on Python's `set`
  collection
* add doc strings to all methods
* improve implementation of the sign method
@StefanGreve StefanGreve changed the title Rewrite Version 0.0.5 Jan 8, 2023
* use "T | U" instead of "Union[T, U]" in method signatures
* define Self as explicit type for "self", this type hint
  is only available in Python 3.11 which is why we also import
  typing_extensions which is a new external dependency
* same goes for the "Annotated" type hint (Python 3.9+)
* implement combinations, combinations_with_replacement and permutations
  based on the itertools library
* return self in cartesian method instead of creating a new object
* implement open method for File.TEXT, File.CSV and File.JSON
  (missing case: File.IMG)
* change implementation of __str__ and __repr__
* implement save method with the image case as TODO
* it's more pythonic to derive the file extension
  from the provided file name rather than overloading
  the method with an file enum
* return a list of all indices that return `True` for `fun`,
  and not just the first one
* drop the default parameter and return an empty list if `fun`
  always results in `False` for all elements in the image
* add the solution to a modified leet code challenge
  (see also: https://leetcode.com/problems/two-sum)
* add a list of contributors and license information
@StefanGreve StefanGreve merged commit c3a511d into master Jan 29, 2023
@StefanGreve StefanGreve deleted the rewrite branch January 29, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant