EntilZha / PyFunctional

Python library for creating data pipelines with chain functional programming
http://pyfunctional.pedro.ai
MIT License
2.41k stars 132 forks source link

Maintenance update #184

Closed artemisart closed 1 year ago

artemisart commented 1 year ago

Make pyfunctional compatible and tested on python 3.7 to 3.11 + pypy3.

This PR is a copy of #178, rebased & some deps updated to fix CI & compatibility with pypy3, closes #178.

This branch bumps some versions:

* Python ^3.6 -> ^3.7
* pytest ^2.4 -> ^7.0
* pytest-cov ^2.8.1 -> ^4.0
* covervage <5.0 -> ^5.0
* black 19.10b0 -> ^23.1

Then I ran poetry update in order to ensure that the poetry.lock file was up to date.

Using this configuration I was able to run poetry install without running in to issue #176, which makes me expect that that that should be resolved, but maybe I do not understand that well enough. It is either that, or the fact that they merged an update last week.

I could run poetry run pytest --cov=functional without issues, getting the same coverage as is currently posted on the repository. I am having issues with Travis, which is giving me trouble running the build.

The new version of black suggests small changes in the tests files, namely the removal of the u-strings and minor formatting stuff for powers. As far as I can tell this is fine. Pylint also complains about the u-strings and then some formatting which was being done in python 3.6 style (using .format as opposed to f strings). Pylint also suggests to specifying the file format when using open in the tests. I can inlcude these suggestions in the PR if you would like me to, though they are all warning level messages.

I would like to mention that there is still a travis.sh file in the project root, however as far as I can tell that is from an outdated version of Travis. Would it make sense to remove it in this in this PR?

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (e5eb3d3) 98.08% compared to head (b144963) 98.08%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #184 +/- ## ======================================= Coverage 98.08% 98.08% ======================================= Files 12 12 Lines 2344 2345 +1 ======================================= + Hits 2299 2300 +1 Misses 45 45 ``` | [Impacted Files](https://app.codecov.io/gh/EntilZha/PyFunctional/pull/184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Pedro+Rodriguez) | Coverage Δ | | |---|---|---| | [functional/io.py](https://app.codecov.io/gh/EntilZha/PyFunctional/pull/184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Pedro+Rodriguez#diff-ZnVuY3Rpb25hbC9pby5weQ==) | `100.00% <100.00%> (ø)` | | | [functional/pipeline.py](https://app.codecov.io/gh/EntilZha/PyFunctional/pull/184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Pedro+Rodriguez#diff-ZnVuY3Rpb25hbC9waXBlbGluZS5weQ==) | `98.11% <100.00%> (ø)` | | | [functional/test/test\_functional.py](https://app.codecov.io/gh/EntilZha/PyFunctional/pull/184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Pedro+Rodriguez#diff-ZnVuY3Rpb25hbC90ZXN0L3Rlc3RfZnVuY3Rpb25hbC5weQ==) | `99.02% <100.00%> (ø)` | | | [functional/test/test\_io.py](https://app.codecov.io/gh/EntilZha/PyFunctional/pull/184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Pedro+Rodriguez#diff-ZnVuY3Rpb25hbC90ZXN0L3Rlc3RfaW8ucHk=) | `100.00% <100.00%> (ø)` | | | [functional/test/test\_streams.py](https://app.codecov.io/gh/EntilZha/PyFunctional/pull/184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Pedro+Rodriguez#diff-ZnVuY3Rpb25hbC90ZXN0L3Rlc3Rfc3RyZWFtcy5weQ==) | `93.76% <100.00%> (ø)` | | | [functional/test/test\_util.py](https://app.codecov.io/gh/EntilZha/PyFunctional/pull/184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Pedro+Rodriguez#diff-ZnVuY3Rpb25hbC90ZXN0L3Rlc3RfdXRpbC5weQ==) | `100.00% <100.00%> (ø)` | | | [functional/transformations.py](https://app.codecov.io/gh/EntilZha/PyFunctional/pull/184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Pedro+Rodriguez#diff-ZnVuY3Rpb25hbC90cmFuc2Zvcm1hdGlvbnMucHk=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

artemisart commented 1 year ago

Updated dependencies for pypy compatibility, CI is green now @EntilZha