-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
79 lines (75 loc) · 2.93 KB
/
Copy pathtox.ini
File metadata and controls
79 lines (75 loc) · 2.93 KB
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
[tox]
minversion = 4.4.3
envlist = py{310,311,312,313,314}{,-notebook}, mpi
isolated_build = True
[testenv]
# Build a wheel once and install it into every environment, rather than the default
# sdist which each environment would compile for itself. Compiling the extension is
# the slowest part of a run, so doing it once matters.
package = wheel
wheel_build_env = .pkg
# The extension modules are compiled against whatever MPI and BLAS the environment
# provides, so the build cannot be isolated from it: pass the variables setup.py
# consults through to the build and to the tests.
passenv =
MPI_HOME
BLAS_LIB_PATH
BLAS_LIBS
NVHPC_HOME
ROCM_HOME
ROCM_PATH
SBD_GPU_VENDOR
SBD_GPU_ARCH
SBD_BUILD_BACKEND
SBD_TEST_DEVICE
SBD_TEST_NPROCS
CC
CXX
OMP_NUM_THREADS
PATH
LD_LIBRARY_PATH
extras =
test
commands =
pytest {posargs}
[testenv:mpi]
# Run the tests marked `mpi` under a launcher, and only those: the rest of the suite
# is single-process, and running it under mpirun would just repeat each test once per
# rank. `--only-mpi` selects them; note that it must be used *without* `--with-mpi`,
# since pytest-mpi checks the two in an if/elif and the latter takes precedence,
# which would quietly run everything.
#
# Two processes is enough to tell a genuinely distributed code path from one that only
# works on a single rank, so that is the default. Override it to use more:
#
# SBD_TEST_NPROCS=8 tox -e mpi
#
# Note that `mpirun` is not installed by tox, so the environment must already provide
# it -- on a cluster that usually means loading a module first.
allowlist_externals =
mpirun
setenv =
SBD_TEST_NPROCS = {env:SBD_TEST_NPROCS:2}
commands =
mpirun -n {env:SBD_TEST_NPROCS} pytest --only-mpi {posargs}
# Spelled out with the hyphen outside the braces. Writing this as
# {,py310-,py311-,...}notebook does not work: tox expands numeric ranges in a section
# name before splitting it on braces, so `py314-` parses as `py3` plus the range `14-`,
# which produces junk environment names and never defines py310-notebook and friends --
# those then silently fall through to [testenv] and run the unit tests instead. Nesting
# braces is not an alternative either; it crashes tox outright.
[testenv:{notebook,py310-notebook,py311-notebook,py312-notebook,py313-notebook,py314-notebook}]
# nbmake runs each notebook with its own directory as the working directory, so the
# relative paths the examples use to reach the vendored data resolve as they would for
# someone running the notebook by hand.
extras =
nbtest
notebook-dependencies
commands =
pytest --nbmake --nbmake-timeout=3000 {posargs} python/examples/
[testenv:slow]
# The reference cases grow by roughly an order of magnitude in determinant count per
# row of the upstream tables, and compute time scales worse than linearly in that, so
# these are opt-in rather than part of the default run.
commands =
pytest --run-slow {posargs}