Fix 1473 and add vca_model_config_* to lcm charm
Changes in all operator charms:
- Optimize deps for tox environments
- Add import-order-style to flake8
- Optimize .jujuignore to reduce the size of charm artifacts
OSM LCM charm:
- Added vca_model_config_* options
Added bundle example for using a bundle
Updated the bundles and pin the new versions in the installer
Change-Id: Ic6591354fa5d1b5f43383215b2f0df13eb28ce67
Signed-off-by: David Garcia <david.garcia@canonical.com>
diff --git a/installers/charm/ro/tox.ini b/installers/charm/ro/tox.ini
index 1f9442e..30e0ea8 100644
--- a/installers/charm/ro/tox.ini
+++ b/installers/charm/ro/tox.ini
@@ -21,21 +21,32 @@
#######################################################################################
[tox]
-envlist = flake8, cover, pylint, safety, yamllint
-skipsdist = True
+envlist = black, cover, flake8, pylint, yamllint, safety
+skipsdist = true
+
+[tox:jenkins]
+toxworkdir = /tmp/.tox
[testenv]
basepython = python3.8
-setenv =
- VIRTUAL_ENV={envdir}
- PYTHONHASHSEED=0
- PYTHONPATH = {toxinidir}/src
+setenv = VIRTUAL_ENV={envdir}
+ PYTHONDONTWRITEBYTECODE = 1
deps = -r{toxinidir}/requirements.txt
+
+#######################################################################################
+[testenv:black]
+deps = black
+commands =
+ black --check --diff src/ tests/
+
+
#######################################################################################
[testenv:cover]
deps = {[testenv]deps}
-r{toxinidir}/requirements-test.txt
+ coverage
+ nose2
commands =
sh -c 'rm -f nosetests.xml'
coverage erase
@@ -45,36 +56,34 @@
coverage xml -o coverage.xml --omit=*tests*
whitelist_externals = sh
-#######################################################################################
-[testenv:safety]
-setenv =
- LC_ALL=C.UTF-8
- LANG=C.UTF-8
-deps = {[testenv]deps}
- -r{toxinidir}/requirements-test.txt
-commands =
- - safety check --full-report
#######################################################################################
[testenv:flake8]
-deps = flake8
+deps = flake8
+ flake8-import-order
commands =
flake8 src/ tests/
+
#######################################################################################
[testenv:pylint]
deps = {[testenv]deps}
-r{toxinidir}/requirements-test.txt
pylint
commands =
- pylint -E src
+ pylint -E src/ tests/
+
#######################################################################################
-[testenv:black]
+[testenv:safety]
+setenv =
+ LC_ALL=C.UTF-8
+ LANG=C.UTF-8
deps = {[testenv]deps}
- -r{toxinidir}/requirements-test.txt
- black
-commands = black --check --diff . --exclude "build/|.tox/|mod/|lib/"
+ safety
+commands =
+ - safety check --full-report
+
#######################################################################################
[testenv:yamllint]
@@ -86,9 +95,7 @@
#######################################################################################
[testenv:build]
passenv=HTTP_PROXY HTTPS_PROXY NO_PROXY
-deps = {[testenv]deps}
- -r{toxinidir}/requirements-test.txt
- charmcraft
+deps = charmcraft
whitelist_externals =
charmcraft
cp
@@ -112,4 +119,5 @@
max-line-length = 120
show-source = True
builtins = _
-
+max-complexity = 10
+import-order-style = google