updated
authorChristian Urban <christian.urban@kcl.ac.uk>
Thu, 13 Jan 2022 12:34:43 +0000
changeset 422 217bbd700594
parent 421 e97c577bdc24
child 423 e9d14d58be3c
updated
Admin/feedback~
main_testing2/danube_test.sh
main_testing2/danube_test2.scala
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Admin/feedback~	Thu Jan 13 12:34:43 2022 +0000
@@ -0,0 +1,26 @@
+There was a setup error with PEP and the Evasys system, because of
+which we were only able to collect 64 responses (out of 400+ eligible
+students) this year. The submitted responses indicate that students
+were satisfied with the module.  For example more than 64% of the
+students found the pace of the lectures about right and more than 81%
+of the students found the module intellectually stimulating. Furthermore
+75% od the students we satisfied with the quality of the module, with
+another 7.8% expressing a neutral opinion. Of course we will work
+hard to maintain, and possibly even improve upon, such a favourable view.
+
+Students generally liked learning new programming languages and 
+seeing programming from a different point of view. Also students appreciated
+very much the setup of coursework and the automatic feedback via Github
+submissions. We will keep this in the future. We will also keep the two
+deadlines for the coursework in November and January for the work to
+be completed. This seems to have worked well with students (as opposed to
+weekly deadlines we had in previous years). We did not hear about any
+problems regarding the SGTs and TAs. We will keep the format of weekly
+SGTs led by an experienced TA.
+
+Some difficulties arose from the study material. We will go over the
+provided material for the next year and implement potential
+improvements.  We inherited this year the software behind the testing
+framework. We will endeavour to maintain this testing framework, which
+is a potpourri of scripts written in Perl, Bash, PhP, Python, as well
+as C++ and Scala, of course.
\ No newline at end of file
--- a/main_testing2/danube_test.sh	Mon Jan 10 13:51:59 2022 +0000
+++ b/main_testing2/danube_test.sh	Thu Jan 13 12:34:43 2022 +0000
@@ -4,7 +4,11 @@
 set -euo pipefail
 
 
-out=${1:-output}
+
+scalafile=${1:-danube.scala}
+out=${2:-output}
+
+
 
 echo "" > $out
 
@@ -36,7 +40,7 @@
 
 echo "danube.scala runs?" >> $out
 
-if (scala_compile danube.scala)
+if (scala_compile $scalafile)
 then
     echo "  --> passed" >> $out
     tsts=$(( 0 ))
@@ -52,7 +56,7 @@
 then
     echo "danube.scala does not contain vars, returns etc?" >> $out
 
-    if (scala_vars danube.scala)
+    if (scala_vars $scalafile)
     then
 	echo "  --> FAIL (make triple-sure your program conforms to the required format)" >> $out
 	tsts=$(( 1 ))
@@ -71,7 +75,7 @@
   echo "  val movies_url = \"\"\"https://nms.kcl.ac.uk/christian.urban/movies.csv\"\"\"" >> $out
   echo "  get_csv_url(movies_url).length == 9742" >> $out
 
-  if (scala_assert "danube.scala" "danube_test1.scala")
+  if (scala_assert $scalafile "danube_test1.scala")
   then
     echo -e "  --> success" >> $out
   else
@@ -88,8 +92,11 @@
   echo "  " >> $out
   echo "  good_ratings.length == 48580 " >> $out
   echo "  movie_names.length == 9742 " >> $out
+  echo "  " >> $out
+  echo "  val r_elems = List((\"1\",\"1\"), (\"1\",\"3\"), (\"1\",\"6\"), (\"1\",\"47\")) " >> $out
+  echo "  r_elems.forall(good_ratings.contains(_)) == true" >> $out
 
-  if (scala_assert "danube.scala" "danube_test2.scala") 
+  if (scala_assert $scalafile "danube_test2.scala") 
   then
     echo -e "  --> success" >> $out
   else
@@ -111,7 +118,7 @@
   echo -e  "  val ls5 = ls4 ::: ls4.reverse" >> $out
   echo -e  "  groupById(ls5, Map()) == Map(1 -> List(2,2), 2 -> List(3,3), ....)" >> $out
 
-  if (scala_assert "danube.scala" "danube_test3.scala")
+  if (scala_assert $scalafile "danube_test3.scala")
   then
       echo -e "  --> success" >> $out
   else
@@ -129,7 +136,7 @@
   echo -e  "  favourites(ratings_map, \"858\").length  == 158 " >> $out
   echo -e  "  favourites(ratings_map, \"260\").length  == 201 " >> $out  
 
-  if (scala_assert "danube.scala" "danube_test4.scala") 
+  if (scala_assert $scalafile "danube_test4.scala") 
   then
     echo -e  "  --> success" >> $out
   else
@@ -147,7 +154,7 @@
   echo -e  "  suggestions(ratings_map, \"858\").length  == 4883 " >> $out
   echo -e  "  suggestions(ratings_map, \"260\").length  == 4970 " >> $out  
 
-  if (scala_assert "danube.scala" "danube_test5.scala") 
+  if (scala_assert $scalafile "danube_test5.scala") 
   then
     echo -e  "  --> success" >> $out
   else
@@ -165,7 +172,7 @@
   echo -e  "  recommendations(ratings_map, movies_map, \"4\").length  == 0 " >> $out
   echo -e  "  recommendations(ratings_map, movies_map, \"5\").length  == 2 " >> $out
 
-  if (scala_assert "danube.scala" "danube_test6.scala") 
+  if (scala_assert $scalafile "danube_test6.scala") 
   then
     echo -e  "  --> success" >> $out
   else
--- a/main_testing2/danube_test2.scala	Mon Jan 10 13:51:59 2022 +0000
+++ b/main_testing2/danube_test2.scala	Thu Jan 13 12:34:43 2022 +0000
@@ -12,9 +12,10 @@
 val urban_ratings = urban_get_csv_file("ratings.csv")
 val urban_movies = urban_get_csv_file("movies.csv")
 
+val urban_res1 = process_ratings(urban_ratings)
+val urban_rat_elems = List(("1","1"), ("1","3"), ("1","6"), ("1","47"))
 
-assert(process_ratings(urban_ratings).length == 48580)
+assert(urban_res1.length == 48580)
+assert(urban_rat_elems.forall(urban_res1.contains(_)))
 
 assert(process_movies(urban_movies).length == 9742)
-
-