-
Notifications
You must be signed in to change notification settings - Fork 52
/
tox.ini
145 lines (129 loc) · 2.77 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
[tox]
envlist = isort, black, flake8, safety, docs, py3{8,9,10,11}, py3{8,9,10,11}-symengine
[gh-actions]
python =
3.8: safety, py38, py38-symengine
3.9: safety, py39, py39-symengine
3.10: safety, py310, py310-symengine
3.11: safety, py311, py311-symengine
;[testenv]
;deps =
; pytest
; pytest-cov
; pytest-raises
;commands =
; pytest --cov=optlang --cov-report=term {posargs}
[testenv]
deps =
colorama ~= 0.3.9
coverage
docutils
jsonschema
pytest
pytest-cov
scipy
numpy >=1.13,<1.24
osqp >=0.6.2
mip >=1.9.1
highspy >=1.5.3
cplex
gurobipy
symengine: symengine
passenv = CI
commands =
pytest --cov=optlang --cov-report=xml
[testenv:isort]
skip_install = True
deps=
isort
commands=
isort --check-only --diff {toxinidir}/src/optlang {toxinidir}/tests {toxinidir}/setup.py
[testenv:black]
skip_install = True
deps=
black
commands=
black --check --diff {toxinidir}/src/optlang {toxinidir}/tests {toxinidir}/setup.py
[testenv:flake8]
skip_install = True
deps=
flake8
flake8-docstrings
flake8-bugbear
commands=
flake8 {toxinidir}/src/optlang {toxinidir}/tests {toxinidir}/setup.py
[testenv:safety]
deps=
pip>=21.1
safety
commands=
safety check --full-report -i 70612
[testenv:mypy]
skip_install = True
deps=
mypy
commands=
mypy {toxinidir}/src/optlang
[testenv:docs]
skip_install = True
deps=
-r{toxinidir}/docs/requirements.txt
whitelist_externals =
make
commands=
make -C {toxinidir}/docs html
make -C {toxinidir}/docs linkcheck
################################################################################
# Testing tools configuration #
################################################################################
[pytest]
testpaths =
src/optlang/tests
;[coverage:paths]
;source =
; src/optlang
; */site-packages/optlang
[coverage:run]
branch = true
parallel = true
omit =
src/optlang/_version.py
src/optlang/tests/*
[coverage:report]
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
precision = 2
omit =
src/optlang/_version.py
src/optlang/tests/*
[flake8]
max-line-length = 130
exclude =
__init__.py
_version.py
gurobi_interface.py
cplex_interface.py
src/optlang/tests/*
# The following conflict with `black` which is the more pedantic.
ignore =
E203
W503
D202
max-complexity = 20
[isort]
skip =
__init__.py
_version.py
line_length = 130
indent = 4
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
lines_after_imports = 2
known_first_party = optlang
known_third_party =
pytest
setuptools
versioneer