-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
69 lines (60 loc) · 1.79 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
[tox]
envlist = flake8, mypy, py311
skipsdist = True
[gh-actions]
python =
3.11: py311, flake8, mypy
[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements_dev.txt
commands = pytest -v --cov --cov-report=xml --cov-config=tox.ini --cov-branch
[coverage:run]
omit =
*/test/*
*/tests/*
src/test/*
src/tests/*
# omit anything in a .local directory anywhere
#*/.local/*
# omit everything in /usr
#/usr/*
# omit this single file
#utils/tirefire.py
[coverage:xml]
output=.reports/coverage.xml
[testenv:flake8]
basepython = python3.11
deps =
flake8
flake8-docstrings
# commands = flake8 --output-file .reports/flake8.txt src
commands = flake8 --exit-zero --output-file .reports/flake8.txt src
# --exit-zero -> to not stop the building process when an error is found, however sonarcloud will be responsible to stop it.
[flake8]
docstring-convention = google
format=pylint
# segun leí, si no tiene este formato, el sonarcloud no lo coge
#output-file='flake8.output.txt'
# mypy no tiene exit-zero y tampoco reportea para sonarcloud
[testenv:mypy]
basepython = python3.11
deps =
-r{toxinidir}/requirements_dev.txt
commands = mypy src
# commands = mypy --json-report .reports/mypy.json src
# commands = mypy --any-exprs-report .reports src
# commands = mypy --any-exprs-report .reports --cobertura-xml-report .reports --html-report .reports --linecount-report .reports --linecoverage-report .reports --lineprecision-report .reports --txt-report .reports --xml-report .reports src
# --any-exprs-report
# --cobertura-xml-report
# --html-report
# --linecount-report
# --linecoverage-report
# --lineprecision-report
# --txt-report
# --xml-report
# [mypy]
# exclude = ['tests', 'src/tests']
# any-exprs-report=".reports/"
# linecount-report=".reports/"