Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 29 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -84,6 +102,7 @@ jobs:
name: Run stylechecks
command: |
tox -e stylechecks

test_docs:
docker:
- image: cimg/python:3.10.0
Expand All @@ -96,6 +115,7 @@ jobs:
name: Run doc build
command: |
tox -e docs

test_type:
docker:
- image: cimg/python:3.10.0
Expand All @@ -108,6 +128,7 @@ jobs:
name: Run typechecks
command: |
tox -e typechecks

upload_codecov:
docker:
- image: cimg/python:3.10.0
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
32 changes: 15 additions & 17 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -21,50 +19,50 @@ 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 =
-rtest_requirements.txt

[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 =
coverage run -m pytest -v
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
Expand Down