2011-09-17 18:27:02 +00:00
|
|
|
[tox]
|
|
|
|
|
envlist =
|
2020-12-03 22:53:57 +00:00
|
|
|
isort
|
|
|
|
|
flake8
|
|
|
|
|
bandit
|
2017-10-19 22:51:44 +00:00
|
|
|
# Python/Django combinations that are officially supported
|
2021-10-06 05:53:01 +00:00
|
|
|
py{36,37,38,39}-django{22}
|
2021-10-06 05:52:11 +00:00
|
|
|
py{36,37,38,39,310}-django{32}
|
|
|
|
|
py{38,39,310}-django{40}
|
2020-12-03 22:53:57 +00:00
|
|
|
readme
|
|
|
|
|
docs
|
2011-09-17 18:27:02 +00:00
|
|
|
|
2022-03-06 17:01:13 +00:00
|
|
|
[gh-actions]
|
|
|
|
|
python =
|
|
|
|
|
3.6: py36
|
|
|
|
|
3.7: py37
|
|
|
|
|
3.8: py38
|
|
|
|
|
3.9: py39
|
|
|
|
|
3.10: py310
|
|
|
|
|
|
|
|
|
|
[gh-actions:env]
|
|
|
|
|
DJANGO =
|
|
|
|
|
2.2: django22
|
|
|
|
|
3.2: django32
|
|
|
|
|
4.0: django40
|
|
|
|
|
|
2011-09-17 18:27:02 +00:00
|
|
|
[testenv]
|
2020-04-14 20:21:20 +00:00
|
|
|
description = Unit tests
|
2015-04-20 21:59:19 +00:00
|
|
|
deps =
|
2022-03-06 17:01:13 +00:00
|
|
|
coverage[toml]
|
2020-11-29 21:27:16 +00:00
|
|
|
pytest-django
|
2019-04-08 19:50:10 +00:00
|
|
|
django22: Django>=2.2,<3.0
|
2021-09-27 18:36:13 +00:00
|
|
|
django32: Django>=3.2,<4.0
|
2022-02-04 18:04:03 +00:00
|
|
|
django40: Django>=4.0,<4.1
|
2020-04-14 20:21:20 +00:00
|
|
|
commands =
|
2022-03-06 17:01:13 +00:00
|
|
|
coverage run -m pytest {posargs}
|
2020-11-25 19:56:03 +00:00
|
|
|
coverage xml
|
2017-10-15 17:46:44 +00:00
|
|
|
|
2020-12-03 22:53:57 +00:00
|
|
|
[testenv:bandit]
|
2020-04-14 20:21:20 +00:00
|
|
|
description = PyCQA security linter
|
2022-03-06 17:01:13 +00:00
|
|
|
deps = bandit
|
|
|
|
|
commands = -bandit {posargs:-r analytical} -v
|
2019-04-08 19:50:10 +00:00
|
|
|
|
2020-12-03 22:53:57 +00:00
|
|
|
[testenv:docs]
|
2020-04-14 20:21:20 +00:00
|
|
|
description = Build the HTML documentation
|
2019-04-08 19:50:10 +00:00
|
|
|
deps = sphinx
|
2019-04-09 08:44:29 +00:00
|
|
|
commands = sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
|
2019-04-08 19:50:10 +00:00
|
|
|
|
2020-12-03 22:53:57 +00:00
|
|
|
[testenv:flake8]
|
2020-04-14 20:21:20 +00:00
|
|
|
description = Static code analysis and code style
|
2017-10-15 17:46:44 +00:00
|
|
|
deps = flake8
|
2022-02-04 18:04:03 +00:00
|
|
|
commands = flake8 {posargs}
|
2017-10-15 17:46:44 +00:00
|
|
|
|
2020-12-03 22:53:57 +00:00
|
|
|
[testenv:isort]
|
2022-02-04 18:04:03 +00:00
|
|
|
description = Ensure imports are ordered consistently
|
|
|
|
|
deps = isort[colors]
|
|
|
|
|
commands = isort --check-only --diff {posargs:analytical setup.py tests}
|
2021-02-20 12:41:17 +00:00
|
|
|
|
2020-12-03 22:53:57 +00:00
|
|
|
[testenv:readme]
|
2020-04-14 20:21:20 +00:00
|
|
|
description = Ensure README renders on PyPI
|
2022-03-06 17:01:13 +00:00
|
|
|
deps =
|
|
|
|
|
build
|
|
|
|
|
twine
|
2019-04-08 18:14:01 +00:00
|
|
|
commands =
|
2022-03-06 17:01:13 +00:00
|
|
|
python -m build
|
2019-04-08 18:14:01 +00:00
|
|
|
twine check dist/*
|
2017-11-22 23:56:11 +00:00
|
|
|
|
2020-12-03 23:18:09 +00:00
|
|
|
[testenv:clean]
|
|
|
|
|
description = Clean up bytecode and build artifacts
|
|
|
|
|
deps = pyclean
|
|
|
|
|
commands =
|
2022-03-06 17:01:13 +00:00
|
|
|
pyclean {posargs:.}
|
|
|
|
|
rm -rf .tox/ build/ dist/ django_analytical.egg-info/ .coverage coverage.xml tests/coverage-report.xml tests/unittests-report.xml
|
2022-02-04 18:04:03 +00:00
|
|
|
allowlist_externals =
|
2020-12-03 23:18:09 +00:00
|
|
|
rm
|
|
|
|
|
|
2017-10-15 17:46:44 +00:00
|
|
|
[flake8]
|
2019-04-08 18:14:01 +00:00
|
|
|
exclude = .cache,.git,.tox,build,dist
|
2017-10-15 17:46:44 +00:00
|
|
|
max-line-length = 100
|