[tox]
envlist = py39

[testenv:flake8]
skipsdist = True
skip_install = True
deps =
  flake8==3.9.2
  flake8-copyright==0.2.2
  darglint==1.8.0
commands = flake8 cosmpy tests examples setup.py

[testenv:black-check]
skipsdist = True
skip_install = True
deps =
  black==21.6b0
commands = black --check --verbose cosmpy tests examples setup.py --exclude protos

[testenv:black]
skipsdist = True
skip_install = True
deps =
  black==21.6b0
commands = black cosmpy tests examples setup.py --exclude protos

[testenv:isort-check]
skipsdist = True
skip_install = True
deps =
  isort==5.9.3
commands = isort --check-only --verbose cosmpy tests examples setup.py

[testenv:isort]
skipsdist = True
skip_install = True
deps =
  isort==5.9.3
commands = isort cosmpy tests examples setup.py

[testenv:vulture]
skipsdist = True
skip_install = True
deps =
  vulture==2.3
commands = vulture cosmpy tests examples setup.py --exclude "*_pb2.py,*_pb2_grpc.py"

[testenv:bandit]
skipsdist = True
skip_install = True
deps =
  bandit==1.7.0
commands =
  bandit -r cosmpy tests --skip B101
  bandit -r examples --skip B101,B105

[testenv:safety]
skipsdist = True
skip_install = True
deps =
  safety==1.10.3
commands = safety check -i 41002

[testenv:mypy]
skipsdist = True
skip_install = True
deps =
  mypy==0.910
commands = mypy cosmpy tests examples setup.py

[testenv:pylint]
skipsdist = True
skip_install = True
deps =
  pylint==2.9.6
  -rrequirements.txt
commands = pylint cosmpy tests examples setup.py

[testenv:test]
skipsdist = True
skip_install = True
deps =
  -rrequirements-dev.txt
commands = coverage run -m pytest tests --doctest-modules --ignore tests/vulture_whitelist.py

[testenv:test-unit]
skipsdist = True
skip_install = True
deps =
  -rrequirements-dev.txt
commands = coverage run -m pytest tests --doctest-modules --ignore tests/vulture_whitelist.py -m "not integtest"

[testenv:test-integration]
skipsdist = True
skip_install = True
deps =
  -rrequirements-dev.txt
commands = coverage run -m pytest tests --doctest-modules --ignore tests/vulture_whitelist.py -m "integtest"

[testenv:coverage-report]
skipsdist = True
skip_install = True
deps =
  coverage==5.5
commands = coverage report -m -i

[testenv:liccheck]
skipsdist = True
skip_install = True
deps =
  liccheck==0.6.2
  -rrequirements.txt
commands = liccheck -s strategy.ini -r requirements.txt -l PARANOID

[testenv:copyright-check]
skipsdist = True
skip_install = True
commands = python scripts/check_copyright.py

[testenv:check-manifest]
skipsdist = True
skip_install = True
deps =
  check-manifest==0.46
commands = check-manifest
