blob: 9eb73d0efa7df1b2cea871c65649b525ace73c21 (
plain)
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
|
[flake8]
max-line-length = 100
exclude = fietsboek/alembic
extend-ignore = E203
per-file-ignores =
fietsboek/models/__init__.py:F401
[tox]
envlist = python,pylint,pylint-tests,flake,mypy,black,isort
# This can be removed in tox 4 as it will be the default:
isolated_build = true
[testenv]
deps = poetry
skip_install = true
passenv =
TERM
commands_pre =
poetry install -v --with testing
commands =
pytest {posargs}
[testenv:pylint]
commands_pre =
poetry install -v --with linters
commands =
pylint --rcfile=pylint.toml fietsboek
[testenv:pylint-tests]
allowlist_externals = bash
commands_pre =
poetry install -v --with linters,testing
commands =
bash -c "pylint --rcfile=pylint.tests.toml tests/**/*.py"
[testenv:flake]
# This is a bit of a hack since flake8 specifies Python 3.8 as minimum required
# version, while fietsboek only specifices 3.7. Thus, we manually install
# flake8 via pip and bypass poetry's locking-
commands_pre =
poetry install -v
pip install flake8
commands =
flake8 fietsboek
[testenv:sphinx]
allowlist_externals = make
changedir={toxinidir}{/}doc
commands_pre =
poetry install -v --with docs
commands =
sphinx-apidoc -d 1 -f -M -e -o developer/module/ ../fietsboek "upd_*"
make html
[testenv:mypy]
commands_pre =
poetry install --with types
commands =
mypy fietsboek
[testenv:black]
deps = black
commands_pre =
commands =
black --diff --check fietsboek
[testenv:isort]
deps = isort
commands_pre =
commands =
isort --check --diff fietsboek
|