This is an automated email from the ASF dual-hosted git repository. gstein pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/steve.git
commit 61cfe1b704c50171174b9ea5cbf4b9ee4744bd45 Author: Greg Stein <[email protected]> AuthorDate: Tue May 31 03:59:33 2022 -0500 gather stv data for testing --- v3/test/populate_v2_stv.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/v3/test/populate_v2_stv.sh b/v3/test/populate_v2_stv.sh new file mode 100755 index 0000000..a06e491 --- /dev/null +++ b/v3/test/populate_v2_stv.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# +# Gather "all" known STV voting processing into a reference directory, +# with full debug output. These files can then be used as a comparison +# to future developments on STV tooling, to ensure consistency. +# + +if test "$1" = ""; then echo "USAGE: $0 MEETINGS_DIR"; exit 1; fi +MEETINGS_DIR="$1" + +REFERENCE_DIR="v2-stv-ref" +mkdir "$REFERENCE_DIR" || /bin/true + +THIS_FILE=`realpath $0` +THIS_DIR=`dirname "$THIS_file"` +#echo $THIS_FILE +STV_TOOL=`realpath "$THIS_DIR/../../monitoring/stv_tool.py"` +echo $STV_TOOL + +#echo "ls $MEETINGS_DIR/*/raw_board_votes.txt" + +for v in `ls $MEETINGS_DIR/*/raw_board_votes.txt`; do + #echo $v + DATE=`echo $v | sed -n 's#.*/\([0-9]*\)/.*#\1#p'` + echo $DATE + "$STV_TOOL" -v "$v" > "$REFERENCE_DIR/$DATE" +done
