Skip to content
Snippets Groups Projects
Select Git revision
  • main
  • testing
  • 23-pypi-release-and-extended-documentation
  • dev
  • wip_tests_and_notebooks
  • cicd
  • v0.4.14
  • v0.4.12
  • v0.4.11
  • v0.4.10
  • v0.4.9
  • v0.4.8
  • 0.4.7
  • v0.4.7
  • v0.4.6
  • v0.4.5
16 results

test_cache.py

Blame
  • prepare-selection.sh 1.62 KiB
    #!/bin/sh
    set -e
    
    if [ ! -d Application_Form ]; then
    	echo "Missing 'Application_Form' directory"
    	exit 1
    fi
    for f in registrations.csv reviews.csv
    do
    	if [ ! -f $f ]; then
    		echo "Missing $f"
    		exit 1
    	fi
    done
    
    ./fix-reviews.sh
    rm -rf Selection
    mkdir Selection
    cd Selection
    python3 ../create-evaluation-files.py ../registrations.csv ../reviews.csv ../assign-[0-2].csv
    cd ..
    mv Selection/students.csv .
    
    perl sohpc-assign.pl slots.csv weights-pref.csv  students.csv project-preferences.csv > select-by-pref.txt
    #perl sohpc-assign.pl slots.csv weights-score.csv students.csv project-preferences.csv > select-by-score.txt
    
    # apply tentative selections
    if true ; then
    	sed -n -e '1aID,selected' -e 's/\([0-9\.]\{4,\}\)[: ]\{1,\}\([1-9][0-9]\{0,\}\).*/-\2,\1/p' select-by-pref.txt > assign-t.csv
    	rm -rf Selection
    	mkdir Selection
    	cd Selection
    	python3 ../create-evaluation-files.py ../registrations.csv ../reviews.csv ../assign-[0-2t].csv
    	cd ..
    	mv Selection/students.csv .
    fi
    
    awk '{ if ($2 == "slots,") { $3 = $3 + 1 }; print $0 }' project-preferences.csv > project-preferences-reserves.csv
    perl sohpc-assign.pl slots-reserves.csv weights-pref.csv students.csv project-preferences-reserves.csv > select-reserves-by-pref.txt
    for i in $(seq 2201 2222) ; do grep ^$i select-reserves-by-pref.txt | tail -n 1 ; done > select-reserves.txt
    
    mkdir Selection/scripts
    cp prepare-selection.sh create-evaluation-files.py evaluation-detail-format.html registrations.csv reviews.csv Selection/scripts
    cp sohpc-assign.pl slots*.csv weights*.csv students.csv project-preferences.csv select*.txt assign-*.csv Selection/scripts
    rm -f Selection.zip
    zip -q -r Selection Selection