tox.ini updates, use requirements-dev.txt, fix pathing
This commit is contained in:
parent
08896a18c1
commit
0af0f4e8aa
40
tox.ini
40
tox.ini
@ -14,12 +14,13 @@ wheel_build_env = build
|
||||
# whitelist commands we need
|
||||
whitelist_externals = ln
|
||||
|
||||
# for environment sanity, things that are in written code being security
|
||||
# checked, linted, etc., but are not part of the installed package, should
|
||||
# go here, so that all envs may benefit from them
|
||||
[base]
|
||||
# install everything via requirements-dev.txt, so that developer environment
|
||||
# is the same as the tox environment (for ease of use/no weird gotchas in
|
||||
# local dev results vs. tox results) and also to avoid ticky-tacky maintenance
|
||||
# of "oh this particular env has weird results unless I install foo" --- just
|
||||
# shotgun blast install everything everywhere
|
||||
deps =
|
||||
pytest
|
||||
-rrequirements/requirements-dev.txt
|
||||
|
||||
[testenv:build]
|
||||
# require setuptools when building
|
||||
@ -27,38 +28,20 @@ deps = setuptools
|
||||
|
||||
[testenv:py37]
|
||||
# run pytest with coverage
|
||||
deps =
|
||||
pytest-cov
|
||||
{[base]deps}
|
||||
commands =
|
||||
pytest --cov={envsitepackagesdir}/incorporealcms/ \
|
||||
--cov-report=term-missing --cov-branch --cov-fail-under=90
|
||||
--cov-report=term-missing --cov-branch --cov-fail-under=95
|
||||
ln -sf {distdir} .
|
||||
|
||||
[testenv:security]
|
||||
# run security checks
|
||||
#
|
||||
# again it seems the most valuable here to run against the packaged code
|
||||
deps =
|
||||
bandit
|
||||
{[base]deps}
|
||||
commands =
|
||||
bandit {envsitepackagesdir}/incorporealcms/ -r
|
||||
|
||||
[testenv:lint]
|
||||
# run style checks
|
||||
skip_install = true
|
||||
deps =
|
||||
dlint
|
||||
flake8
|
||||
flake8-blind-except
|
||||
flake8-builtins
|
||||
flake8-docstrings
|
||||
flake8-executable
|
||||
flake8-fixme
|
||||
flake8-isort
|
||||
flake8-logging-format
|
||||
{[base]deps}
|
||||
commands =
|
||||
flake8
|
||||
- flake8 --disable-noqa --ignore= --select=E,W,F,C,D,A,G,B,I,T,DUO
|
||||
@ -70,6 +53,13 @@ source =
|
||||
|
||||
[coverage:run]
|
||||
branch = True
|
||||
|
||||
# redundant with pytest --cov above, but this tricks the coverage.xml report into
|
||||
# using the full path, otherwise files with the same name in different paths
|
||||
# get clobbered. maybe appends would fix this, IDK
|
||||
include =
|
||||
.tox/**/incorporealcms/
|
||||
|
||||
omit =
|
||||
**/_version.py
|
||||
|
||||
@ -80,7 +70,7 @@ exclude =
|
||||
versioneer.py
|
||||
_version.py
|
||||
instance/
|
||||
ignore = T101
|
||||
extend-ignore = T101
|
||||
max-complexity = 10
|
||||
max-line-length = 120
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user