forked from mpi4py/mpi4py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
118 lines (109 loc) · 3.41 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
# 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]
minversion = 3.18.0
skip_missing_interpreters=True
envlist =
py36
py37
py38
py39
py310
py311
py312
pypy3.7
pypy3.8
pypy3.9
[mpi]
mpiexec = {env:MPIEXEC:mpiexec}
[testenv]
deps = -r{toxinidir}/conf/requirements-test.txt
allowlist_externals = {[mpi]mpiexec}
commands =
{[mpi]mpiexec} -n 1 {envpython} -m mpi4py --version
{[mpi]mpiexec} -n 5 {envpython} -m mpi4py -m mpi4py.bench helloworld
{[mpi]mpiexec} -n 5 {envpython} -m mpi4py -m mpi4py.bench ringtest
{[mpi]mpiexec} -n 5 {envpython} -m mpi4py -m mpi4py.bench pingpong -q -n 4096
{[mpi]mpiexec} -n 5 {envpython} -m mpi4py -m mpi4py.bench futures -q -n 4096
{[mpi]mpiexec} -n 1 {envpython} {toxinidir}/test/runtests.py --no-builddir -q -e spawn []
{[mpi]mpiexec} -n 5 {envpython} {toxinidir}/test/runtests.py --no-builddir -q -e spawn []
{[mpi]mpiexec} -n 1 {envpython} {toxinidir}/demo/futures/test_futures.py -q []
{[mpi]mpiexec} -n 1 {envpython} -m mpi4py.futures {toxinidir}/demo/futures/test_futures.py -q []
{[mpi]mpiexec} -n 5 {envpython} -m mpi4py.futures {toxinidir}/demo/futures/test_futures.py -q []
{envpython} {toxinidir}/demo/test-run/test_run.py -q []
[testenv:conf]
deps = cython
skip_install = true
allowlist_externals = diff
setenv =
MPICFG=nompi
commands =
{envpython} setup.py build -b build/conf --force
diff -u conf/nompi/config/config.h src/lib-mpi/config/config.h
[testenv:lint]
deps = -r{toxinidir}/conf/requirements-lint.txt
setenv =
MPICFG=nompi-fast
CFLAGS=-O0
commands =
pycodestyle {toxinidir}/src/mpi4py
pydocstyle {toxinidir}/src/mpi4py
flake8 {toxinidir}/src/mpi4py
flake8 --select=A {toxinidir}/test
pylint mpi4py
[testenv:type]
deps = -r{toxinidir}/conf/requirements-type.txt
setenv =
MPICFG=nompi-fast
CFLAGS=-O0
commands =
stubtest mpi4py
mypy --python-version 3.8 -p mpi4py
mypy --python-version 3.9 -p mpi4py
mypy --python-version 3.10 -p mpi4py
mypy --python-version 3.11 -p mpi4py
[cmd]
rst2html5 = rst2html5.py --config=conf/docutils.conf
[testenv:docs]
deps =
sphinx
allowlist_externals =
rm
mv
setenv =
MPICFG=nompi-fast
CFLAGS=-O0
TOPDIR=
DOCDIR=docs/
SRCDIR=docs/source/
BLDDIR=build/
OUTDIR=docs/
LATEXMKOPTS=-quiet
commands_pre =
rm -rf {env:OUTDIR}html
commands =
{[cmd]rst2html5} {env:DOCDIR}index.rst {env:OUTDIR}index.html
sphinx-build -M html {env:SRCDIR} {env:BLDDIR} -q -W -j auto
sphinx-build -M man {env:SRCDIR} {env:BLDDIR} -q -W -j auto
sphinx-build -M info {env:SRCDIR} {env:BLDDIR} -q -W -j auto
sphinx-build -M latexpdf {env:SRCDIR} {env:BLDDIR} -q -W -j auto
rm {env:BLDDIR}html/.buildinfo
mv {env:BLDDIR}html {env:OUTDIR}
mv {env:BLDDIR}man/mpi4py.3 {env:OUTDIR}
mv {env:BLDDIR}texinfo/mpi4py.info {env:OUTDIR}
mv {env:BLDDIR}latex/mpi4py.pdf {env:OUTDIR}
[testenv:sdist]
deps =
skip_install = true
depends = docs
allowlist_externals = test
commands_pre =
test -f docs/index.html
test -d docs/html
test -f docs/mpi4py.3
test -f docs/mpi4py.info
test -f docs/mpi4py.pdf
commands =
{envpython} setup.py -q sdist