-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #206 from ThibaudReal/feature/extras_requirements
Feature/extras requirements
- Loading branch information
Showing
14 changed files
with
146 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
'plotly==4.12.0', | ||
'numpy>1.18.0', | ||
'pandas>1.0.2', | ||
'shap==0.37.0', | ||
'shap>=0.36.0', | ||
'dash==1.17.0', | ||
'dash-bootstrap-components==0.9.1', | ||
'dash-core-components==1.13.0', | ||
|
@@ -21,21 +21,37 @@ | |
'dash-renderer==1.8.3', | ||
'dash-table==4.11.0', | ||
'nbformat>4.2.0', | ||
'numba==0.51.2', | ||
'nbconvert==6.0.7', | ||
'papermill==2.3.2', | ||
'matplotlib>=3.0', | ||
'seaborn==0.11.1' | ||
'numba==0.53.1', | ||
'scikit-learn' | ||
] | ||
|
||
extras = dict() | ||
|
||
# This list should be identical to the list in shapash/report/__init__.py | ||
extras['report'] = [ | ||
'nbconvert==6.0.7', | ||
'papermill', | ||
'matplotlib', | ||
'seaborn', | ||
'notebook', | ||
'Jinja2', | ||
'phik' | ||
] | ||
|
||
extras['xgboost'] = ['xgboost>=1.0.0'] | ||
extras['lightgbm'] = ['lightgbm>=2.3.0'] | ||
extras['catboost'] = ['catboost>=0.21'] | ||
extras['scikit-learn'] = ['scikit-learn>=0.23.0'] | ||
extras['category_encoders'] = ['category_encoders==2.2.2'] | ||
|
||
setup_requirements = ['pytest-runner', ] | ||
|
||
test_requirements = ['pytest', ] | ||
|
||
setup( | ||
name="shapash", # Replace with your own username | ||
name="shapash", | ||
version="1.3.2", | ||
python_requires='>3.5, < 3.9', | ||
python_requires='>3.5, <=3.9', | ||
url='https://github.com/MAIF/shapash', | ||
author="Yann Golhen, Sebastien Bidault, Yann Lagre, Maxime Gendre", | ||
author_email="[email protected]", | ||
|
@@ -51,6 +67,7 @@ | |
"Operating System :: OS Independent", | ||
], | ||
install_requires=requirements, | ||
extras_require=extras, | ||
license="Apache Software License 2.0", | ||
keywords='shapash', | ||
package_dir={ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import importlib | ||
|
||
# This list should be identical to the list in setup.py | ||
report_requirements = [ | ||
'nbconvert==6.0.7', | ||
'papermill', | ||
'matplotlib', | ||
'seaborn', | ||
'notebook', | ||
'Jinja2' | ||
] | ||
|
||
|
||
def check_report_requirements(): | ||
""" | ||
Checks that all required packages for the report are installed. | ||
This function should be called before executing the report. | ||
""" | ||
for req in report_requirements: | ||
pkg = req.split('=')[0] | ||
try: | ||
importlib.import_module(pkg.lower()) | ||
except (ModuleNotFoundError, ImportError): | ||
raise ModuleNotFoundError(f"The following package is necessary to generate the Shapash Report : {pkg}. " | ||
f"Try 'pip install shapash[report]' to install all required packages.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters