-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathtox.ini
162 lines (142 loc) · 4.24 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
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
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
# Users running macOS may need to install libomp. If using the Homebrew
# package manager then this can be achieved with "brew install libomp".
[tox]
envlist = {py39,py310,py311,py312}-{lightgbm,keras,pandas,pytorch,sklearn,xgboost,no_deps,all_deps}-{gurobi10,gurobi11,gurobi12},pre-commit,docs,examples-{gurobi10,gurobi11,gurobi12}
isolated_build = True
[gh-actions]
python =
3.9: py39-all_deps
3.10: py310-all_deps
3.12: py312-all_deps
3.11: pre-commit,py311-{lightgbm,keras,pytorch,sklearn,xgboost,no_deps,all_deps}
[gh-actions:env]
GUROBI_VERSION =
gurobi12: gurobi12
gurobi11: gurobi11
gurobi10: gurobi10
[testenv:docs]
deps=
-r{toxinidir}/docs/requirements.txt
changedir = {toxinidir}/docs
allowlist_externals = /usr/bin/make
commands =
make html
[testenv:{py39,py310,py311,py312}-examples-{gurobi10,gurobi11,gurobi12}]
deps =
-r{toxinidir}/requirements.tox.txt
-r{toxinidir}/requirements.keras.txt
-r{toxinidir}/requirements.pytorch.txt
-r{toxinidir}/requirements.sklearn.txt
-r{toxinidir}/requirements.pandas.txt
-r{toxinidir}/requirements.xgboost.txt
notebook
matplotlib
ipywidgets
seaborn
gurobi10: gurobipy==10.0.3
gurobi11: gurobipy==11.0.3
gurobi12: gurobipy==12.0.0
changedir = {toxinidir}/notebooks
allowlist_externals = /usr/bin/make
commands =
make
[testenv:pre-commit]
skip_install = true
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
[testenv:coverage]
commands = pytest --cov=src/gurobi_ml --cov-append --cov-report=term-missing tests/
depends =
{py39,py310,py311}: clean
report: py39,py310,py311
[testenv:report]
deps = coverage
skip_install = true
commands =
coverage report --omit='/tmp/*,/private/*'
coverage html --omit='/tmp/*,/private/*'
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase
[base]
deps =
-r{toxinidir}/requirements.tox.txt
pytest
pytest-subtests
pytest-cov
joblib
gurobi10: gurobipy==10.0.3
gurobi11: gurobipy==11.0.3
gurobi12: gurobipy==12.0.0
[testenv:{py39,py310,py311,py312}-keras-{gurobi10,gurobi11,gurobi12}]
deps =
{[base]deps}
-r{toxinidir}/requirements.keras.txt
commands =
pytest tests/test_keras
[testenv:{py39,py310,py311,py312}-pytorch-{gurobi10,gurobi11,gurobi12}]
deps =
{[base]deps}
-r{toxinidir}/requirements.pytorch.txt
commands =
pytest tests/test_pytorch
[testenv:{py39,py310,py311,py312}-sklearn-{gurobi10,gurobi11,gurobi12}]
deps =
{[base]deps}
-r{toxinidir}/requirements.sklearn.txt
commands =
pytest tests/test_sklearn
[testenv:{py39,py310,py311,py312}-xgboost-{gurobi10,gurobi11,gurobi12}]
deps =
{[base]deps}
-r{toxinidir}/requirements.sklearn.txt
-r{toxinidir}/requirements.xgboost.txt
commands =
pytest tests/test_xgboost
[testenv:{py39,py310,py311,py312}-lightgbm-{gurobi10,gurobi11,gurobi12}]
deps =
{[base]deps}
-r{toxinidir}/requirements.lightgbm.txt
-r{toxinidir}/requirements.sklearn.txt
commands =
pytest tests/test_lightgbm
[testenv:{py39,py310,py311,py312}-no_deps]
deps =
pytest
commands =
pytest tests/test_no_deps
[testenv:{py39,py310,py311,py312}-pandas-{gurobi10,gurobi11,gurobi12}]
deps =
{[base]deps}
-r{toxinidir}/requirements.pandas.txt
-r{toxinidir}/requirements.sklearn.txt
commands =
pytest tests/test_pandas
[testenv:{py39,py310,py311,py312}-all_deps-{gurobi10,gurobi11,gurobi12}]
deps =
{[base]deps}
-r{toxinidir}/requirements.keras.txt
-r{toxinidir}/requirements.pytorch.txt
-r{toxinidir}/requirements.sklearn.txt
-r{toxinidir}/requirements.pandas.txt
-r{toxinidir}/requirements.xgboost.txt
-r{toxinidir}/requirements.lightgbm.txt
commands =
pytest tests/test_sklearn \
tests/test_keras \
tests/test_xgboost \
tests/test_pytorch \
tests/test_lightgbm \
tests/test_pandas
[testenv]
setenv =
PIP_EXTRA_INDEX_URL = https://download.pytorch.org/whl/cpu
passenv =
GRB_LICENSE_FILE
allowlist_externals =
echo