-
Notifications
You must be signed in to change notification settings - Fork 251
/
tox.ini
87 lines (76 loc) · 2.05 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
[tox]
envlist = py38,coverage,lint,check-formatting,manifest
minversion = 3.18.0
requires = tox-conda
isolated_build = true
skip_missing_interpreters = true
[testenv]
description = run test suite under {basepython}
conda_env = environment.yml
conda_channels = conda-forge
conda_deps = tox[toml]
commands =
conda list
coverage run -m pytest -x
coverage combine
[testenv:coverage]
description = [run locally after tests]: combine coverage data and create report;
generates a diff coverage against origin/main (can be changed by setting DIFF_AGAINST env var)
skip_install = true
parallel_show_output = true
commands =
coverage report -m -i
coverage xml
coverage html
depends =
py38
; This env just runs `black` and fails tox if it's not formatted correctly.
; If this env fails on CI, run `tox -e format` locally in order to apply changes.
[testenv:check-formatting]
basepython = python3.8
deps = black==22.10.0
skip_install = true
commands =
black montreal_forced_aligner tests --diff --check --config {toxinidir}/pyproject.toml
[testenv:pkg_meta]
description = check that the long description is valid
basepython = python3.8
skip_install = true
deps =
build>=0.0.4
twine>=3
commands =
python -m build -o {envtmpdir} -s -w .
twine check {envtmpdir}/*
[flake8]
max-line-length = 99
ignore = E203
E501
W503
[testenv:docs]
basepython = python3.9
conda_env = rtd_environment.yml
commands =
interrogate -v --config {toxinidir}/pyproject.toml
sphinx-build -v -E -a -n -T -b html docs/source docs/build
[testenv:manifest]
basepython = python3.8
deps = check-manifest
skip_install = true
commands = check-manifest
[testenv:format]
basepython = python3.8
deps = black==22.10.0
skip_install = true
commands =
black montreal_forced_aligner tests --config {toxinidir}/pyproject.toml
[gh-actions]
python =
3.8: py38,coverage
[testenv:dev]
description = dev environment with all deps at {envdir}
usedevelop = true
commands =
conda list
python -m pip list --format=columns
python -c "print(r'{envpython}')"