update link to upper-constraints.txt
[optf/osdf.git] / tox.ini
1
2 [tox]
3 skipsdist=True
4 envlist = py3, pylint, flake8diff
5
6 [testenv]
7 distribute = False
8 basepython=python3
9 setenv   =
10     OSDF_CONFIG_FILE={toxinidir}/test/config/osdf_config.yaml
11 commands =
12     /bin/cp config/slicing_config.yaml test/config/
13     /bin/bash test/functest/scripts/start-simulators.sh
14     coverage run --module pytest --junitxml xunit-results.xml
15     coverage xml --omit=".tox/py3/*","test/*"
16     coverage report -m --omit=".tox/py3/*","test/*"
17     /bin/bash test/functest/scripts/stop-simulators.sh
18     /bin/rm test/config/slicing_config.yaml
19     # TODO: need to update the above "omit" when we package osdf as pip-installable
20 deps = -r{toxinidir}/requirements.txt
21     -r{toxinidir}/test/test-requirements.txt
22     -r{toxinidir}/requirements-osdf.txt
23     -r{toxinidir}/requirements-opteng.txt
24
25 [run]
26 source=./apps/,./osdf/,osdfapp.py,./runtime/,solverapp.py
27
28 [testenv:pylint]
29 whitelist_externals=bash
30 commands = bash -c "pylint --reports=y osdf apps runtime| tee pylint.out"
31
32 [testenv:py3]
33 basepython=python3
34
35 [testenv:flake8diff]
36 basepython=python3
37 whitelist_externals=bash
38 deps = hacking>=2.0.0
39 commands =
40   bash -c "files=$(git diff HEAD^ HEAD --diff-filter=d --name-only | grep -E '(^apps\/|osdf\/|runtime\/)'| grep -E '*\.py$'); if [[ -z $files ]]; then exit 0; else flake8 $files; fi"
41
42 [flake8]
43 select = E,H,W,F
44 max-line-length = 119
45 ignore = W503   #conflict with W504
46 per-file-ignores= apps/pci/optimizers/__init__.py:F401