-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtox.ini
92 lines (82 loc) · 2.61 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
[tox]
envlist = pep8,py3
skipsdist = True
# NOTE: Avoid build/test env pollution by not enabling sitepackages.
sitepackages = False
# NOTE: Avoid false positives by not skipping missing interpreters.
skip_missing_interpreters = False
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310, mypy, pep8
[testenv]
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
CHARM_DIR={envdir}
allowlist_externals =
/bin/rm
/usr/bin/git
install_command =
pip install --use-pep517 {opts} {packages}
[testenv:py3]
basepython = python3
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = pytest --cov=./charmhub_lp_tools/ {posargs} charmhub_lp_tools/tests/
[testenv:pep8]
basepython = python3
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
flake8 charmhub_lp_tools {posargs}
pydocstyle charmhub_lp_tools
[testenv:mypy]
basepython = python3
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = mypy charmhub_lp_tools {posargs}
[testenv:docs]
description =
Build main documentation.
# Note that we don't use {[testenv]deps} for deps here because we don't want
# to install (test-)requirements.txt for docs.
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
/bin/rm -rf doc/build/html doc/build/doctrees
sphinx-build --keep-going -b html -j auto doc/source doc/build/html
[testenv:venv]
basepython = python3
usedevelop = True
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = {posargs}
[testenv:check-lp-builder-config]
basepython = python3
deps =
-r{toxinidir}/requirements.txt
setenv =
PIP_USE_PEP517=1
commands =
python3 -m pip install ./
/bin/rm -rf {temp_dir}/charmed-openstack-info
/usr/bin/git clone https://github.com/openstack-charmers/charmed-openstack-info.git {temp_dir}/charmed-openstack-info
charmhub-lp-tool --log DEBUG --anonymous --config-dir {temp_dir}/charmed-openstack-info/charmed_openstack_info/data/lp-builder-config validate-config
[flake8]
ignore = E402,E226,W504
exclude = */charmhelpers
[pydocstyle]
# D105 Missing docstring in magic method (reason: magic methods already have definitions)
# D107 Missing docstring in __init__ (reason: documented in class docstring)
# D203 1 blank line required before class docstring (reason: pep257 default)
# D213 Multi-line docstring summary should start at the second line (reason: pep257 default)
# D215 Section underline is over-indented (reason: pep257 default)
ignore = D105, D107, D203, D213, D215, D401