-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtox.ini
103 lines (95 loc) · 3.17 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
[tox]
requires = tox-conda
# The python environments to run the tests in
envlist = py38,py39,py310,py311,py38-{base,matplotlib,phonopy_reader,brille,all},py38-minrequirements-linux
# Skip the execution of setup.py as we do it with the correct arg in commands_pre below
skipsdist = True
[testenv]
changedir = tests_and_analysis/test
test_command = python run_tests.py --report
[testenv:{py38,py39,py310,py311}]
install_command =
python -m pip install \
--force-reinstall \
--upgrade \
--upgrade-strategy eager \
{opts} \
{packages}
deps =
numpy
-r{toxinidir}/tests_and_analysis/tox_requirements.txt
commands_pre =
python -m pip install \
--upgrade \
--upgrade-strategy eager \
'{toxinidir}[matplotlib,phonopy_reader,brille]'
commands =
{[testenv]test_command} --cov
# Test with no extras
[testenv:py38-base]
install_command = {[testenv:py310]install_command}
deps = {[testenv:py310]deps}
commands_pre =
python -m pip install \
--upgrade \
--upgrade-strategy eager \
'{toxinidir}'
commands = {[testenv]test_command} --cov -m "not (phonopy_reader or matplotlib or brille)"
# Test with matplotlib extra only
[testenv:py38-matplotlib]
install_command = {[testenv:py310]install_command}
deps = {[testenv:py310]deps}
commands_pre =
python -m pip install \
--upgrade \
--upgrade-strategy eager \
'{toxinidir}[matplotlib]'
commands = {[testenv]test_command} --cov -m "matplotlib and not multiple_extras"
# Test with phonopy_reader extra only
[testenv:py38-phonopy_reader]
install_command = {[testenv:py310]install_command}
deps = {[testenv:py310]deps}
commands_pre =
python -m pip install \
--upgrade \
--upgrade-strategy eager \
'{toxinidir}[phonopy_reader]'
commands = {[testenv]test_command} --cov -m "phonopy_reader and not multiple_extras"
# Test with brille extra only
[testenv:py38-brille]
install_command = {[testenv:py310]install_command}
deps = {[testenv:py310]deps}
commands_pre =
python -m pip install \
--upgrade \
--upgrade-strategy eager \
'{toxinidir}[brille]'
commands = {[testenv]test_command} --cov -m "brille and not multiple_extras"
# Run remaining tests that require multiple extras
[testenv:py38-all]
install_command = {[testenv:py310]install_command}
deps = {[testenv:py310]deps}
commands_pre =
python -m pip install \
--upgrade \
--upgrade-strategy eager \
'{toxinidir}[phonopy_reader,matplotlib,brille]'
commands =
{[testenv]test_command} --cov -m multiple_extras
[testenv:py38-minrequirements-linux]
whitelist_externals = rm
install_command =
python -m pip install --force-reinstall {opts} {packages}
platform =
linux: linux
deps =
numpy==1.19.5
commands_pre =
python -m pip install --force-reinstall \
-r{toxinidir}/tests_and_analysis/minimum_euphonic_requirements.txt
python -m pip install --force-reinstall \
-r{toxinidir}/tests_and_analysis/tox_requirements.txt
# Force rebuild of euphonic extension to avoid Numpy clash
rm -rf {toxinidir}/build
python -m pip install '{toxinidir}[matplotlib,phonopy_reader,brille]'
commands = {[testenv]test_command}