From a076b0ebaa62d2aa91ad49158c325fb85f291d56 Mon Sep 17 00:00:00 2001 From: Gillesa Date: Fri, 14 Oct 2022 17:12:09 +0200 Subject: [PATCH 1/5] update Setup python requirements & classifiers Signed-off-by: Gillesa --- setup.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 14b3b5d..f2c991f 100755 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ setup( name="eurybia", # Replace with your own username version=version_d["__version__"], - python_requires=">3.6, < 3.10", + python_requires=">3.6, < 3.11", url="https://github.com/MAIF/eurybia", author="Nicolas Roux, Johann Martin, Thomas Bouché", author_email="thomas.bouche@maif.fr", @@ -50,6 +50,7 @@ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", ], @@ -77,10 +78,15 @@ ("data", ["eurybia/data/titanic_original.csv"]), ("data", ["eurybia/data/US_Accidents_extract.csv"]), ("style", ["eurybia/style/colors.json"]), - ("assets", ["eurybia/assets/local-report-base.css", - "eurybia/assets/local-report-base.js", - "eurybia/assets/logo_eurybia_dp.png", - "eurybia/assets/report_template.html"]), + ( + "assets", + [ + "eurybia/assets/local-report-base.css", + "eurybia/assets/local-report-base.js", + "eurybia/assets/logo_eurybia_dp.png", + "eurybia/assets/report_template.html", + ], + ), ], include_package_data=True, setup_requires=setup_requirements, From daa841f4e4096a38186f2761710d93878b012a51 Mon Sep 17 00:00:00 2001 From: Gillesa Date: Fri, 14 Oct 2022 17:12:47 +0200 Subject: [PATCH 2/5] Have to upgrade pytest with python 3.10 Signed-off-by: Gillesa --- requirements.dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.dev.txt b/requirements.dev.txt index 47a22c3..9124555 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -15,7 +15,7 @@ sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 nbsphinx==0.8.8 sphinx_material==0.0.35 -pytest==5.2.3 +pytest>=5.2.3 pytest-cov==2.8.1 scikit-learn>=0.24.2 xgboost>=1.0.0 From b4b0c213d252e5ebb492aca1e7aea65b4a360387 Mon Sep 17 00:00:00 2001 From: Gillesa Date: Fri, 14 Oct 2022 17:13:35 +0200 Subject: [PATCH 3/5] Update github action workflow with python 3.10 Signed-off-by: Gillesa --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e819ac9..f869362 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: strategy: max-parallel: 1 matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -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.9 + if: success() && startsWith(github.ref, 'refs/tags') && matrix.python-version == 3.10 uses: pypa/gh-action-pypi-publish@master with: user: __token__ From 6abb15ebefd77a0eb435b36431cdcd7944397608 Mon Sep 17 00:00:00 2001 From: Gillesa Date: Fri, 14 Oct 2022 17:45:03 +0200 Subject: [PATCH 4/5] Fix name 3.10, and update cmd to pytest Signed-off-by: Gillesa --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f869362..5f40909 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: strategy: max-parallel: 1 matrix: - python-version: [3.7, 3.8, 3.9, 3.10] + python-version: ["3.7", "3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -28,12 +28,12 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pytest + python -m pytest - name: Build python package 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.10' uses: pypa/gh-action-pypi-publish@master with: user: __token__ From df48e8bb3ad824225ccecb3634d30d0cde85b47f Mon Sep 17 00:00:00 2001 From: Gillesa Date: Fri, 14 Oct 2022 18:26:50 +0200 Subject: [PATCH 5/5] Update README.md for Python 3.10 Signed-off-by: Gillesa --- README.md | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 07d0f5d..5135d56 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ · Eurybia Quick Tour · - Tutorial Article + Tutorial Article

@@ -61,13 +61,17 @@ The 3 steps to display results: ```python from eurybia import SmartDrift + sd = SmartDrift( - df_current=df_current, - df_baseline=df_baseline, - deployed_model=my_model, # Optional: put in perspective result with importance on deployed model - encoding=my_encoder, # Optional: if deployed_model and encoder to use this model - dataset_names={"df_current": "Current dataset Name", "df_baseline": "Baseline dataset Name"} # Optional: Names for outputs - ) + df_current=df_current, + df_baseline=df_baseline, + deployed_model=my_model, # Optional: put in perspective result with importance on deployed model + encoding=my_encoder, # Optional: if deployed_model and encoder to use this model + dataset_names={ + "df_current": "Current dataset Name", + "df_baseline": "Baseline dataset Name", + }, # Optional: Names for outputs +) ``` - Step 2: Compile Model @@ -75,10 +79,10 @@ sd = SmartDrift( ```python sd.compile( - full_validation=True, # Optional: to save time, leave the default False value. If True, analyze consistency on modalities between columns. - date_compile_auc='01/01/2022', # Optional: useful when computing the drift for a time that is not now - datadrift_file="datadrift_auc.csv", # Optional: name of the csv file that contains the performance history of data drift - ) + full_validation=True, # Optional: to save time, leave the default False value. If True, analyze consistency on modalities between columns. + date_compile_auc="01/01/2022", # Optional: useful when computing the drift for a time that is not now + datadrift_file="datadrift_auc.csv", # Optional: name of the csv file that contains the performance history of data drift +) ``` - Step 3: Generate report @@ -87,18 +91,18 @@ sd.compile( ```python sd.generate_report( - output_file='output/my_report_name.html', - title_story="my_report_title", - title_description="my_report_subtitle", # Optional: add a subtitle to describe report - project_info_file='project_info.yml' # Optional: add information on report - ) + output_file="output/my_report_name.html", + title_story="my_report_title", + title_description="my_report_subtitle", # Optional: add a subtitle to describe report + project_info_file="project_info.yml", # Optional: add information on report +) ``` [Report Example](https://eurybia.readthedocs.io/en/latest/report.html) ## 🛠 Installation -Eurybia is intended to work with Python versions 3.7 to 3.9. Installation can be done with pip: +Eurybia is intended to work with Python versions 3.7 to 3.10. Installation can be done with pip: ``` pip install eurybia