<commit_before>import sbt._
import Keys._

object PigBuild extends Build {

  /*
   * Common Settings **********************************************************
   */
  lazy val commonSettings = Seq(
    version := "1.0",
    scalaVersion := "2.11.7",
    organization := "dbis",
    unmanagedJars in Compile += file("lib_unmanaged/jvmr_2.11-2.11.2.1.jar")
  )
  
  /*
   * Projects *****************************************************************
   */
  lazy val root = (project in file(".")).
    configs(IntegrationTest).
    settings(commonSettings: _*).
    settings(Defaults.itSettings: _*).
    dependsOn(common).
    dependsOn(sparklib % "test;it").
    dependsOn(flinklib % "test;it"). 
    dependsOn(mapreduce % "test;it").
    aggregate(common, sparklib, flinklib, mapreduce) // remove this if you don't want to automatically build these projects when building piglet 

  lazy val common = (project in file("common")).
    settings(commonSettings: _*)

  lazy val sparklib = (project in file("sparklib")).
    settings(commonSettings: _*).
    dependsOn(common)

  lazy val flinklib = (project in file("flinklib")).
    settings(commonSettings: _*).
    dependsOn(common)

  lazy val mapreduce = (project in file("mapreduce")).
    settings(commonSettings: _*).
    dependsOn(common)
        
  lazy val zeppelin = (project in file("zeppelin")).
    settings(commonSettings: _*).
    dependsOn(common).
    dependsOn(root)

  /*
   * define the backend for the compiler: currently we support spark and flink
   */
  val backend = sys.props.getOrElse("backend", default="spark")
  
  val itDeps = backend match {
    case "flink" | "flinks" => Seq(Dependencies.flinkDist % "test;it" from Dependencies.flinkAddress)
    case "spark" | "sparks" => Seq(
      Dependencies.sparkCore % "test;it",
      Dependencies.sparkSql % "test;it",
      Dependencies.h2Database % "test;it"
    )
    case "mapreduce" => Seq(Dependencies.pig % "test;it")
    case _ => println(s"Unsupported backend: $backend ! I don't know which dependencies to include!"); Seq.empty[ModuleID]
  }
  
  val itTests = backend match{
    case "flink" => Seq("dbis.test.spark.SparkCompileIt")
    case "flinks" => Seq("dbis.test.flink.FlinksCompileIt")
    case "spark" => Seq("dbis.test.spark.SparkCompileIt")
    case "mapreduce" => Seq.empty[String] // TODO
    case _ => println(s"Unsupported backend: $backend - Will execute no tests"); Seq.empty[String]
  }
}

/*
 * Dependencies
 */
object Dependencies {
  // Libraries
  val scalaLib = "org.scala-lang" % "scala-library" %  "2.11.7"
  val scalaCompiler = "org.scala-lang" % "scala-compiler" %  "2.11.7"
  val scalaTest = "org.scalatest" %% "scalatest" % "2.2.0"
  val scalaParserCombinators = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.3"
  val scalaIoFile = "com.github.scala-incubator.io" %% "scala-io-file" % "0.4.3-1"<commit_msg>Fix the backend → integration test mapping<commit_after>import sbt._
import Keys._

object PigBuild extends Build {

  /*
   * Common Settings **********************************************************
   */
  lazy val commonSettings = Seq(
    version := "1.0",
    scalaVersion := "2.11.7",
    organization := "dbis",
    unmanagedJars in Compile += file("lib_unmanaged/jvmr_2.11-2.11.2.1.jar")
  )
  
  /*
   * Projects *****************************************************************
   */
  lazy val root = (project in file(".")).
    configs(IntegrationTest).
    settings(commonSettings: _*).
    settings(Defaults.itSettings: _*).
    dependsOn(common).
    dependsOn(sparklib % "test;it").
    dependsOn(flinklib % "test;it"). 
    dependsOn(mapreduce % "test;it").
    aggregate(common, sparklib, flinklib, mapreduce) // remove this if you don't want to automatically build these projects when building piglet 

  lazy val common = (project in file("common")).
    settings(commonSettings: _*)

  lazy val sparklib = (project in file("sparklib")).
    settings(commonSettings: _*).
    dependsOn(common)

  lazy val flinklib = (project in file("flinklib")).
    settings(commonSettings: _*).
    dependsOn(common)

  lazy val mapreduce = (project in file("mapreduce")).
    settings(commonSettings: _*).
    dependsOn(common)
        
  lazy val zeppelin = (project in file("zeppelin")).
    settings(commonSettings: _*).
    dependsOn(common).
    dependsOn(root)

  /*
   * define the backend for the compiler: currently we support spark and flink
   */
  val backend = sys.props.getOrElse("backend", default="spark")
  
  val itDeps = backend match {
    case "flink" | "flinks" => Seq(Dependencies.flinkDist % "test;it" from Dependencies.flinkAddress)
    case "spark" | "sparks" => Seq(
      Dependencies.sparkCore % "test;it",
      Dependencies.sparkSql % "test;it",
      Dependencies.h2Database % "test;it"
    )
    case "mapreduce" => Seq(Dependencies.pig % "test;it")
    case _ => println(s"Unsupported backend: $backend ! I don't know which dependencies to include!"); Seq.empty[ModuleID]
  }
  
  val itTests = backend match{
    case "flink" => Seq("dbis.test.flink.FlinkCompileIt")
    case "flinks" => Seq("dbis.test.flink.FlinksCompileIt")
    case "spark" => Seq("dbis.test.spark.SparkCompileIt")
    case "mapreduce" => Seq.empty[String] // TODO
    case _ => println(s"Unsupported backend: $backend - Will execute no tests"); Seq.empty[String]
  }
}

/*
 * Dependencies
 */
object Dependencies {
  // Libraries
  val scalaLib = "org.scala-lang" % "scala-library" %  "2.11.7"
  val scalaCompiler = "org.scala-lang" % "scala-compiler" %  "2.11.7"
  val scalaTest = "org.scalatest" %% "scalatest" % "2.2.0"
  val scalaParserCombinators = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.3"
  val scalaIoFile = "com.github.scala-incubator.io" %% "scala-io-file" % "0.4.3-1"
{'fraction_non_alphanumeric': 0.18415159345391904, 'fraction_numerical': 0.011369509043927648, 'mean_word_length': 3.6115965051628276, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3905892', 'n_tokens_mistral': 1989, 'n_tokens_neox': 1905, 'n_words': 419}