summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Beierl <mark.beierl@emc.com>2016-07-13 23:26:00 -0400
committerMark Beierl <mark.beierl@emc.com>2016-07-14 20:09:55 +0000
commitce3f927c2bc98eaf124e96f99cbcc33fbebabeed (patch)
treea59151955913ec2131e2f55fcca3b1cf974096ac
parent94550f3b427ec525771ac0d6a9d884e4e69f838b (diff)
Enforce Style Guidelines
Update to fail verify if pep8 compliance not met. Revert back to Coverage 4.1 to show code coverage report in Jenkins again Change-Id: Icb467451f101942255c7944ad796497609dcb07e Signed-off-by: Mark Beierl <mark.beierl@emc.com>
-rwxr-xr-xci/setup.py1
-rwxr-xr-xci/verify.sh13
-rw-r--r--storperf/plot/barchart.py8
3 files changed, 14 insertions, 8 deletions
diff --git a/ci/setup.py b/ci/setup.py
index a293e9c..2a02276 100755
--- a/ci/setup.py
+++ b/ci/setup.py
@@ -25,7 +25,6 @@ setup(
"flask-restful==0.3.5",
"flask-restful-swagger==0.19",
"html2text==2016.1.8",
- "matplotlib==1.3.1",
"python-cinderclient==1.6.0",
"python-glanceclient==1.1.0",
"python-heatclient==0.8.0",
diff --git a/ci/verify.sh b/ci/verify.sh
index d309319..89b1406 100755
--- a/ci/verify.sh
+++ b/ci/verify.sh
@@ -21,7 +21,7 @@ source $WORKSPACE/storperf_venv/bin/activate
pip install setuptools
pip install autoflake==0.6.6
pip install autopep8==1.2.2
-pip install coverage==3.4
+pip install coverage==4.1
pip install flask==0.10
pip install flask-restful==0.3.5
pip install flask-restful-swagger==0.19
@@ -29,6 +29,7 @@ pip install flask-swagger==0.2.12
pip install funcsigs==0.4
pip install flake8==2.5.4
pip install html2text==2016.1.8
+pip install matplotlib==1.3.1
pip install mock==1.3.0
pip install nose==1.3.7
pip install python-cinderclient==1.6.0
@@ -45,6 +46,8 @@ python ci/setup.py develop
flake8 storperf
+flake8rc=$?
+
nosetests --with-xunit \
--with-coverage \
--cover-package=storperf\
@@ -54,4 +57,10 @@ rc=$?
deactivate
-exit $rc
+if [ $flake8rc -ne 0 ]
+then
+ echo "Formatting did not meet guidelines"
+ exit $flake8rc
+fi
+
+exit $rc \ No newline at end of file
diff --git a/storperf/plot/barchart.py b/storperf/plot/barchart.py
index 6fcfd8d..f82f3b8 100644
--- a/storperf/plot/barchart.py
+++ b/storperf/plot/barchart.py
@@ -11,9 +11,9 @@ import cStringIO
import matplotlib as mpl
mpl.use('Agg')
-import matplotlib.pyplot as pyplot
-from mpl_toolkits.mplot3d import Axes3D
-import numpy as np
+import matplotlib.pyplot as pyplot # noqa: ignore E402
+from mpl_toolkits.mplot3d import Axes3D # noqa: ignore E402, F401
+import numpy as np # noqa: ignore E402
class Barchart(object):
@@ -25,8 +25,6 @@ class Barchart(object):
fig = pyplot.figure()
- #ax = Axes3D(fig)
-
data = np.array(latencies)
lx = len(data[0]) # Work out matrix dimensions