forked from outpost-os/python-svd2json
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
54 lines (46 loc) · 1.42 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
# SPDX-FileCopyrightText: 2023 - 2024 Ledger SAS
# SPDX-License-Identifier: Apache-2.0
[tox]
min_version = 4.0
env_list =
lint
unittests
docs
isolated_build = true
[tox:.package]
basepython = python3
[testenv]
extras = devel
[testenv:unittests]
commands =
pytest --cov=svd2json --tb=long -v {posargs}
coverage report -m
coverage xml
[testenv:lint]
commands =
black --line-length 100 --check --diff .
mypy -p svd2json
flake8 --docstring-convention=numpy
[testenv:docs]
extras = doc
commands =
sphinx-build -b singlehtml doc/ .doc/_html
sphinx-build -b simplepdf doc/ .doc/_pdf
[flake8]
select = C, D, E, F, W, B, B9, DOC
# XXX:
# Some flake8 rules conflicts with Black and/or aren't PEP8 compliant, in case of conflit we
# choose the Black way of doing.
# - E203: is not PEP8 compliant and conflit with blake, must be disabled
# - E704: complain about collapse impl. for ellided func/method/class which is allowed by PEP8
# Black will ensure that this is the only case in which one should write a oneliner.
#
# As doc lint is a new feature, this is widely incomplete.
# We should ignore D1xx (missing docstring) temporarilly.
# Once everything is documented, re-enable this error.
ignore = D1, E203, E704
max-line-length = 100
exclude = .git, .github, __pycache__, build, dist, .eggs, .tox, venv, venv*, .venv, .venv*, reports, .mypy_cache, doc
# pydoclint (flake8) plugin opt --style
style = numpy
statistics = True