1 #######################################################################################
2 # Copyright ETSI Contributors and Others.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #######################################################################################
19 envlist = black, flake8
22 toxworkdir = /tmp/.tox
23 setenv = XDG_CACHE_HOME=/tmp/.cache
28 setenv = VIRTUAL_ENV={envdir}
29 PYTHONDONTWRITEBYTECODE = 1
30 deps = -r{toxinidir}/requirements.txt
31 parallel_show_output = true
34 #######################################################################################
39 black
--check
--diff src
42 #######################################################################################
44 deps = {[testenv]deps}
45 -r
{toxinidir
}/requirements
-dev.txt
46 -r
{toxinidir
}/requirements
-test.txt
47 whitelist_externals = sh
49 sh
-c 'rm
-f nosetests.xml'
51 nose2
-C
--coverage src
-s src
52 sh
-c 'mv .coverage .coverage_mon'
53 coverage report --omit='*tests*'
54 coverage html -d ./cover --omit='*tests*'
55 coverage xml -o coverage.xml --omit='*tests*'
58 #######################################################################################
67 #######################################################################################
69 deps = {[testenv]deps}
70 -r
{toxinidir
}/requirements
-dev.txt
71 -r
{toxinidir
}/requirements
-test.txt
78 #######################################################################################
83 deps = {[testenv]deps}
86 - safety check
--full
-report
89 #######################################################################################
91 deps = pip-tools==6.6.2
97 bash
-c
"for file in requirements*.in ; do \
99 if [[ $file =~ 'dist' ]] ; then UNSAFE='--allow-unsafe' ; fi ; \
100 pip-compile -rU --no-header $UNSAFE $file ;\
101 out=`echo $file | sed 's/.in/.txt/'` ; \
102 sed -i -e '1 e head -16 tox.ini' $out ;\
106 #######################################################################################
108 deps = {[testenv]deps}
109 -r
{toxinidir
}/requirements
-dist.txt
111 # In the commands, we copy the requirements.txt to be presented as a source file (.py)
112 # so it gets included in the .deb package for others to consume
114 sh
-c 'cp requirements.txt src
/osm_ngsa
/requirements.txt'
115 sh
-c 'cp README.rst src
/osm_ngsa
/README.rst'
116 python3 setup.py --command-packages=stdeb.command sdist_dsc
117 sh
-c 'cd deb_dist
/osm
-ngsa
*/ && dpkg
-buildpackage
-rfakeroot
-uc
-us'
118 sh
-c 'rm src
/osm_ngsa
/requirements.txt'
119 sh
-c 'rm src
/osm_ngsa
/README.rst'
120 whitelist_externals = sh
123 #######################################################################################
140 max-line-length = 120
143 import-order-style = google