-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
43 lines (39 loc) · 1.88 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
[tox]
envlist = py{38,39,310,311,312}
# Define the minimal tox version required to run;
# if the host tox is less than this the tool with create an environment and
# provision it with a tox that satisfies it under provision_tox_env.
# At least this version is needed for PEP 517/518 support.
minversion = 3.3.0
# Activate isolated build environment. tox will use a virtual environment
# to build a source distribution from the source tree. For build tools and
# arguments use the pyproject.toml file as specified in PEP-517 and PEP-518.
isolated_build = true
[testenv]
deps =
-r requirements_dev.txt
setenv =
# Ensure the module under test will be found under `src/` directory, in
# case of any test command below will attempt importing it. In particular,
# it helps `coverage` to recognize test traces from the module under `src/`
# directory and report correct (aligned with repository layout) paths, not
# from the module installed by `tox` in the virtual environment (the traces
# will be referencing `tox` specific paths, not aligned with repository)
PYTHONPATH = src
passenv =
RUNNER_*
GITHUB_*
DOCKER_*
commands =
check-manifest --ignore 'tox.ini,tests/**,docs/**,.pylintrc,.readthedocs.yaml,sonar-project.properties,systemd/**',Dockerfile,requirements_dev.txt
flake8 --tee --output-file=flake8.txt src/energomera_hass_mqtt tests/
pylint --output-format=parseable:pylint.txt,text src/energomera_hass_mqtt tests/
mypy --strict src/energomera_hass_mqtt tests/
# Ensure only traces for in-repository module is processed, not for one
# installed by `tox` (see above for more details)
pytest --cov=src/energomera_hass_mqtt --cov-append -v --cov-report=term-missing -s tests []
[flake8]
exclude = .tox,*.egg,build,data,scripts,docs
select = E,W,F
# Disable line break before operator warning, as it conflicts with W504 one
extend-ignore = W503