use new-style tox.ini, add flake8-docstrings, add docstrings
This commit is contained in:
31
tox.ini
31
tox.ini
@@ -4,7 +4,7 @@
|
||||
# and then run "tox" from this directory.
|
||||
|
||||
[tox]
|
||||
envlist = py37,artifacts
|
||||
envlist = py37,lint
|
||||
|
||||
[testenv]
|
||||
# build a wheel and test it
|
||||
@@ -13,6 +13,7 @@ wheel_build_env = build
|
||||
|
||||
deps =
|
||||
flake8
|
||||
flake8-docstrings
|
||||
pytest
|
||||
pytest-cov
|
||||
commands =
|
||||
@@ -26,20 +27,38 @@ whitelist_externals = ln
|
||||
# require setuptools when building
|
||||
deps = setuptools
|
||||
|
||||
[testenv:artifacts]
|
||||
[testenv:py37]
|
||||
# run pytest and coverage
|
||||
deps =
|
||||
skip_install = true
|
||||
coverage
|
||||
pytest
|
||||
pytest-cov
|
||||
commands =
|
||||
pytest --cov={envsitepackagesdir}/incorporealcms/ --cov-report=
|
||||
coverage report -m --fail-under=80
|
||||
ln -sf {distdir} dist
|
||||
|
||||
[testenv:lint]
|
||||
# run style checks
|
||||
skip_install = true
|
||||
deps =
|
||||
flake8
|
||||
flake8-docstrings
|
||||
commands =
|
||||
flake8
|
||||
- flake8 --disable-noqa --select=E,W,F,C,D
|
||||
|
||||
[flake8]
|
||||
max-line-length = 120
|
||||
exclude = .tox/,versioneer.py,_version.py
|
||||
max-complexity = 5
|
||||
exclude =
|
||||
.tox/
|
||||
versioneer.py
|
||||
_version.py
|
||||
instance/
|
||||
max-complexity = 10
|
||||
|
||||
[pytest]
|
||||
python_files = tests.py test_*.py
|
||||
addopts = --cov-report=term --cov-report=term-missing
|
||||
|
||||
[coverage:run]
|
||||
branch = True
|
||||
|
||||
Reference in New Issue
Block a user