From a8ee82a70f79ee0223e6ea3177901e833ff644b7 Mon Sep 17 00:00:00 2001 From: Thomas BOUCHE Date: Thu, 30 Nov 2023 14:59:12 +0100 Subject: [PATCH 1/2] update for python 3.11 --- .github/workflows/main.yml | 2 +- README.md | 2 +- docs/installation-instructions/index.rst | 2 +- setup.py | 3 ++- tests/unit_tests/explainer/test_smart_explainer.py | 4 +++- tests/unit_tests/utils/test_load_smartpredictor.py | 2 ++ 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e22905c9..25f6cc9f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: strategy: max-parallel: 1 matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} diff --git a/README.md b/README.md index 6fc7e86d..eb0fe218 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ Shapash can use category-encoders object, sklearn ColumnTransformer or simply fe ## 🛠 Installation -Shapash is intended to work with Python versions 3.8 to 3.10. Installation can be done with pip: +Shapash is intended to work with Python versions 3.8 to 3.11. Installation can be done with pip: ``` pip install shapash diff --git a/docs/installation-instructions/index.rst b/docs/installation-instructions/index.rst index 8b3b8347..e4768430 100644 --- a/docs/installation-instructions/index.rst +++ b/docs/installation-instructions/index.rst @@ -4,7 +4,7 @@ Installation instructions Installing ---------- -**Shapash** is intended to work with Python versions 3.8 to 3.10. Installation can be done with pip: +**Shapash** is intended to work with Python versions 3.8 to 3.11. Installation can be done with pip: .. code:: bash diff --git a/setup.py b/setup.py index 02c635a5..444ebfe2 100644 --- a/setup.py +++ b/setup.py @@ -63,7 +63,7 @@ setup( name="shapash", version=version_d['__version__'], - python_requires='>3.7, <3.11', + python_requires='>3.7, <3.12', url='https://github.com/MAIF/shapash', author="Yann Golhen, Sebastien Bidault, Yann Lagre, Maxime Gendre", author_email="yann.golhen@maif.fr", @@ -75,6 +75,7 @@ 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", ], diff --git a/tests/unit_tests/explainer/test_smart_explainer.py b/tests/unit_tests/explainer/test_smart_explainer.py index fd990bee..9292aae1 100644 --- a/tests/unit_tests/explainer/test_smart_explainer.py +++ b/tests/unit_tests/explainer/test_smart_explainer.py @@ -703,9 +703,11 @@ def test_load_1(self): pkl_file = path.join(current, 'data/xpl_to_load_39.pkl') elif str(sys.version)[0:4] == '3.10': pkl_file = path.join(current, 'data/xpl_to_load_310.pkl') + elif str(sys.version)[0:4] == '3.11': + pkl_file = path.join(current, 'data/xpl_to_load_311.pkl') else: raise NotImplementedError - + xpl.save(pkl_file) xpl2 = SmartExplainer.load(pkl_file) diff --git a/tests/unit_tests/utils/test_load_smartpredictor.py b/tests/unit_tests/utils/test_load_smartpredictor.py index f19b1353..d17e5768 100644 --- a/tests/unit_tests/utils/test_load_smartpredictor.py +++ b/tests/unit_tests/utils/test_load_smartpredictor.py @@ -30,6 +30,8 @@ def test_load_smartpredictor_1(self): pkl_file = path.join(current, 'data/predictor_to_load_38.pkl') elif str(sys.version)[0:3] == '3.9': pkl_file = path.join(current, 'data/predictor_to_load_39.pkl') + elif str(sys.version)[0:4] == '3.11': + pkl_file = path.join(current, 'data/predictor_to_load_311.pkl') else: raise NotImplementedError From 8d0fb29a824d09ad15829619d269251e4db9020b Mon Sep 17 00:00:00 2001 From: Thomas BOUCHE Date: Thu, 30 Nov 2023 17:45:28 +0100 Subject: [PATCH 2/2] add 3.11 for tags release --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 25f6cc9f..20b8759e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,7 @@ jobs: run: | python setup.py sdist bdist_wheel - name: Deploy to PyPI - if: success() && startsWith(github.ref, 'refs/tags') && matrix.python-version == '3.10' + if: success() && startsWith(github.ref, 'refs/tags') && matrix.python-version == '3.11' uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__