-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
43 lines (37 loc) · 1.18 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
[tox]
envlist = black,flake8,mypy,pytest,coverage
skipsdist = true
; tox_pip_extensions was reported to fix the issue with wrong calculation of pytest coverage
; Run --recreate before running tox every time
;$ tox --recreate && tox
; https://stackoverflow.com/a/46968274/3247880
;tox_pip_extensions_ext_venv_update = true
[testenv]
basepython = python3.10
[testenv:coverage]
; it requires 'setup.py' or 'pyproject.toml' to have package installable.
deps = .
pytest-coverage
; usedevelop - fix problems with 0% coverage https://stackoverflow.com/a/69462954/3247880
usedevelop=True
commands =
pytest --cov git_commits_graph/ -ra --tb=short --cov-report html --cov-fail-under=70 tests/
[testenv:flake8]
deps =
flake8
flake8-bugbear
flake8-docstrings
flake8-bandit
commands =
flake8 ./git_commits_graph --max-line-length=130 --exclude .git,__pycache__,.venv,tmp/cache
; flake8 ./tests --max-line-length=130 --exclude .git,__pycache__,.venv,tmp/cache
[testenv:mypy]
deps =
mypy
data-science-types
commands = mypy --config-file mypy.ini --disallow-untyped-defs git_commits_graph
[testenv:black]
deps = black
commands =
black git_commits_graph
black tests