Skip to content

Commit

Permalink
Use constraints file form
Browse files Browse the repository at this point in the history
  • Loading branch information
oerc0122 committed Dec 18, 2024
1 parent 10c2639 commit a27ce05
Showing 1 changed file with 20 additions and 40 deletions.
60 changes: 20 additions & 40 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,33 @@ extras =
matplotlib
phonopy-reader
brille
commands = {[testenv]test_command} --cov
commands = {[testenv]test_command} --cov -m {[testenv]pytest_additional}

# Test with no extras
[testenv:py310-base]
extras = {[testenv]extras}
commands = {[testenv]test_command} --cov -m "not (phonopy_reader or matplotlib or brille)"
pytest_additional = "not (phonopy_reader or matplotlib or brille)"

# Test with matplotlib extra only
[testenv:py310-matplotlib]
extras =
{[testenv]extras}
matplotlib
commands = {[testenv]test_command} --cov -m "matplotlib and not multiple_extras"
pytest_additional = "matplotlib and not multiple_extras"

# Test with phonopy-reader extra only
[testenv:py310-phonopy-reader]
extras =
{[testenv]extras}
phonopy-reader
commands = {[testenv]test_command} --cov -m "phonopy_reader and not multiple_extras"
pytest_additional = "phonopy_reader and not multiple_extras"

# Test with brille extra only
[testenv:py310-brille]
extras =
{[testenv]extras}
brille
commands = {[testenv]test_command} --cov -m "brille and not multiple_extras"
pytest_additional = "brille and not multiple_extras"

# Run remaining tests that require multiple extras
[testenv:py310-all]
Expand All @@ -71,42 +71,22 @@ extras =
matplotlib
phonopy-reader
brille
commands = {[testenv]test_command} -m 'not c_extension'
pytest_additional = "not c_extension"

[testenv:py310-minrequirements-linux]
skip_install = True
allowlist_externals = rm
install_command =
python -m pip install --force-reinstall {opts} {packages}
platform = linux
deps =
numpy==1.24.0
-r{toxinidir}/tests_and_analysis/tox_requirements.txt
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}
extras =
-c {toxinidir}/tests_and_analysis/minimum_euphonic_requirements.txt
{[testenv]extras}
matplotlib
phonopy-reader
brille
pytest_additional = "multiple_extras"

[testenv:py310-minrequirements-mac]
skip_install = True
allowlist_externals = rm
install_command =
python -m pip install --force-reinstall {opts} {packages}
platform = darwin
deps =
numpy==1.24.0
-r{toxinidir}/tests_and_analysis/tox_requirements.txt
commands_pre =
python -m pip install --force-reinstall \
-r{toxinidir}/tests_and_analysis/minimum_euphonic_requirements_mac.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}
extras =
-c {toxinidir}/tests_and_analysis/minimum_euphonic_requirements_mac.txt
{[testenv]extras}
matplotlib
phonopy-reader
brille
pytest_additional = "multiple_extras"

0 comments on commit a27ce05

Please sign in to comment.