forked from terrapower/armi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
85 lines (75 loc) · 1.95 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
[tox]
envlist = py38,lint,cov
requires =
pip >= 20.2
[testenv]
basepython = {env:PYTHON3_PATH:python3}
setenv =
PYTHONPATH = {toxinidir}
USERNAME = armi
[testenv:test]
commands =
pip install -e .[memprof,mpi,test]
pytest -n 4 armi
[testenv:doc]
allowlist_externals =
/usr/bin/git
/usr/bin/make
changedir = doc
commands =
pip install -e ..[memprof,mpi,test,docs]
git submodule init
git submodule update
make html
# First, run code coverage over the unit tests that run MPI library code.
[testenv:cov1]
deps=
mpi4py
allowlist_externals =
/usr/bin/mpiexec
commands =
pip install -e .[memprof,mpi,test]
mpiexec -n 2 --use-hwthread-cpus coverage run --rcfile=.coveragerc -m pytest --cov=armi --cov-config=.coveragerc --cov-report=lcov --ignore=venv --cov-fail-under=80 armi/tests/test_mpiFeatures.py
# Second, run code coverage over the rest of the unit tests, and combine the coverage results together
[testenv:cov2]
deps=
mpi4py
allowlist_externals =
/usr/bin/mpiexec
commands =
pip install -e .[memprof,mpi,test]
coverage run --rcfile=.coveragerc -m pytest -n 4 --cov=armi --cov-config=.coveragerc --cov-report=lcov --cov-append --ignore=venv armi
coverage combine --rcfile=.coveragerc --keep -a
# NOTE: This only runs the MPI unit tests.
# NOTE: This will only work in POSIX/BASH Linux.
[testenv:mpitest]
deps=
mpi4py
allowlist_externals =
/usr/bin/mpiexec
commands =
pip install -e .[memprof,mpi,test]
mpiexec -n 2 --use-hwthread-cpus pytest armi/tests/test_mpiFeatures.py
[testenv:lint]
deps=
ruff==0.0.272
commands =
ruff .
[testenv:report]
skip_install = true
deps=
mpi4py
commands =
coverage report
coverage html
[testenv:manifest]
basepython = {env:PYTHON3_PATH:python3}
setenv =
PYTHONPATH = {toxinidir}
USERNAME = armi
commands =
python .github/workflows/validatemanifest.py
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase