-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpyproject.toml
146 lines (131 loc) · 3.76 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
[build-system]
requires = ["setuptools>=61.0", "wheel", "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.7"
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.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dynamic = ["version"]
[project.optional-dependencies]
plots = ["matplotlib", "ipython"]
others = ["lime"]
docs = ["matplotlib", "ipython", "numpydoc", "sphinx_rtd_theme", "sphinx", "nbsphinx"]
test-core = ["pytest", "pytest-mpl", "pytest-cov"]
test = [
"pytest",
"pytest-mpl",
"pytest-cov",
"xgboost",
"lightgbm",
"catboost",
"pyspark",
"pyod",
"transformers",
"protobuf==3.20.3", # See GH #3046
"torch",
"torchvision",
"tensorflow",
"sentencepiece",
"opencv-python",
]
[project.urls]
Repository = 'http://github.com/slundberg/shap'
Documentation = 'https://shap.readthedocs.io/en/latest/index.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
]
target-version = "py37"
[tool.ruff.per-file-ignores]
# Unused imports often intentional in top-level __init__.py
"__init__.py" = ["F401"]
# Don't apply linting/formatting to vendored code
"shap/explainers/other/_maple.py" = ["ALL"]
"shap/plots/colors/_colorconv.py" = ["ALL"]
[tool.coverage.run]
source_pkgs = ["shap"]
[tool.coverage.paths]
combine = ["shap", "*/site-packages/shap"]
[tool.cibuildwheel]
skip = ["pp*", "*-musllinux_*"]
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 cp37 since catboost wheel not available
# 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)
test-skip = "cp37-* cp38-macosx_x86_64 *-*linux_{aarch64,ppc64le,s390x} *-macosx_arm64"
[tool.cibuildwheel.linux]
archs = ["x86_64", "aarch64"]
[tool.cibuildwheel.windows]
archs = ["AMD64"]
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]