-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
53 lines (47 loc) · 1.36 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
[tox]
isolated_build = false
env_list = lint, type, test
toxworkdir = /var/tmp/quantuminspire/.tox
[testenv]
skip_install = true
allowlist_externals = poetry
parallel_show_output = true
ignore_errors = true
commands_pre =
poetry install
[testenv:lint]
description = run linters
commands =
poetry run black --check .
poetry run docformatter --check --black --recursive --wrap-summaries=119 --wrap-descriptions=119 .
poetry run ruff check .
[testenv:fix]
description = run fixing linters
commands =
poetry run black .
poetry run docformatter -i --black --recursive --wrap-summaries=119 --wrap-descriptions=119 .
poetry run ruff check . --fix
poetry lock --no-update
[testenv:type]
description = run type checks
commands =
poetry run mypy .
[testenv:test]
description = run unit tests
commands =
poetry run pytest
[testenv:{docs,doctests,linkcheck}]
description =
docs: Invoke sphinx-build to build the docs
doctests: Invoke sphinx-build to run doctests
linkcheck: Check for broken links in the documentation
passenv =
SETUPTOOLS_*
setenv =
DOCSDIR = {toxinidir}/docs
BUILDDIR = {toxinidir}/docs/_build
docs: BUILD = html
doctests: BUILD = doctest
linkcheck: BUILD = linkcheck
commands =
sphinx-build --color -b {env:BUILD} -d "{env:BUILDDIR}/doctrees" "{env:DOCSDIR}" "{env:BUILDDIR}/{env:BUILD}" {posargs}