<commit_before>import sbt._
import sbt.Keys._

object MyBuild extends Build {

  override lazy val settings = super.settings ++ Seq(
    name := "spire",
    organization := "org.spire-math",
    version := "0.3.0-M3",

    scalaVersion := "2.10.0-RC1",
    scalaBinaryVersion := "2.10.0-RC1",

    licenses := Seq("BSD-style" -> url("http://opensource.org/licenses/MIT")),
    homepage := Some(url("http://spire-math.org")),

    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "1.8" % "test",
      "org.scala-lang" % "scala-reflect" % "2.10.0-RC1"
    ),

    scalacOptions ++= Seq(
      "-Yinline-warnings",
      "-deprecation",
      "-unchecked",
      "-optimize",
      "-feature"
    ),

    publishMavenStyle := true,
    publishArtifact in Test := false,
    pomIncludeRepository := { _ => false },

    publishTo <<= version {
      (v: String) =>
      val nexus = "https://oss.sonatype.org/"
      if (v.trim.endsWith("SNAPSHOT")) 
        Some("snapshots" at nexus + "content/repositories/snapshots") 
      else
        Some("releases"  at nexus + "service/local/staging/deploy/maven2")
    },

    pomExtra := (
<scm>
  <url>git@github.com:non/spire.git</url>
  <connection>scm:git:git@github.com:non/spire.git</connection>
</scm>
<developers>
  <developer>
    <id>d_m</id>
    <name><NAME></name>
    <url>http://github.com/non/</url>
  </developer>
  <developer>
    <id>tixxit</id>
    <name><NAME></name>
    <url>http://github.com/tixxit/</url>
  </developer>
</developers>

    )
  )

  val key = AttributeKey[Boolean]("javaOptionsPatched")

  lazy val spire = Project("spire", file("."))

  lazy val examples = Project("examples", file("examples")).
    settings(examplesSettings: _*).
    dependsOn(spire)

  def examplesSettings = Seq(
    //scalacOptions ++= Seq("-Ymacro-debug-lite"),
    resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",

    libraryDependencies ++= Seq(
      "com.chuusai" % "shapeless_2.10.0-RC1" % "1.2.3-SNAPSHOT"
    )
  )

  lazy val benchmark:Project = Project("benchmark", file("benchmark")).
    settings(benchmarkSettings: _*).
    dependsOn(spire)

  def benchmarkSettings = Seq(
    // raise memory limits here if necessary
    // TODO: this doesn't seem to be working with caliper at the moment :(
  
    javaOptions in run += "-Xmx4G",

    libraryDependencies ++= Seq(
      "com.google.guava" % "guava" % "r09",
      "com.google.code.java-allocation-instrumenter" % "java-allocation-instrumenter" % "2.0",
      "com.google.code.caliper" % "caliper" % "1.0-SNAPSHOT" from "http://n0d.es/jars/caliper-1.0-SNAPSHOT.jar",
      "com.google.code.gson" % "gson" % "1.7.1"
    ),

    // enable forking in run
    fork in run := true,

    // custom kludge to get caliper to see the right classpath

    // we need to add the runtime classpath as a "-cp" argument to the
    // `javaOptions in run`, otherwise caliper will not see the right classpath
    // and die with a ConfigurationException unfortunately `javaOptions` is a<commit_msg>Add benchmark comparing Spire, Apfloat, and JScience<commit_after>import sbt._
import sbt.Keys._

object MyBuild extends Build {

  override lazy val settings = super.settings ++ Seq(
    name := "spire",
    organization := "org.spire-math",
    version := "0.3.0-M3",

    scalaVersion := "2.10.0-RC1",
    scalaBinaryVersion := "2.10.0-RC1",

    licenses := Seq("BSD-style" -> url("http://opensource.org/licenses/MIT")),
    homepage := Some(url("http://spire-math.org")),

    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "1.8" % "test",
      "org.scala-lang" % "scala-reflect" % "2.10.0-RC1"
    ),

    scalacOptions ++= Seq(
      "-Yinline-warnings",
      "-deprecation",
      "-unchecked",
      "-optimize",
      "-feature"
    ),

    publishMavenStyle := true,
    publishArtifact in Test := false,
    pomIncludeRepository := { _ => false },

    publishTo <<= version {
      (v: String) =>
      val nexus = "https://oss.sonatype.org/"
      if (v.trim.endsWith("SNAPSHOT")) 
        Some("snapshots" at nexus + "content/repositories/snapshots") 
      else
        Some("releases"  at nexus + "service/local/staging/deploy/maven2")
    },

    pomExtra := (
<scm>
  <url>git<EMAIL>:non/spire.git</url>
  <connection>scm:git:git@github.com:non/spire.git</connection>
</scm>
<developers>
  <developer>
    <id>d_m</id>
    <name><NAME></name>
    <url>http://github.com/non/</url>
  </developer>
  <developer>
    <id>tixxit</id>
    <name><NAME></name>
    <url>http://github.com/tixxit/</url>
  </developer>
</developers>

    )
  )

  val key = AttributeKey[Boolean]("javaOptionsPatched")

  lazy val spire = Project("spire", file("."))

  lazy val examples = Project("examples", file("examples")).
    settings(examplesSettings: _*).
    dependsOn(spire)

  def examplesSettings = Seq(
    //scalacOptions ++= Seq("-Ymacro-debug-lite"),
    resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",

    libraryDependencies ++= Seq(
      "com.chuusai" % "shapeless_2.10.0-RC1" % "1.2.3-SNAPSHOT"
    )
  )

  lazy val benchmark:Project = Project("benchmark", file("benchmark")).
    settings(benchmarkSettings: _*).
    dependsOn(spire)

  def benchmarkSettings = Seq(
    // raise memory limits here if necessary
    // TODO: this doesn't seem to be working with caliper at the moment :(
  
    javaOptions in run += "-Xmx4G",

    libraryDependencies ++= Seq(
      // comparisons
      "org.apfloat" % "apfloat" % "1.6.3",
      "org.jscience" % "jscience" % "4.3.1",

      // caliper stuff
      "com.google.guava" % "guava" % "r09",
      "com.google.code.java-allocation-instrumenter" % "java-allocation-instrumenter" % "2.0",
      "com.google.code.caliper" % "caliper" % "1.0-SNAPSHOT" from "http://n0d.es/jars/caliper-1.0-SNAPSHOT.jar",
      "com.google.code.gson" % "gson" % "1.7.1"
    ),

    // enable forking in run
    fork in run := true,

    // custom kludge to get caliper to see the right classpath

    // we need to add the runtime classpath as a "-cp" argument to the
    // `javaOptions in run`, otherwise caliper will not see the right classpath
    // and die with a ConfigurationException unfortunately `javaOptions` is a
{'fraction_non_alphanumeric': 0.16735340729001585, 'fraction_numerical': 0.014580031695721078, 'mean_word_length': 2.900494437577256, 'pattern_counts': {'":': 0, '<': 60, '<?xml version=': 0, '>': 62, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, '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': '6496655', 'n_tokens_mistral': 2303, 'n_tokens_neox': 2200, 'n_words': 450}