forked from beancount/fava
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
103 lines (93 loc) · 1.8 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
[tox]
envlist = lint,py,old_deps
isolated_build = True
[testenv]
pass_env =
SNAPSHOT_UPDATE
POEDITOR_TOKEN
# ensure that package deps match the explicit tox env deps:
constrain_package_deps = true
# use a constraints file for tox env and package deps:
set_env =
PIP_CONSTRAINT=constraints.txt
extras = excel
deps =
pytest
pytest-cov
commands =
pytest --cov=fava --cov-report=html --cov-fail-under=90 {posargs:tests}
[testenv:old_deps]
setenv =
SNAPSHOT_IGNORE=true
PIP_CONSTRAINT=constraints-old.txt
deps =
pytest
commands =
pytest {posargs:tests}
[coverage:run]
branch = True
source = fava
omit =
*/fava/beans/types.py
*/fava/ext/auto_commit.py
[coverage:paths]
source = src
paths =
src/fava
.tox/*/fava
[testenv:docs]
deps =
sphinx
commands =
python docs/generate.py
sphinx-build -b html docs build/docs
[testenv:lint]
deps =
flake8
flake8-pyi
mypy
pylint
pytest
types-babel
types-pkg_resources
types-simplejson
commands =
flake8 stubs
mypy src/fava tests
pylint src/fava tests
[flake8]
exclude = node_modules
ignore =
# whitespace before ':' (black)
E203
# disabled for stubs
E302
# disabled for stubs
E305
# disabled for stubs
E701
# disabled for stubs
E704
# line break before binary operator (black)
W503
[testenv:build-dist]
skip_install = True
deps =
Babel
build
twine
commands =
pybabel compile -d src/fava/translations
python -m build
twine check dist/*
[testenv:pyinstaller]
deps =
pyinstaller
pytest
allowlist_externals = {toxinidir}/dist/fava
commands =
pyinstaller --clean --noconfirm contrib/pyinstaller_spec.spec
{toxinidir}/dist/fava --version
[pytest]
filterwarnings =
ignore:.*locked_cached_property.*deprecated:DeprecationWarning