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

Release 2.0 #207

Draft
wants to merge 55 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
84d55e5
Run 'poetry lock --no-update' to install parametrize
samer-hamood Dec 30, 2024
96469d4
Add parametrize to parameterize unit test methods
samer-hamood Dec 30, 2024
80ff6fc
Correct table format (Pycharm IDE)
samer-hamood Dec 30, 2024
72ed155
Add parametrize inclusion to CHANGELOG.md and make next version a maj…
samer-hamood Jan 8, 2025
7ee3e84
Create partially applied parallel function only once
samer-hamood Jan 1, 2025
2a584a3
Simplify serial execution with PRE_COMPUTE strategy to mirror the sam…
samer-hamood Jan 1, 2025
b5e23c5
Get project root relative to the test files and use as parent of file…
samer-hamood Jan 6, 2025
6b2bda7
Add test file reference fix for tests to CHANGELOG.md
samer-hamood Jan 8, 2025
1185d19
Add script to run tests
samer-hamood Jan 6, 2025
005e435
Add inclusion of run_test.sh script to CHANGELOG.md
samer-hamood Jan 8, 2025
ed6bac3
Add link to run_test.sh in DEVELOPER.md
samer-hamood Jan 8, 2025
176ae01
Rename last_option function to last_or_none
samer-hamood Jan 8, 2025
f113aac
Rename head_option function to head_or_none
samer-hamood Jan 8, 2025
ab68ae5
Use single-line JSON label for code block
samer-hamood Jan 8, 2025
3d6d8a7
Add synonym for head_or_none function
samer-hamood Jan 8, 2025
26b3156
Add the `first_or_none` function as a new feature to CHANGELOG.md
samer-hamood Jan 8, 2025
be28c49
Make grammar consistent, add punctuation and generally fix language a…
samer-hamood Jan 8, 2025
80d64b0
Add language improvements to CHANGELOG.md
samer-hamood Jan 8, 2025
81c62a3
Add renaming of head_option/last_option to CHANGELOG.md
samer-hamood Jan 8, 2025
13852fe
Make language used more uniformly consistent, structured and accurate
samer-hamood Jan 8, 2025
ba614a6
Link file references to files
samer-hamood Jan 14, 2025
737ed6f
Format names of function parameters
samer-hamood Jan 14, 2025
4ff3a31
Add seq import as code already has an imports section
samer-hamood Jan 14, 2025
8f31781
Add contributor
samer-hamood Jan 14, 2025
c5ae5c9
Remove "poetry.dev-dependencies" section as it's deprecated and will …
samer-hamood Jan 14, 2025
d5a6d6e
Format based on linter errors/warnings
samer-hamood Jan 18, 2025
06214f8
Print out Python version
samer-hamood Jan 18, 2025
fd1b638
Make sure pipx is installed and print version if it is else exit scri…
samer-hamood Jan 18, 2025
cd77fa9
Install Poetry if it's not installed else print version
samer-hamood Jan 18, 2025
44eddb9
Install dependencies, updating lock file if first installation attemp…
samer-hamood Jan 18, 2025
4606e8a
Add the Ruff linter to the dependencies
samer-hamood Jan 18, 2025
e8b37c3
Select the linter based on the Python version as versions after 3.11 …
samer-hamood Jan 18, 2025
7995533
Run Black code formatter in script
samer-hamood Jan 18, 2025
246327d
Run MyPy static type checker in script
samer-hamood Jan 18, 2025
05a41c9
Add empty lines
samer-hamood Jan 18, 2025
325c7cc
Add changes to poetry.lock file after running poetry lock command
samer-hamood Jan 18, 2025
7800089
Include the Python version in step names
samer-hamood Jan 18, 2025
013198d
Print code formatting changes Black would make
samer-hamood Jan 18, 2025
7bc1905
Add support for the latest Python versions, using Ruff linting step i…
samer-hamood Jan 18, 2025
e263709
Run poetry lock command on error installing dependencies then try ins…
samer-hamood Jan 18, 2025
f0dca83
Add new supported Python versions
samer-hamood Jan 18, 2025
866fef0
Bump up version
samer-hamood Jan 18, 2025
cae79b2
Show coloured difference in Black formatting
samer-hamood Jan 18, 2025
5c2a4c3
Add parametrize to test_functional.py
samer-hamood Jan 18, 2025
68aba3d
Add doc to function
samer-hamood Jan 19, 2025
e0cbeac
Add function to capitalize words
samer-hamood Jan 19, 2025
ef0362e
Add function to get sematic version of a package installed in Pipx
samer-hamood Jan 19, 2025
f801f2b
Add function to print software and version
samer-hamood Jan 19, 2025
7260391
Add function to install a package
samer-hamood Jan 19, 2025
82bc6b2
Improve Pipx installation message
samer-hamood Jan 19, 2025
e201ef2
Print correctly aligned Pipx version
samer-hamood Jan 19, 2025
3b67671
Use new function to install packages if missing or print version
samer-hamood Jan 19, 2025
32d3e8f
Put remaining standalone commands in a main function
samer-hamood Jan 19, 2025
01e1eb6
Upgrade pre-commit-hooks to latest version
samer-hamood Jan 19, 2025
100a502
Upgrade ruff-pre-commit to the highest version before failing
samer-hamood Jan 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- python-version: "3.11"
use_pandas: 1
Expand All @@ -26,16 +26,24 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- run: poetry install
- name: Pylint
- run: |
if ! poetry install; then
poetry lock
poetry install
fi
- name: Pylint (Python v${{ matrix.python-version }})
run: poetry run pylint functional
- name: black
run: poetry run black --check functional
if: matrix.python-version != '3.12' && matrix.python-version != '3.13'
- name: Ruff (Python v${{ matrix.python-version }})
run: poetry run ruff check functional
if: matrix.python-version == '3.12' || matrix.python-version == '3.13'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pylint seems to have issues with Python versions 3.12 and 3.13 - can add another PR for Ruff to more closely match Pylint's rules

- name: black (Python v${{ matrix.python-version }})
run: poetry run black --diff --check functional
if: always()
- name: Test with pytest
- name: Test with pytest (Python v${{ matrix.python-version }})
run: poetry run pytest --cov=functional --cov-report=xml
if: always()
- name: mypy
- name: mypy (Python v${{ matrix.python-version }})
run: poetry run mypy functional
if: always()
- uses: codecov/codecov-action@v1
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-added-large-files
Expand All @@ -23,6 +23,6 @@ repos:
pass_filenames: false

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.2
rev: v0.6.0
hooks:
- id: ruff
75 changes: 47 additions & 28 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,69 @@
# Changelog

## Release 2.0

- Renamed `head_option` and `last_option` to `head_or_none` and `last_or_none` respectively
- __N.B:__ This is potentially a breaking change as the renamed functions are being repurposed to return an `Option`
and will no longer return the raw value or `None`
- The old names are less applicable as the functions do not provide any 'option' apart from their single parameter,
which is no different to that of `head/first` and `last`
- Corrected and improved language consistency in readme and `CHANGELOG.md`
- Fixed tests failing (to find test files) when running from the IDE or the terminal when not in the right directory

### New Features

- Added `first_or_none`, a function to match `head_or_none`
- Added run_test.sh script
- Added [parametrize](https://pypi.org/project/parametrize/) for parameterized unit tests

## Release 1.5

## Release 1.4

- Allow empty sequence expressions `seq()`, `pseq()` (#159)
- Add `no_wrap` option to `head()`, `head_option()`, `first()`, `last()` and `last_option()`, as well as to `seq()`, `pseq()` and `Sequence` constructor
- Added support for empty sequence expressions `seq()`, `pseq()` (#159)
- Added `no_wrap` option to `head()`, `head_option()`, `first()`, `last()` and `last_option()`, as well as to `seq()`, `pseq()` and `Sequence` constructor

## Release 1.3.0

- added precompute attribute to reverse transformation (#137)
- Update setup.py dill to requirements.txt (#138)
- Added precompute attribute to reverse transformation (#137)
- Updated setup.py dill to requirements.txt (#138)
- Docstring of tail fixed (#140)
- adding extend feature (#144)
- Added extend feature (#144)

## Release 1.2.0

- Fix Broken link in readme
- Loosen version requirements #129
- Fix lint errors
- Fix StopIteration errors for Python 3.7 #132
- Drop support for python 3.4
- Fixed Broken link in readme
- Loosened version requirements #129
- Fixed lint errors
- Fixed StopIteration errors for Python 3.7 #132
- Dropped support for python 3.4

## Release 1.1.3

- Fix bug in `partition` https://github.com/EntilZha/PyFunctional/issues/124
- Fixed bug in `partition` https://github.com/EntilZha/PyFunctional/issues/124

## Release 1.1.0

- Implemented optimized version of `reduce_by_key`
- Implemented `count_by_key`
- Implemented `count_by_value`
- Implemented `accumulate` https://github.com/EntilZha/PyFunctional/pull/104
- Fix bug in `grouped` https://github.com/EntilZha/PyFunctional/pull/123
- Fix bug in `to_csv` https://github.com/EntilZha/PyFunctional/pull/123
- Fix bug with incorrect wrapping of pandas dataframes https://github.com/EntilZha/PyFunctional/pull/122
- Allow variance on versions of certain packages: https://github.com/EntilZha/PyFunctional/pull/117 and https://github.com/EntilZha/PyFunctional/pull/116
- Added support for variance on versions of certain packages: https://github.com/EntilZha/PyFunctional/pull/117 and https://github.com/EntilZha/PyFunctional/pull/116
- Various typo fixes
- Various CI fixes
- Fix issue with `first/head` evaluating entire sequence https://github.com/EntilZha/PyFunctional/commit/fb8f3686cf94f072f4e6ed23a361952de1447dc8
- Drop CI testing and official support for Python 3.3
- Make import much faster by loading pandas more lazily https://github.com/EntilZha/PyFunctional/issues/99
- Dropped CI testing and official support for Python 3.3
- Made import much faster by loading pandas more lazily https://github.com/EntilZha/PyFunctional/issues/99

### Bug Fixes

- Fixed bug in `grouped` https://github.com/EntilZha/PyFunctional/pull/123
- Fixed bug in `to_csv` https://github.com/EntilZha/PyFunctional/pull/123
- Fixed bug with incorrect wrapping of pandas dataframes https://github.com/EntilZha/PyFunctional/pull/122
- Fixed issue with `first/head` evaluating entire sequence https://github.com/EntilZha/PyFunctional/commit/fb8f3686cf94f072f4e6ed23a361952de1447dc8

## Release 1.0.0

Reaching `1.0` primarily means that API stability has been reached so I don't expect to run into many new breaking changes.
Reaching `1.0` primarily means that API stability has been reached, so I don't expect to run into many new breaking changes.

### New Features

Expand All @@ -67,13 +86,13 @@ Reaching `1.0` primarily means that API stability has been reached so I don't ex

- Implemented pretty html repr for Jupyter
- Implemented proper parsing of pandas DataFrames
- Detect when its possible to pretty print a table and do so
- Added feature to detect when it's possible to pretty print a table and do so
- `list`/`to_list` have a parameter `n` to limit number of results

### Bug Fixes

- Fixed bug where `grouped` unnecessarily forces precomputation of sequence
- Remove package installations from default requirements that sometimes break installation on barebones systems in python 2.7
- Removed package installations from default requirements that sometimes break installation on barebones systems in python 2.7

## Release 0.7.0

Expand All @@ -96,14 +115,14 @@ Reaching `1.0` primarily means that API stability has been reached so I don't ex
### Contributors

- Thanks to [versae](https://github.com/versae) for implementing most of the `pseq` feature!
- Thanks to [ChuyuHsu](https://github.com/ChuyuHsu) for implemented large parts of the compression feature!
- Thanks to [ChuyuHsu](https://github.com/ChuyuHsu) for implementing large parts of the compression feature!

## Release 0.6.0

### New Features

- Added support for reading to and from SQLite databases
- Change project name to `PyFunctional` from `ScalaFunctional`
- Changed project name from `ScalaFunctional` to `PyFunctional`
- Added `to_pandas` call integration

### Internal Changes
Expand All @@ -125,13 +144,13 @@ Reaching `1.0` primarily means that API stability has been reached so I don't ex

- Fixed case where `_wrap` is changing named tuples to arrays when it should preserve them
- Fixed documentation on `to_file` which incorrectly copied from `seq.open` delimiter parameter
- Fixed `Sequence.zip_with_index` behavior. used to mimic `enumerate` by zipping on the left size
while scala and spark do zip on the right side. This introduces different behavior and more flexible
behavior in combination with `enumerate` A start parameter was also added like in `enumerate`
- Fixed `Sequence.zip_with_index` behavior, which used to mimic `enumerate` by zipping on the left side
while Scala and Spark zip on the right side. This introduces different but more flexible
behavior in combination with `enumerate`. A start parameter was also added like in `enumerate`

## Release 0.4.1

Fix python 3 build error due to wheel installation of enum34. Package no longer depends on enum34
Fixed python 3 build error due to wheel installation of enum34. Package no longer depends on enum34

## Release 0.4.0

Expand All @@ -156,7 +175,7 @@ Fix python 3 build error due to wheel installation of enum34. Package no longer
- `Sequence.to_file` to save files
- `Sequence.to_csv` to save csv files
- Improved documentation with more examples and mention LINQ explicitly
- Change PyPi keywords to improve discoverability
- Changed PyPi keywords to improve discoverability
- Created [Google groups mailing list](https://groups.google.com/forum/#!forum/scalafunctional)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
For every release, the following process is used.

### Before Release
1. From the project directory, run `./run-tests.sh` to insure unit tests pass (on python 2 and 3),
1. From the project directory, run [./run-tests.sh](run-tests.sh) to insure unit tests pass (on python 2 and 3),
and that pylint succeeds
2. Push commit which is the candidate release to Github master
3. Wait for tests to pass on [TravisCI](https://travis-ci.org/EntilZha/PyFunctional)
Expand Down
Loading