From c06024f2d98c2ca14d1fcd1cf0786dcd584ae718 Mon Sep 17 00:00:00 2001 From: Soledad Galli Date: Tue, 21 Jul 2026 20:49:46 +0200 Subject: [PATCH 1/2] start narwhals migration --- .circleci/config.yml | 60 ----------------------------- README.md | 2 +- docs/contribute/contribute_code.rst | 2 +- docs/contribute/contribute_docs.rst | 2 +- docs/index.rst | 2 +- pyproject.toml | 11 +++--- requirements.txt | 4 -- tox.ini | 22 ----------- 8 files changed, 10 insertions(+), 95 deletions(-) delete mode 100644 requirements.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index 127b33bef..0e53f290b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,58 +42,6 @@ jobs: # Test matrix # ------------------------ - test_feature_engine_py39: - docker: - - image: cimg/python:3.9.0 - working_directory: ~/project - steps: - - checkout: - path: ~/project - - *prepare_tox - - run: - name: Run tests (Python 3.9) - command: | - tox -e py39 - - test_feature_engine_py310: - docker: - - image: cimg/python:3.10.0 - working_directory: ~/project - steps: - - checkout: - path: ~/project - - *prepare_tox - - run: - name: Run tests (Python 3.10) - command: | - tox -e py310 - - test_feature_engine_py311_sklearn150: - docker: - - image: cimg/python:3.11.7 - working_directory: ~/project - steps: - - checkout: - path: ~/project - - *prepare_tox - - run: - name: Run tests (Python 3.11, scikit-learn 1.5) - command: | - 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 (Python 3.11, scikit-learn 1.6) - command: | - tox -e py311-sklearn160 - test_feature_engine_py311_sklearn170: docker: - image: cimg/python:3.11.7 @@ -277,10 +225,6 @@ workflows: test-all: jobs: - - test_feature_engine_py39 - - test_feature_engine_py310 - - test_feature_engine_py311_sklearn150 - - test_feature_engine_py311_sklearn160 - test_feature_engine_py311_sklearn170 - test_feature_engine_py312_pandas230 - test_feature_engine_py312_pandas300 @@ -298,10 +242,6 @@ workflows: - package_and_upload_to_pypi: requires: - - test_feature_engine_py39 - - test_feature_engine_py310 - - test_feature_engine_py311_sklearn150 - - test_feature_engine_py311_sklearn160 - test_feature_engine_py311_sklearn170 - test_feature_engine_py312_pandas230 - test_feature_engine_py312_pandas300 diff --git a/README.md b/README.md index 76a9056bc..7542bfba7 100644 --- a/README.md +++ b/README.md @@ -275,7 +275,7 @@ Feature-engine documentation is built using [Sphinx](https://www.sphinx-doc.org) To build the documentation make sure you have the dependencies installed: from the root directory: ``` -pip install -r docs/requirements.txt +pip install -e ".[docs]" ``` Now you can build the docs using: diff --git a/docs/contribute/contribute_code.rst b/docs/contribute/contribute_code.rst index 4e85515ec..d5413e051 100644 --- a/docs/contribute/contribute_code.rst +++ b/docs/contribute/contribute_code.rst @@ -395,7 +395,7 @@ To do this, first make sure you have all the documentation dependencies installe set up the environment as we described previously, they should be installed. Alternatively, from the windows cmd or mac terminal, run:: - $ pip install -r docs/requirements.txt + $ pip install -e ".[docs]" Make sure you are within the feature_engine module when you run the previous command. diff --git a/docs/contribute/contribute_docs.rst b/docs/contribute/contribute_docs.rst index 856e22d85..ee16ed9f4 100644 --- a/docs/contribute/contribute_docs.rst +++ b/docs/contribute/contribute_docs.rst @@ -79,7 +79,7 @@ dependencies. If you set up the development environment as we described in the Alternatively, first activate your environment. Then navigate to the root folder of feature-engine. And now install the requirements for the documentation:: - $ pip install -r docs/requirements.txt + $ pip install -e ".[docs]" To build the documentation (and test if it is working properly) run:: diff --git a/docs/index.rst b/docs/index.rst index 6a05f7e9e..9e5a18dd0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -127,7 +127,7 @@ The following characteristics make feature-engine unique: Installation ------------ -Feature-engine is a Python 3 package and works well with 3.9 or later. +Feature-engine is a Python 3 package and works well with 3.11 or later. The simplest way to install feature-engine is from PyPI with pip: diff --git a/pyproject.toml b/pyproject.toml index 2a385d74d..b862c76b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,18 +10,16 @@ license = {text = "BSD 3 clause"} authors = [ { name = "Soledad Galli", email = "solegalli@protonmail.com" } ] -requires-python = ">=3.9.0" +requires-python = ">=3.11.0" dependencies = [ "numpy>=1.18.2", - "pandas>=2.2.0", - "scikit-learn>=1.4.0", + "scikit-learn>=1.7.0", "scipy>=1.4.1", + "narwhals>=2.0.0", ] classifiers = [ "License :: OSI Approved :: BSD License", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", @@ -39,10 +37,13 @@ docs = [ "pydata_sphinx_theme>=0.7.2", "sphinx_autodoc_typehints>=1.11.1,<=1.21.3", "numpydoc>=0.9.2", + "pandas>=2.2.0", ] tests = [ "pytest>=5.4.1", + "pandas>=2.2.0", + "polars>=1.0.0", # repo maintenance tooling "black>=21.5b1", diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 6df436a29..000000000 --- a/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -numpy>=1.18.2 -pandas>=2.2.0 -scikit-learn>=1.4.0 -scipy>=1.4.1 diff --git a/tox.ini b/tox.ini index c31b3edd1..4a21bd8ee 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,5 @@ [tox] envlist = - py39 - py310 - py311-sklearn150 - py311-sklearn160 py311-sklearn170 py312-pandas230 py312-pandas300 @@ -32,14 +28,6 @@ commands = # Python versions # ------------------------- -[testenv:py39] -deps = - .[tests] - -[testenv:py310] -deps = - .[tests] - [testenv:py313] deps = .[tests] @@ -53,16 +41,6 @@ deps = # scikit-learn matrix # ------------------------- -[testenv:py311-sklearn150] -deps = - .[tests] - scikit-learn==1.5.1 - -[testenv:py311-sklearn160] -deps = - .[tests] - scikit-learn==1.6.1 - [testenv:py311-sklearn170] deps = .[tests] From 5cb9742b9e7475ace544553086ac70a20e614c71 Mon Sep 17 00:00:00 2001 From: Soledad Galli Date: Tue, 21 Jul 2026 22:50:48 +0200 Subject: [PATCH 2/2] fix doc test --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0e53f290b..0d31c7f44 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ orbs: defaults: &defaults docker: - - image: cimg/python:3.10.0 + - image: cimg/python:3.12.1 working_directory: ~/project prepare_tox: &prepare_tox @@ -114,7 +114,7 @@ jobs: test_style: docker: - - image: cimg/python:3.10.0 + - image: cimg/python:3.12.1 working_directory: ~/project steps: - checkout: @@ -127,7 +127,7 @@ jobs: test_docs: docker: - - image: cimg/python:3.10.0 + - image: cimg/python:3.12.1 working_directory: ~/project steps: - checkout: @@ -140,7 +140,7 @@ jobs: test_type: docker: - - image: cimg/python:3.10.0 + - image: cimg/python:3.12.1 working_directory: ~/project steps: - checkout: