forked from Hochfrequenz/kohlrahbi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
77 lines (70 loc) · 2.16 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
[tox]
envlist =
tests
linting
coverage
type_check
skip_missing_interpreters = True
; isolated_build = True
; skipsdist = True
[testenv]
commands = python -m pip install --upgrade pip
[testenv:tests]
# the tests environment is called by the Github action that runs the unit tests
setenv = PYTHONPATH = {toxinidir}/src
deps =
-rrequirements.txt
-r dev_requirements/requirements-tests.txt
commands = pytest --basetemp={envtmpdir} {posargs}
[testenv:linting]
# the linting environment is called by the Github Action that runs the linter
deps =
-rrequirements.txt
-r dev_requirements/requirements-linting.txt
setenv = PYTHONPATH = {toxinidir}/src
# add your fixtures like e.g. pytest_datafiles here
commands =
pylint kohlrahbi
[testenv:type_check]
# the type_check environment checks the type hints using mypy
setenv = PYTHONPATH = {toxinidir}/src
deps =
-rrequirements.txt
-r dev_requirements/requirements-type_check.txt
commands =
mypy --show-error-codes src/kohlrahbi
mypy --show-error-codes unittests
# mypy --show-error-codes unittests # does not work yet, sadly; Some tox/packaging problems
# add single files (ending with .py) or packages here
[testenv:coverage]
# the coverage environment is called by the Github Action that runs the coverage measurement
deps =
{[testenv:tests]deps}
-r dev_requirements/requirements-coverage.txt
coverage
setenv = PYTHONPATH = {toxinidir}/src
commands =
coverage run -m pytest --basetemp={envtmpdir} {posargs}
coverage html --omit .tox/*,unittests/*
coverage report --fail-under 60 --omit .tox/*,unittests/*
[testenv:dev]
# the dev environment contains everything you need to start developing on your local machine.
deps =
{[testenv:tests]deps}
{[testenv:linting]deps}
{[testenv:coverage]deps}
-r dev_requirements/requirements-formatting.txt
pip-tools
pre-commit
commands =
python -m pip install --upgrade pip
pip-compile requirements.in
pip install -r requirements.txt
pre-commit install
[testenv:test_packaging]
skip_install = true
deps =
-r dev_requirements/requirements-test_packaging.txt
commands =
python -m build
twine check dist/*