-
Notifications
You must be signed in to change notification settings - Fork 5
/
tox.ini
67 lines (62 loc) · 1.77 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
[tox]
envlist =
test
cov
skip_missing_interpreters = True
isolated_build = True
[testenv:test]
setenv =
PYTHONDONTWRITEBYTECODE=1
COVERAGE_FILE=.coverage
FLASK_ENV=test
passenv = *
commands =
; first comand should not append. test are split b/c apscheduler doesn't offically turn off in pytest.
pytest web/tests/ --cov --cov-branch --cov-report=term-missing --disable-warnings
pytest scheduler/tests/test_events.py --cov --cov-append --cov-branch --cov-report=term-missing --disable-warnings
pytest scheduler/tests/test_api.py --cov --cov-append --cov-branch --cov-report=term-missing --disable-warnings
pytest runner/tests/ --cov --cov-append --cov-branch --cov-report=term-missing --disable-warnings
show_missing = True
allowlist_externals = pytest
[testenv:cov]
commands =
coverage report
coverage xml
depends =
cov: test
skip_install = true
allowlist_externals = coverage
[testenv:radon]
commands =
radon cc web runner scheduler -e "runner/temp/*,web/tests/*,runner/tests/*,scheduler/tests/*" -nc --total-average
radon mi web runner scheduler -e "runner/temp/*,web/tests/*,runner/tests/*,scheduler/tests/*"
skip_install = true
allowlist_externals = radon
[testenv:reformat]
description = reformat code
commands =
black .
isort .
djlint . -e html.j2 --reformat --quiet --warn
allowlist_externals =
isort
black
djlint
skip_install = true
skip_gitignore = true
[testenv:lint]
description = check code style
commands =
isort . --check
black . --fast --check
ruff scheduler/ web/ runner/
mypy scheduler web runner --show-traceback --show-error-codes
djlint . -e html.j2 --check --quiet
djlint . -e html.j2 --lint
skip_install = true
allowlist_externals =
black
isort
ruff
mypy
djlint