forked from shap/shap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
175 lines (157 loc) · 4.95 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
[build-system]
requires = ["setuptools>=61.0", "oldest-supported-numpy", "packaging>20.9"]
build-backend = "setuptools.build_meta"
[project]
name = "shap"
description = "A unified approach to explain the output of any machine learning model."
readme = "README.md"
license = {text = "MIT License"}
authors = [
{name = "Scott Lundberg", email = "[email protected]"},
]
requires-python = ">=3.8"
dependencies = [
'numpy',
'scipy',
'scikit-learn',
'pandas',
'tqdm>=4.27.0',
'packaging>20.9',
'slicer==0.0.7',
'numba',
'cloudpickle'
]
classifiers = [
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
]
dynamic = ["version"]
[project.optional-dependencies]
plots = ["matplotlib", "ipython"]
others = ["lime"]
docs = [
"matplotlib",
"ipython",
"numpydoc",
"sphinx_rtd_theme==1.2.2",
"sphinx==6.2.1",
"nbsphinx==0.9.2",
"sphinx_github_changelog==1.2.1",
"requests",
]
test-core = ["pytest", "pytest-mpl", "pytest-cov"]
test = [
"pytest",
"pytest-mpl",
"pytest-cov",
"xgboost",
"lightgbm",
"catboost",
"gpboost",
"ngboost;python_version<'3.11'", # FIXME: pending py3.11 support
"pyspark",
"pyod",
"transformers",
"protobuf==3.20.3", # See GH #3046
"torch",
"torchvision",
"tensorflow",
"sentencepiece",
"opencv-python",
]
[project.urls]
Repository = 'http://github.com/shap/shap'
Documentation = 'https://shap.readthedocs.io/en/latest/index.html'
"Release Notes" = 'https://shap.readthedocs.io/en/latest/release_notes.html'
[tool.setuptools]
packages = [
'shap',
'shap.cext',
'shap.explainers',
'shap.explainers.other',
'shap.explainers._deep',
'shap.plots',
'shap.plots.colors',
'shap.plots.resources',
'shap.benchmark',
'shap.maskers',
'shap.utils',
'shap.actions',
'shap.models'
]
zip-safe = false
[tool.setuptools.dynamic]
version = {attr = "shap.__version__"}
[tool.setuptools.package-data]
shap = ["plots/resources/*", "cext/*"]
[tool.pytest.ini_options]
addopts = "--mpl"
testpaths = ["tests"]
filterwarnings = [
# Ignore warnings that are entirely from 3rd party libs outside our control
"ignore:.*distutils Version classes are deprecated.*:DeprecationWarning:.*pandas.*",
"ignore:.*typing.io is deprecated.*:DeprecationWarning:.*pyspark.*",
]
[tool.ruff]
select = [
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"E", # pycodestyle
"W", # warning
]
ignore = [
# Aim to progressively fix address these codes over time
"E501", # Line too long
"E741", # Ambiguous variable name: `l`
"E402", # Module level import not at top of file
"UP032", # Use f-string instead of `format` call
]
# Careful: when running on pre-commit, ruff's "include" and "exclude" config
# options are ignored! So, use the "per-file-ignores" config to disable linting
# for specific files.
[tool.ruff.per-file-ignores]
# Don't apply linting/formatting to vendored code
"shap/explainers/other/_maple.py" = ["ALL"]
"shap/plots/colors/_colorconv.py" = ["ALL"]
# Ignore SHAP Paper, as it is an unmaintained record of a published paper
"notebooks/tabular_examples/tree_based_models/tree_shap_paper/*" = ["ALL"]
# Disable some unwanted rules on Jupyter notebooks
"*.ipynb" = ["E703"] # Trailing semicolons, used to supress outputs
[tool.coverage.run]
source_pkgs = ["shap"]
[tool.coverage.paths]
combine = ["shap", "*/site-packages/shap"]
[tool.cibuildwheel]
# Restrict the set of builds to mirror the wheels available in scipy. See #3028
# skip *-musllinux_aarch64 since numpy doesn't provid those wheels
# skip cp38-musllinux_x86_64 since numpy never provided cp38 musllinux wheels
# they introduced musllinux in 1.25 when they already dropped cp38
skip = ["pp*", "*-musllinux_aarch64", "cp38-musllinux_x86_64"]
build-verbosity = 2
# Change import-mode to ensure we test against installed package, not local project
test-command = "pytest -v {project}/tests --import-mode=append"
test-extras = ["test-core", "plots"]
# skip tests on cp38-macosx_x86_64 because of https://github.com/catboost/catboost/issues/2371
# skip tests on emulated architectures, as they are very slow
# skip tests on *-macosx_arm64 , as cibuildwheel does not support tests on arm64 (yet)
# skip tests on *-musllinux*" since llvmlite and numba do not provide musllinux wheels
test-skip = "cp38-macosx_x86_64 *-*linux_{aarch64,ppc64le,s390x} *-macosx_arm64 *-musllinux*"
[tool.cibuildwheel.linux]
archs = ["x86_64", "aarch64"]
[tool.cibuildwheel.windows]
archs = ["AMD64"]
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]