-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
52 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
tox==3.28.0 | ||
tox>=4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,105 +1,91 @@ | ||
[tox] | ||
requires = tox>=4 | ||
# The python environments to run the tests in | ||
envlist = py310,py311,py312,py310-{base,matplotlib,phonopy_reader,brille,all},py310-minrequirements-linux | ||
envlist = py310,py311,py312,py310-{base,matplotlib,phonopy_reader,brille,all,minrequirements-linux,no-c} | ||
# Skip the execution of setup.py as we do it with the correct arg in commands_pre below | ||
skipsdist = True | ||
whitelist_externals = git | ||
allowlist_externals = git | ||
|
||
[testenv] | ||
package = wheel | ||
changedir = tests_and_analysis/test | ||
test_command = python run_tests.py --report | ||
passenv = CC CC_LD LDFLAGS CPPFLAGS | ||
|
||
[testenv:{py310,py311,py312}] | ||
passenv = CC, CC_LD, LDFLAGS, CPPFLAGS | ||
install_command = | ||
python -m pip install \ | ||
python -m pip install -v \ | ||
--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 | ||
extras = | ||
test | ||
phonopy_reader | ||
|
||
[testenv:{py310,py311,py312}] | ||
extras = | ||
{[testenv]extras} | ||
matplotlib | ||
phonopy_reader | ||
brille | ||
commands = {[testenv]test_command} --cov | ||
|
||
# Test with no extras | ||
[testenv:py310-base] | ||
install_command = {[testenv:py310]install_command} | ||
deps = {[testenv:py310]deps} | ||
commands_pre = | ||
python -m pip install \ | ||
--upgrade \ | ||
--upgrade-strategy eager \ | ||
'{toxinidir}' | ||
extras = {[testenv]extras} | ||
commands = {[testenv]test_command} --cov -m "not (phonopy_reader or matplotlib or brille)" | ||
|
||
# Test with matplotlib extra only | ||
[testenv:py310-matplotlib] | ||
install_command = {[testenv:py310]install_command} | ||
deps = {[testenv:py310]deps} | ||
commands_pre = | ||
python -m pip install \ | ||
--upgrade \ | ||
--upgrade-strategy eager \ | ||
'{toxinidir}[matplotlib]' | ||
extras = | ||
{[testenv]extras} | ||
matplotlib | ||
commands = {[testenv]test_command} --cov -m "matplotlib and not multiple_extras" | ||
|
||
# Test with phonopy_reader extra only | ||
[testenv:py310-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]' | ||
extras = | ||
{[testenv]extras} | ||
phonopy_reader | ||
commands = {[testenv]test_command} --cov -m "phonopy_reader and not multiple_extras" | ||
|
||
# Test with brille extra only | ||
[testenv:py310-brille] | ||
install_command = {[testenv:py310]install_command} | ||
deps = {[testenv:py310]deps} | ||
commands_pre = | ||
python -m pip install \ | ||
--upgrade \ | ||
--upgrade-strategy eager \ | ||
'{toxinidir}[brille]' | ||
extras = | ||
{[testenv]extras} | ||
brille | ||
commands = {[testenv]test_command} --cov -m "brille and not multiple_extras" | ||
|
||
# Run remaining tests that require multiple extras | ||
[testenv:py310-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]' | ||
extras = | ||
{[testenv]extras} | ||
matplotlib | ||
phonopy_reader | ||
brille | ||
commands = | ||
{[testenv]test_command} --cov -m multiple_extras | ||
|
||
[testenv:py310-minrequirements-linux] | ||
whitelist_externals = rm | ||
install_command = | ||
python -m pip install --force-reinstall {opts} {packages} | ||
package = sdist | ||
allowlist_externals = rm | ||
platform = | ||
linux: linux | ||
deps = | ||
numpy==1.24.0 | ||
{[testenv:py310]deps} | ||
-r{toxinidir}/tests_and_analysis/minimum_euphonic_requirements.txt | ||
extras = {[testenv]extras} | ||
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} | ||
|
||
[testenv:py310-no-c] | ||
install_command = {[testenv]install_command} -Csetup-args="-Dpython_only=true" | ||
platform = | ||
linux: linux | ||
extras = | ||
{[testenv]extras} | ||
matplotlib | ||
phonopy_reader | ||
brille | ||
commands = {[testenv]test_command} -m 'not c_extension' |