Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ commands = python -m pip install --upgrade pip
# the tests environment is called by the Github action that runs the unit tests
deps =
-r requirements.txt
.[tests]
extras = tests
setenv = PYTHONPATH = {toxinidir}/src
commands = python -m pytest --basetemp={envtmpdir} {posargs}

[testenv:linting]
# the linting environment is called by the Github Action that runs the linter
deps =
{[testenv:tests]deps}
.[linting]
# add your fixtures like e.g. pytest_datafiles here
extras = linting
allowlist_externals = pylint
setenv = PYTHONPATH = {toxinidir}/src
commands =
pylint mypackage
Expand All @@ -35,7 +35,8 @@ commands =
setenv = PYTHONPATH = {toxinidir}/src
deps =
{[testenv:tests]deps}
.[type_check]
extras = type_check
allowlist_externals = mypy
commands =
mypy --show-error-codes src/mypackage --strict
mypy --show-error-codes unittests --strict
Expand All @@ -46,7 +47,8 @@ commands =
setenv = PYTHONPATH = {toxinidir}/src
deps =
-r requirements.txt
.[spell_check]
extras = spell_check
allowlist_externals = codespell
commands =
codespell --ignore-words=domain-specific-terms.txt src
codespell --ignore-words=domain-specific-terms.txt README.md
Expand All @@ -57,7 +59,8 @@ commands =
changedir = unittests
deps =
{[testenv:tests]deps}
.[coverage]
extras = coverage
allowlist_externals = coverage
setenv = PYTHONPATH = {toxinidir}/src
commands =
coverage run -m pytest --basetemp={envtmpdir} {posargs}
Expand All @@ -78,18 +81,17 @@ deps =
{[testenv:type_check]deps}
{[testenv:coverage]deps}
{[testenv:spell_check]deps}
.[formatting]
.[dev]
pre-commit
extras = formatting, dev
skip_install=true
commands =
python -m pip install --upgrade pip
pip install -r requirements.txt
pre-commit install

[testenv:test_packaging]
skip_install = true
deps =
.[packaging]
extras = packaging
commands =
python -m build
twine check dist/*