[Qa-jenkins-scm] [jenkins.debian.net] 01/03: reproducible: half the height of the pkgs to be fixed graphs
Holger Levsen
holger at moszumanska.debian.org
Wed Oct 7 02:16:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit 76550edd7c1ef79eddaa28dc02975f94c57a8038
Author: Holger Levsen <holger at layer-acht.org>
Date: Wed Oct 7 04:14:02 2015 +0200
reproducible: half the height of the pkgs to be fixed graphs
---
bin/make_graph.py | 8 +++++---
bin/reproducible_common.sh | 7 ++++++-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/bin/make_graph.py b/bin/make_graph.py
index 9bd3cad..cf852a2 100755
--- a/bin/make_graph.py
+++ b/bin/make_graph.py
@@ -11,8 +11,8 @@ from rpy2 import robjects
from rpy2.robjects.packages import importr
def main():
- if len(sys.argv) != 6:
- print "we need exactly five params: csvfilein, pngoutfile, color, mainlabel, ylabl"
+ if len(sys.argv) != 8:
+ print "we need exactly seven params: csv-file-in, png-out-file, color, mainlabel, ylabl, width, height"
return
filein = sys.argv[1]
fileout = sys.argv[2]
@@ -20,10 +20,12 @@ def main():
columns = str(int(colors)+1)
mainlabel = sys.argv[4]
ylabel = sys.argv[5]
+ width = int(sys.argv[6])
+ height = int(sys.argv[7])
countsfile = os.path.join(filein)
pngfile = os.path.join(fileout)
grdevices = importr('grDevices')
- grdevices.png(file=pngfile, width=1920, height=960, pointsize=10, res=100, antialias="none")
+ grdevices.png(file=pngfile, width=width, height=height, pointsize=10, res=100, antialias="none")
r = robjects.r
r('t <- (read.table("'+countsfile+'",sep=",",header=1,row.names=1))')
r('cname <- c("date",rep(colnames(t)))')
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index 972ffe5..ef1572f 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -598,13 +598,18 @@ create_png_from_table() {
experimental) COLORS=42 ;;
esac
fi
+ local WIDTH=1920
+ local HEIGHT=960
+ if [ $1 -eq 8 ] ; then
+ HEIGHT=480
+ fi
# only generate graph if the query returned data
if [ $(cat ${TABLE[$1]}.csv | wc -l) -gt 1 ] ; then
echo "Updating $2..."
DIR=$(dirname $2)
mkdir -p $DIR
echo "Generating $2."
- /srv/jenkins/bin/make_graph.py ${TABLE[$1]}.csv $2 ${COLORS} "${MAINLABEL[$1]}" "${YLABEL[$1]}"
+ /srv/jenkins/bin/make_graph.py ${TABLE[$1]}.csv $2 ${COLORS} "${MAINLABEL[$1]}" "${YLABEL[$1]}" $WIDTH $HEIGHT
mv $2 $BASE/$DIR
[ "$DIR" = "." ] || rmdir $(dirname $2)
# create empty dummy png if there havent been any results ever
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list