<commit_before>import sbt._
import Keys._

lazy val compilerOptions = Seq(
  "-target:jvm-1.8",
  "-deprecation",
  "-feature",
  "-unchecked",
  "-language:existentials",
  "-language:higherKinds",
  "-language:implicitConversions",
  "-Yno-adapted-args",
  "-Ywarn-dead-code",
  "-Ywarn-numeric-widen",
  "-Ywarn-unused-import",
  "-Xfuture"
)

lazy val resolutionRepos = Seq(
  // For Snowplow
  "Snowplow Analytics Maven releases repo" at "http://maven.snplow.com/releases/",
  // For ua-parser
  "user-agent-parser repo"                 at "https://clojars.org/repo/"
)

// we fork a JVM per test in order to not reuse enrichment registries
import Tests._
{
  def oneJVMPerTest(tests: Seq[TestDefinition]) =
    tests.map(t => new Group(t.name, Seq(t), SubProcess(ForkOptions()))).toSeq
  testGrouping in Test := oneJVMPerTest((definedTests in Test).value)
}

lazy val commonSettings = Defaults.coreDefaultSettings ++ Seq(
  organization  := "com.snowplowanalytics",
  version       := "0.1.0",
  scalaVersion  := "2.11.12",
  javacOptions  ++= Seq("-source", "1.8", "-target", "1.8"),
  scalacOptions ++= compilerOptions,
   scalacOptions in (Compile, console) ~= {
    _.filterNot(Set("-Ywarn-unused-import"))
  },
  scalacOptions in (Test, console) ~= {
    _.filterNot(Set("-Ywarn-unused-import"))
  },
  resolvers     ++= resolutionRepos
)

lazy val paradiseDependency =
  "org.scalamacros" % "paradise" % scalaMacrosVersion cross CrossVersion.full
lazy val macroSettings = Seq(
  libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value,
  addCompilerPlugin(paradiseDependency)
)

lazy val noPublishSettings = Seq(
  publish := {},
  publishLocal := {},
  publishArtifact := false
)

import com.typesafe.sbt.packager.docker._
dockerRepository := Some("snowplow-docker-registry.bintray.io")
dockerUsername := Some("snowplow")
dockerBaseImage := "snowplow-docker-registry.bintray.io/snowplow/base-debian:0.1.0"
maintainer in Docker := "Snowplow Analytics Ltd. <<EMAIL>>"
daemonUser in Docker := "snowplow"

lazy val scioVersion = "0.6.0"
lazy val beamVersion = "2.5.0"
lazy val sceVersion = "0.35.0"
lazy val scalaMacrosVersion = "2.1.0"
lazy val slf4jVersion = "1.7.25"
lazy val scalatestVersion = "3.0.5"

lazy val root: Project = Project(
  "beam-enrich",
  file(".")
).settings(
  commonSettings ++ macroSettings ++ noPublishSettings,
  description := "Streaming enrich job written using SCIO",
  buildInfoKeys := Seq[BuildInfoKey](organization, name, version, "sceVersion" -> sceVersion),
  buildInfoPackage := "com.snowplowanalytics.snowplow.enrich.beam.generated",
  libraryDependencies ++= Seq(
    "com.spotify" %% "scio-core" % scioVersion,
    "org.apache.beam" % "beam-runners-google-cloud-dataflow-java" % beamVersion,
    "com.snowplowanalytics" %% "snowplow-common-enrich" % sceVersion,
    "org.slf4j" % "slf4j-simple" % slf4jVersion
  ) ++ Seq(
    "com.spotify" %% "scio-test" % scioVersion,
    "org.scalatest" %% "scalatest" % scalatestVersion
  ).map(_ % "test")
).enablePlugins(JavaAppPackaging, BuildInfoPlugin)

lazy val repl: Project = Project(
  "repl",
  file(".repl")
).settings(
  commonSettings ++ macroSettings ++ noPublishSettings,
  description := "Scio REPL for beam-enrich",
  libraryDependencies ++= Seq(
    "com.spotify" %% "scio-repl" % scioVersion
  ),
  mainClass in Compile := Some("com.spotify.scio.repl.ScioShell")
).dependsOn(
  root
)
<commit_msg>Beam Enrich: bump scala-common-enrich to 0.36.0 (closes #3989)<commit_after>import sbt._
import Keys._

lazy val compilerOptions = Seq(
  "-target:jvm-1.8",
  "-deprecation",
  "-feature",
  "-unchecked",
  "-language:existentials",
  "-language:higherKinds",
  "-language:implicitConversions",
  "-Yno-adapted-args",
  "-Ywarn-dead-code",
  "-Ywarn-numeric-widen",
  "-Ywarn-unused-import",
  "-Xfuture"
)

lazy val resolutionRepos = Seq(
  // For Snowplow
  "Snowplow Analytics Maven releases repo" at "http://maven.snplow.com/releases/",
  // For ua-parser
  "user-agent-parser repo"                 at "https://clojars.org/repo/"
)

// we fork a JVM per test in order to not reuse enrichment registries
import Tests._
{
  def oneJVMPerTest(tests: Seq[TestDefinition]) =
    tests.map(t => new Group(t.name, Seq(t), SubProcess(ForkOptions()))).toSeq
  testGrouping in Test := oneJVMPerTest((definedTests in Test).value)
}

lazy val commonSettings = Defaults.coreDefaultSettings ++ Seq(
  organization  := "com.snowplowanalytics",
  version       := "0.1.0",
  scalaVersion  := "2.11.12",
  javacOptions  ++= Seq("-source", "1.8", "-target", "1.8"),
  scalacOptions ++= compilerOptions,
   scalacOptions in (Compile, console) ~= {
    _.filterNot(Set("-Ywarn-unused-import"))
  },
  scalacOptions in (Test, console) ~= {
    _.filterNot(Set("-Ywarn-unused-import"))
  },
  resolvers     ++= resolutionRepos
)

lazy val paradiseDependency =
  "org.scalamacros" % "paradise" % scalaMacrosVersion cross CrossVersion.full
lazy val macroSettings = Seq(
  libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value,
  addCompilerPlugin(paradiseDependency)
)

lazy val noPublishSettings = Seq(
  publish := {},
  publishLocal := {},
  publishArtifact := false
)

import com.typesafe.sbt.packager.docker._
dockerRepository := Some("snowplow-docker-registry.bintray.io")
dockerUsername := Some("snowplow")
dockerBaseImage := "snowplow-docker-registry.bintray.io/snowplow/base-debian:0.1.0"
maintainer in Docker := "Snowplow Analytics Ltd. <<EMAIL>>"
daemonUser in Docker := "snowplow"

lazy val scioVersion = "0.6.0"
lazy val beamVersion = "2.5.0"
lazy val sceVersion = "0.36.0"
lazy val scalaMacrosVersion = "2.1.0"
lazy val slf4jVersion = "1.7.25"
lazy val scalatestVersion = "3.0.5"

lazy val root: Project = Project(
  "beam-enrich",
  file(".")
).settings(
  commonSettings ++ macroSettings ++ noPublishSettings,
  description := "Streaming enrich job written using SCIO",
  buildInfoKeys := Seq[BuildInfoKey](organization, name, version, "sceVersion" -> sceVersion),
  buildInfoPackage := "com.snowplowanalytics.snowplow.enrich.beam.generated",
  libraryDependencies ++= Seq(
    "com.spotify" %% "scio-core" % scioVersion,
    "org.apache.beam" % "beam-runners-google-cloud-dataflow-java" % beamVersion,
    "com.snowplowanalytics" %% "snowplow-common-enrich" % sceVersion,
    "org.slf4j" % "slf4j-simple" % slf4jVersion
  ) ++ Seq(
    "com.spotify" %% "scio-test" % scioVersion,
    "org.scalatest" %% "scalatest" % scalatestVersion
  ).map(_ % "test")
).enablePlugins(JavaAppPackaging, BuildInfoPlugin)

lazy val repl: Project = Project(
  "repl",
  file(".repl")
).settings(
  commonSettings ++ macroSettings ++ noPublishSettings,
  description := "Scio REPL for beam-enrich",
  libraryDependencies ++= Seq(
    "com.spotify" %% "scio-repl" % scioVersion
  ),
  mainClass in Compile := Some("com.spotify.scio.repl.ScioShell")
).dependsOn(
  root
)

{'fraction_non_alphanumeric': 0.15484993475424097, 'fraction_numerical': 0.013049151805132666, 'mean_word_length': 4.225757575757576, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '2336930', 'n_tokens_mistral': 2580, 'n_tokens_neox': 2488, 'n_words': 495}