X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=tox.ini;h=66467c7325b15defbb967e27d7046fd4221eaa86;hb=c9512e2208ab7cc27d1cd312195f017cf834d88e;hp=c3341ea9fc7c46608f42894d8c7dc1d2e2c2e5ee;hpb=b483b920caa7737203e316cfd6f44fa0eb861e47;p=osm%2Fcommon.git diff --git a/tox.ini b/tox.ini index c3341ea..66467c7 100644 --- a/tox.ini +++ b/tox.ini @@ -20,10 +20,11 @@ envlist = black, cover, flake8, pylint, safety [tox:jenkins] toxworkdir = /tmp/.tox +setenv = XDG_CACHE_HOME=/tmp/.cache [testenv] usedevelop = True -basepython = python3 +basepython = python3.8 setenv = VIRTUAL_ENV={envdir} PYTHONDONTWRITEBYTECODE = 1 deps = -r{toxinidir}/requirements.txt @@ -31,10 +32,11 @@ deps = -r{toxinidir}/requirements.txt ####################################################################################### [testenv:black] -deps = black +deps = black==23.12.1 skip_install = true commands = - - black --check --diff osm_common/ + black --check --diff osm_common/ + black --check --diff setup.py ####################################################################################### [testenv:cover] @@ -51,7 +53,9 @@ whitelist_externals = sh ####################################################################################### [testenv:flake8] -deps = flake8 +deps = + flake8==5.0.4 + flake8-import-order commands = flake8 osm_common/ setup.py @@ -61,7 +65,7 @@ deps = {[testenv]deps} -r{toxinidir}/requirements-test.txt pylint commands = - pylint -E osm_common + pylint -E osm_common ####################################################################################### [testenv:safety] @@ -75,13 +79,18 @@ commands = ####################################################################################### [testenv:pip-compile] -deps = pip-tools==5.5.0 +deps = pip-tools==6.6.2 +skip_install = true +whitelist_externals = bash + [ commands = - - sh -c 'for file in requirements*.in ; do pip-compile -rU --no-header $file ;\ - out=`echo $file | sed "s/.in/.txt/"` ; \ - head -16 tox.ini >> $out ;\ - done' -whitelist_externals = sh + - bash -c "for file in requirements*.in ; do \ + UNSAFE="" ; \ + if [[ $file =~ 'dist' ]] ; then UNSAFE='--allow-unsafe' ; fi ; \ + pip-compile -rU --no-header $UNSAFE $file ;\ + out=`echo $file | sed 's/.in/.txt/'` ; \ + sed -i -e '1 e head -16 tox.ini' $out ;\ + done" ####################################################################################### [testenv:dist] @@ -97,13 +106,24 @@ commands = sh -c 'rm osm_common/requirements.txt' whitelist_externals = sh +####################################################################################### +[testenv:release_notes] +deps = reno +skip_install = true +whitelist_externals = bash +commands = + reno new {posargs:new_feature} + bash -c "sed -i -e '1 e head -16 tox.ini' releasenotes/notes/{posargs:new_feature}*.yaml" + ####################################################################################### [flake8] ignore = W291, W293, + W503, E123, E125, + E203, E226, E241 exclude = @@ -113,3 +133,4 @@ exclude = max-line-length = 120 show-source = True builtins = _ +import-order-style = google