Skip to content

Commit 361ba33

Browse files
authored
Added python 3.11 and 3.12 support (#126)
- Added Python `3.11` support (without `nmslib`) - Added Python `3.12` support (without `nmslib` and `lightfm`) - [Breaking] Removed Python `3.7` support - [Breaking] Updated minimum versions of `numpy`, `scipy`, `pandas`, `typeguard` - [Breaking] Set restriction `scipy < 1.13` Closes #128
1 parent 1e9844b commit 361ba33

39 files changed

+1688
-2531
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up Python
2727
uses: actions/setup-python@v2
2828
with:
29-
python-version: "3.8"
29+
python-version: "3.10"
3030

3131
- name: Install poetry
3232
run: pip install urllib3==1.26.15 poetry==1.4.0

.github/workflows/publish_dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up Python
2525
uses: actions/setup-python@v2
2626
with:
27-
python-version: "3.8"
27+
python-version: "3.10"
2828

2929
- name: Install poetry
3030
run: pip install urllib3==1.26.15 poetry==1.4.0

.github/workflows/test.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Python
1919
uses: actions/setup-python@v2
2020
with:
21-
python-version: 3.8
21+
python-version: "3.10"
2222

2323
- name: Install poetry
2424
run: pip install urllib3==1.26.15 poetry==1.4.0
@@ -28,7 +28,7 @@ jobs:
2828
uses: actions/cache@v3
2929
with:
3030
path: .venv
31-
key: venv-${{ runner.os }}-3.8-${{ hashFiles('**/poetry.lock') }}
31+
key: venv-lint-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
3232

3333
- name: Install dependencies
3434
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
@@ -38,16 +38,12 @@ jobs:
3838
run: make lint
3939

4040
test:
41-
name: test (${{ matrix.python-version }}, old-deps - ${{ matrix.old-deps }})
41+
name: test ${{ matrix.python-version }}
4242
runs-on: ubuntu-22.04
4343
strategy:
4444
fail-fast: false
4545
matrix:
46-
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
47-
old-deps: [ "false" ]
48-
include:
49-
- python-version: "3.7"
50-
old-deps: "true"
46+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
5147

5248
steps:
5349
- uses: actions/checkout@v2
@@ -65,16 +61,12 @@ jobs:
6561
uses: actions/cache@v3
6662
with:
6763
path: .venv
68-
key: venv-${{ runner.os }}-${{ matrix.python-version }}-old-deps-${{ matrix.old-deps }}-${{ hashFiles('**/poetry.lock') }}
64+
key: venv-test-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
6965

7066
- name: Install dependencies
7167
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
7268
run: make install
7369

74-
- name: Install old dependencies versions
75-
if: matrix.old-deps == 'true'
76-
run: poetry run pip install -r requirements-old-versions.txt
77-
7870
- name: Run tests
7971
run: make test
8072

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
- [Breaking] Default value for train dataset type and params for user and item dataset types in `DSSMModel` ([#122](https://github.com/MobileTeleSystems/RecTools/pull/122))
1616
- [Breaking] `n_factors` and `deterministic` params to `DSSMModel` ([#122](https://github.com/MobileTeleSystems/RecTools/pull/122))
1717
- Hit Rate metric ([#124](https://github.com/MobileTeleSystems/RecTools/pull/124))
18+
- Python `3.11` support (without `nmslib`) ([#126](https://github.com/MobileTeleSystems/RecTools/pull/126))
19+
- Python `3.12` support (without `nmslib` and `lightfm`) ([#126](https://github.com/MobileTeleSystems/RecTools/pull/126))
1820

1921
### Changed
2022
- Changed the logic of choosing random sampler for `RandomModel` and increased the sampling speed ([#120](https://github.com/MobileTeleSystems/RecTools/pull/120))
2123
- [Breaking] Changed the logic of `RandomModel`: now the recommendations are different for repeated calls of recommend methods ([#120](https://github.com/MobileTeleSystems/RecTools/pull/120))
2224
- Torch datasets to support warm recommendations ([#122](https://github.com/MobileTeleSystems/RecTools/pull/122))
2325
- [Breaking] Replaced `include_warm` parameter in `Dataset.get_user_item_matrix` to pair `include_warm_users` and `include_warm_items` ([#122](https://github.com/MobileTeleSystems/RecTools/pull/122))
2426
- [Breaking] Renamed torch datasets and `dataset_type` to `train_dataset_type` param in `DSSMModel` ([#122](https://github.com/MobileTeleSystems/RecTools/pull/122))
27+
- [Breaking] Updated minimum versions of `numpy`, `scipy`, `pandas`, `typeguard` ([#126](https://github.com/MobileTeleSystems/RecTools/pull/126))
28+
- [Breaking] Set restriction `scipy < 1.13` ([#126](https://github.com/MobileTeleSystems/RecTools/pull/126))
2529

2630
### Removed
27-
- `return_external_ids` parameter in `recommend` and `recommend_to_items` model methods ([#77](https://github.com/MobileTeleSystems/RecTools/pull/77))
31+
- [Breaking] `return_external_ids` parameter in `recommend` and `recommend_to_items` model methods ([#77](https://github.com/MobileTeleSystems/RecTools/pull/77))
32+
- [Breaking] Python `3.7` support ([#126](https://github.com/MobileTeleSystems/RecTools/pull/126))
2833

2934

3035
## [0.5.0] - 22.03.2024

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ install: .venv .reports
6060
poetry run pytest ${TESTS} --cov=${SOURCES} --cov-report=xml
6161

6262
.doctest:
63-
poetry run pytest --doctest-modules ${SOURCES}
63+
poetry run pytest --doctest-modules ${SOURCES} --ignore=rectools/tools/ann.py --ignore=rectools/models/lightfm.py
6464

6565
coverage: .venv .reports
6666
poetry run coverage run --source ${SOURCES} --module pytest

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Security Policy
33

44
**Supported Python versions**
55

6-
3.7 or above
6+
3.8 or above
77

88
**Product development security recommendations**
99

benchmark/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
Benchmark RecTools models on a dataset chosen.
66
One can choose either a built-in dataset or a custom dataset.
7-
Benchmark calcuation includes fitting a model, evaluating recommender metrics and profiling
7+
Benchmark calculation includes fitting a model, evaluating recommender metrics and profiling
88
time and memory required for calculations.
99
1010
Subpackages

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Install from PyPi using pip
6464
6565
$ pip install rectools
6666
67-
RecTools is compatible with all operating systems and with Python 3.7+.
67+
RecTools is compatible with all operating systems and with Python 3.8+.
6868
The default version doesn't contain all the dependencies. Optional dependencies are the following:
6969

7070
lightfm: adds wrapper for LightFM model,

0 commit comments

Comments
 (0)