-
Notifications
You must be signed in to change notification settings - Fork 49
/
tox.ini
91 lines (81 loc) · 2.63 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
# 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.
[tox]
envlist = py37, py38, py39, clean, report
[gh-actions]
python =
3.7: clean, py37
3.8: py38, report
3.9: py39
[coverage:run]
parallel = true
[coverage:paths]
sources =
.tox/py37/lib/python3.7/site-packages/
.tox/py38/lib/python3.8/site-packages/
.tox/py39/lib/python3.9/site-packages/
[testenv]
passenv =
GITHUB_*
setenv=
py{37,38,39}: COVERAGE_FILE=.coverage.{envname}
depends =
{py37,py38,py39}: clean
report: py37,py38,py39
[mpi]
mpiexec = {env:MPIEXEC:mpiexec}
[testenv:py{37,38,39}]
skip_install = true
whitelist_externals =
/bin/rm
{[mpi]mpiexec}
commands =
/bin/rm -rf build
# {envpython} setup.py bdist_wheel
# {envpython} -m pip install --upgrade --find-links={toxinidir}/dist simsopt[MPI]
{envpython} -m pip install --upgrade .[MPI,SPEC]
# pytest --cov=simsopt --cov-append --cov-report term-missing --cov-report=xml tests
# pytest --cov=simsopt --cov-append --cov-report term-missing tests
# pytest --cov=simsopt --cov-append --cov-report=term-missing --no-cov-on-fail tests
coverage run --source=simsopt --rcfile=tox.ini -m pytest tests
{[mpi]mpiexec} -n 1 coverage run --source=simsopt --rcfile=tox.ini -m unittest discover -k "mpi" -s tests/
{[mpi]mpiexec} -n 2 coverage run --source=simsopt --rcfile=tox.ini -m unittest discover -k "mpi" -s tests
{[mpi]mpiexec} -n 3 coverage run --source=simsopt --rcfile=tox.ini -m unittest discover -k "mpi" -s tests
# {[mpi]mpiexec} -n 1 pytest --cov=simsopt --cov-append --cov-report=term-missing --no-cov-on-fail -k "mpi" tests
# {[mpi]mpiexec} -n 2 pytest --cov=simsopt --cov-append --cov-report=term-missing --no-cov-on-fail -k "mpi" tests
# {[mpi]mpiexec} -n 3 pytest --cov=simsopt --cov-append --cov-report=term-missing --no-cov-on-fail -k "mpi" tests
wheel =
clean: false
report: false
py37: false
py38: false
py39: false
wheel_pep517 = true
deps =
# pytest
# pytest-cov
numpy
wheel
scipy
coverage
pyoculus
py_spec
# Above, numpy and scipy are installed manually here because tox does not seem to recognize these dependencies of pyoculus otherwise
mpi4py
cmake
ninja
sympy
pyevtk
[testenv:report]
deps = coverage
skip_install = true
commands =
coverage combine --keep
coverage report
coverage xml
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase