split out data collection from reporting

Change-Id: I9c70100b95db204dc5e2d4273f34950111c7b899
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-05-02 22:13:30 -04:00
parent d0beba2968
commit 4221432946
2 changed files with 19 additions and 7 deletions

19
tools/gather_data.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash -xe
if [ ! -f .tox/venv/bin/activate ]; then
tox -e venv --notest
fi
source .tox/venv/bin/activate
for input in $*
do
txt_file=${input%.qry}.txt
dat_file=${input%.qry}.dat
# Query gerrit
who-helped -v --debug changes query "$(cat $input)" $txt_file
# Build the raw contribution data file
who-helped --debug contributions list -f csv $txt_file \
| tee $dat_file
done

View File

@ -11,13 +11,6 @@ do
dat_file=${input%.qry}.dat
rpt_file=${input%.qry}.rpt
# Query gerrit
who-helped -v --debug changes query "$(cat $input)" $txt_file
# Build the raw contribution data file
who-helped --debug contributions list -f csv $txt_file \
| tee $dat_file
# Text report
who-helped --debug contributions summarize $dat_file \
| tee $rpt_file