-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathtox.ini
120 lines (106 loc) · 3.3 KB
/
tox.ini
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
; This is a tox config for running ELI5 tests
; under all supported Python interpreters.
; Building LightGBM may require additional system-level dependencies
; (e.g. cmake); please consult with
; https://github.com/Microsoft/LightGBM/tree/master/python-package#lightgbm-python-package.
[tox]
; if adding or removing an environment, please also update .github/workflows/python-package.yml
envlist = docs,mypy,py39,py310,py310-nodeps,py310-extra,py311,py312,py313
[base]
deps=
-cconstraints-test.txt
pytest
pytest-cov
pytest-xdist
hypothesis[numpy] !=3.5.1, !=3.5.0, !=4.24.3
numpy
scipy
scikit-learn
[testenv]
whitelist_externals = /bin/bash
deps=
{[base]deps}
ipython
pandas
sklearn-crfsuite
commands=
pip install -e .
py.test --doctest-modules \
--ignore eli5/xgboost.py \
--ignore eli5/lightgbm.py \
--ignore eli5/catboost.py \
--ignore eli5/keras \
--ignore eli5/lightning.py \
--ignore eli5/formatters/image.py \
--ignore tests/utils_image.py \
--cov=eli5 --cov-report=html --cov-report=term {posargs: eli5 tests}
[testenv:py310-extra]
basepython=python3.10
deps=
{[testenv]deps}
xgboost < 2.0.0
lightgbm != 2.0.5, != 2.0.6
catboost
# tensorflow
# keras
matplotlib
Pillow
commands=
; to install lightning numpy and Cython must be installed first
pip install Cython 'setuptools < 60.0'
pip install joblib "sklearn-contrib-lightning >= 0.4" --no-binary sklearn-contrib-lightning
pip install -e .
; run tests for extra dependencies
py.test --doctest-modules \
--ignore tests/test_lime.py \
--ignore tests/test_formatters.py \
--ignore tests/test_samplers.py \
--ignore tests/test_sklearn_explain_prediction.py \
--ignore tests/test_sklearn_explain_weights.py \
--ignore tests/test_sklearn_vectorizers.py \
--ignore tests/test_utils.py \
--ignore eli5/lightning.py \
--ignore eli5/keras \
--cov=eli5 --cov-report=html --cov-report=term {posargs: eli5 tests}
[testenv:py310-nodeps]
deps=
{[base]deps}
commands=
pip install -e .
py.test --doctest-modules \
--ignore eli5/lightning.py \
--ignore eli5/sklearn_crfsuite \
--ignore eli5/ipython.py \
--ignore eli5/xgboost.py \
--ignore eli5/lightgbm.py \
--ignore eli5/catboost.py \
--ignore eli5/keras \
--ignore eli5/formatters/as_dataframe.py \
--ignore eli5/formatters/image.py \
--ignore tests/utils_image.py \
--cov=eli5 --cov-report=html --cov-report=term {posargs: eli5 tests}
[testenv:mypy]
basepython=python3.10
deps=
{[testenv]deps}
mypy == 1.15.0
types-tabulate
lxml
commands=
mypy --html-report ./mypy-cov --check-untyped-defs --ignore-missing-imports eli5
[testenv:docs]
basepython=python3.10
deps=
mock==5.2.0
pillow==11.1.0
commonmark==0.9.1
recommonmark==0.7.1
sphinx==7.1.2
sphinx-rtd-theme==1.3.0rc1
readthedocs-sphinx-ext==2.2.5
-rdocs/requirements.txt
changedir=docs/source
commands=
pip install -e ../..
; TODO re-enable -W
sphinx-build -b html . {envtmpdir}/html