File tree Expand file tree Collapse file tree 1 file changed +10
-23
lines changed
.github/workflows/scripts Expand file tree Collapse file tree 1 file changed +10
-23
lines changed Original file line number Diff line number Diff line change @@ -8,30 +8,17 @@ JOBID=$(gh run list -w "Test-suite with Python warnings as errors" --repo Pennyl
88echo " View latest job at https://github.com/PennyLaneAI/pennylane/actions/runs/$JOBID "
99gh run view $JOBID --log-failed --repo PennylaneAI/pennylane > /tmp/job_$JOBID .out
1010
11- cat << EOF > unique_wae.txt
12- FutureWarning
13- pennylane.exceptions.PennyLaneDeprecationWarning
14- pytest.PytestCollectionWarning
15- RuntimeWarning
16- numpy.exceptions.ComplexWarning
17- pytest.PytestUnraisableExceptionWarning
18- PendingDeprecationWarning
19- pytest.PytestRemovedIn9Warning
20- UserWarning
21- DeprecationWarning
22- EOF
23-
24- declare -A waeCounts
25-
26- while read -r line; do
27- [[ -n " $line " && " $line " != [[:blank:]]* ]] && waeCounts[" $line " ]=$( grep -F -c " $line " " /tmp/job_$JOBID .out" )
28- done < unique_wae.txt
29- echo $waeCounts
11+ grep -oE ' [A-Za-z0-9_.]+Warning:' /tmp/job_$JOBID .out | \
12+ sed ' s/^ //' | \
13+ sed ' s/:$//' | \
14+ sort | \
15+ uniq -c | \
16+ awk ' {print $2, $1}' > unique_wae.txt
3017
3118jsonOut=" [{"
32- for x in " ${ ! waeCounts[@]} " ; do
33- echo $x :: ${waeCounts[$x]}
34- jsonOut+=" \" $x \" :${waeCounts[$x]} ,"
35- done
19+ while read -r name count ; do
20+ echo " $name :: $count "
21+ jsonOut+=" \" $name \" :$count ,"
22+ done < unique_wae.txt
3623jsonOut=" ${jsonOut::- 1} }]"
3724echo $jsonOut > unique_wae.json
You can’t perform that action at this time.
0 commit comments