diff --git a/.circleci/config.yml b/.circleci/config.yml index b03548e69..5a4c24c3e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,6 +23,7 @@ init_pypirc: &init_pypirc echo -e "repository = $FE_PYPI_URL" >> ~/.pypirc echo -e "username = $FE_PYPI_USER" >> ~/.pypirc echo -e "password = $FE_PYPI_API_KEY" >> ~/.pypirc + jobs: test_feature_engine_py39: docker: @@ -36,6 +37,7 @@ jobs: name: Run tests with Python 3.9 command: | tox -e py39 + test_feature_engine_py310: docker: - image: cimg/python:3.10.0 @@ -48,7 +50,8 @@ jobs: name: Run tests with Python 3.10 command: | tox -e py310 - test_feature_engine_py311: + + test_feature_engine_py311_sklearn150: docker: - image: cimg/python:3.11.7 working_directory: ~/project @@ -57,9 +60,23 @@ jobs: path: ~/project - *prepare_tox - run: - name: Run tests with Python 3.11 + name: Run tests with Python 3.11 and scikit-learn 1.0.0 command: | - tox -e py311 + tox -e py311-sklearn150 + + test_feature_engine_py311_sklearn160: + docker: + - image: cimg/python:3.11.7 + working_directory: ~/project + steps: + - checkout: + path: ~/project + - *prepare_tox + - run: + name: Run tests with Python 3.11 and scikit-learn 1.4.0 + command: | + tox -e py311-sklearn160 + test_feature_engine_py312: docker: - image: cimg/python:3.12.1 @@ -72,6 +89,7 @@ jobs: name: Run tests with Python 3.12 command: | tox -e py312 + test_style: docker: - image: cimg/python:3.10.0 @@ -84,6 +102,7 @@ jobs: name: Run stylechecks command: | tox -e stylechecks + test_docs: docker: - image: cimg/python:3.10.0 @@ -96,6 +115,7 @@ jobs: name: Run doc build command: | tox -e docs + test_type: docker: - image: cimg/python:3.10.0 @@ -108,6 +128,7 @@ jobs: name: Run typechecks command: | tox -e typechecks + upload_codecov: docker: - image: cimg/python:3.10.0 @@ -141,13 +162,15 @@ jobs: python setup.py sdist bdist_wheel --universal ls -l dist twine upload dist/* + workflows: version: 2 test-all: jobs: - test_feature_engine_py39 - test_feature_engine_py310 - - test_feature_engine_py311 + - test_feature_engine_py311_sklearn150 + - test_feature_engine_py311_sklearn160 - test_feature_engine_py312 - test_style - test_docs @@ -161,7 +184,8 @@ workflows: requires: - test_feature_engine_py39 - test_feature_engine_py310 - - test_feature_engine_py311 + - test_feature_engine_py311_sklearn150 + - test_feature_engine_py311_sklearn160 - test_feature_engine_py312 - test_style - test_docs diff --git a/tox.ini b/tox.ini index 5ceeb7d6a..54c16f184 100644 --- a/tox.ini +++ b/tox.ini @@ -1,15 +1,13 @@ [tox] -envlist = py39, py310, py311, py312, codecov, docs, stylechecks, typechecks +envlist = py39, py310, py311-sklearn150, py311-sklearn160, py312, codecov, docs, stylechecks, typechecks skipsdist = true [testenv] install_command = pip install {opts} {packages} envdir = {toxworkdir}/unit_tests - setenv = - PYTHONPATH=. - COVERAGE_RCFILE = {envtmpdir}/coveragerc - + PYTHONPATH=. + COVERAGE_RCFILE = {envtmpdir}/coveragerc commands = pytest tests @@ -21,9 +19,15 @@ deps = deps = -rtest_requirements.txt -[testenv:py311] +[testenv:py311-sklearn150] deps = -rtest_requirements.txt + scikit-learn==1.5.1 + +[testenv:py311-sklearn160] +deps = + -rtest_requirements.txt + scikit-learn==1.6.1 [testenv:py312] deps = @@ -31,7 +35,7 @@ deps = [testenv:codecov] deps = - -rtest_requirements.txt + -rtest_requirements.txt commands_pre = {envpython} -c 'from pathlib import Path; Path(r"{env:COVERAGE_RCFILE}").write_text(Path(".coveragerc").read_text())' commands = @@ -39,32 +43,26 @@ commands = coverage report [testenv:docs] -deps = - -r docs/requirements.txt -commands = - sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html - +deps = + -r docs/requirements.txt +commands = + sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html [testenv:stylechecks] deps = flake8 - commands = {posargs:flake8 feature_engine tests} - [testenv:typechecks] deps = mypy - commands = {posargs:mypy feature_engine} - [flake8] exclude = .git, env # match black code formatter max-line-length = 88 - profile = black line_length = 88 lines_between_sections = 1