Skip to content
This repository has been archived by the owner on Apr 8, 2021. It is now read-only.

Commit

Permalink
Make brushfire buildable in both 2.10 and 2.11
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmarc committed Feb 13, 2015
1 parent f4560d8 commit 11a90ef
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 29 deletions.
9 changes: 4 additions & 5 deletions brushfire-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>com.stripe</groupId>
<artifactId>brushfire-core</artifactId>
<artifactId>brushfire-core_${scala.binary.version}</artifactId>
<packaging>jar</packaging>

<parent>
Expand All @@ -19,15 +19,15 @@
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>algebird-core_2.10</artifactId>
<artifactId>algebird-core_${scala.binary.version}</artifactId>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>chill-bijection_2.10</artifactId>
<artifactId>chill-bijection_${scala.binary.version}</artifactId>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>bijection-json_2.10</artifactId>
<artifactId>bijection-json_${scala.binary.version}</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
Expand All @@ -42,5 +42,4 @@
<artifactId>jackson-jaxrs</artifactId>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ case class BrierScoreError[L, M](implicit num: Numeric[M])
}
}

case class BinnedBinaryError[M: Monoid]
case class BinnedBinaryError[M: Monoid]()
extends FrequencyError[Boolean, M, Map[Int, (M, M)]] {
lazy val monoid = implicitly[Monoid[Map[Int, (M, M)]]]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ case class MinWeightEvaluator[V, L, W: Monoid](minWeight: W => Boolean, wrapped:
}
}

case class EmptySplit[V, P] extends Split[V, P] {
case class EmptySplit[V, P]() extends Split[V, P] {
val predicates = Nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ case class QTreeSplitter[T: Monoid](k: Int)
}
}

case class SparseBooleanSplitter[T: Group]
case class SparseBooleanSplitter[T: Group]()
extends Splitter[Boolean, T] {

type S = T
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ trait FrequencyVoter[L, M] extends Voter[Map[L, M], Map[L, Double]] {
}
}

case class SoftVoter[L, M: Numeric] extends FrequencyVoter[L, M] {
case class SoftVoter[L, M: Numeric]() extends FrequencyVoter[L, M] {
def combine(targets: Iterable[Map[L, M]]) =
if (targets.isEmpty)
Map.empty[L, Double]
else
Monoid.sum(targets.map { m => normalize(m) }).mapValues { _ / targets.size }
}

case class ModeVoter[L, M: Ordering] extends FrequencyVoter[L, M] {
case class ModeVoter[L, M: Ordering]() extends FrequencyVoter[L, M] {
def mode(m: Map[L, M]): L = m.maxBy { _._2 }._1

def combine(targets: Iterable[Map[L, M]]) =
Expand Down
6 changes: 3 additions & 3 deletions brushfire-finatra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>com.stripe</groupId>
<artifactId>brushfire-finatra</artifactId>
<artifactId>brushfire-finatra_${scala.binary.version}</artifactId>
<packaging>jar</packaging>

<parent>
Expand All @@ -19,11 +19,11 @@
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finatra_2.10</artifactId>
<artifactId>finatra_${scala.binary.version}</artifactId>
</dependency>
<dependency>
<groupId>com.stripe</groupId>
<artifactId>brushfire-core</artifactId>
<artifactId>brushfire-core_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
Expand Down
20 changes: 11 additions & 9 deletions brushfire-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,25 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<scala.version>2.11.4</scala.version>
<scala.binary.version>2.11</scala.binary.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.10.4</version>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>scalding-core_2.10</artifactId>
<version>0.12.0</version>
<artifactId>scalding-core_${scala.binary.version}</artifactId>
<version>0.13.1</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>algebird-core_2.10</artifactId>
<artifactId>algebird-core_${scala.binary.version}</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
Expand All @@ -37,12 +39,12 @@
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>chill-bijection_2.10</artifactId>
<version>0.4.0</version>
<artifactId>chill-bijection_${scala.binary.version}</artifactId>
<version>0.5.2</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>bijection-json_2.10</artifactId>
<artifactId>bijection-json_${scala.binary.version}</artifactId>
<version>0.7.0</version>
</dependency>
<dependency>
Expand All @@ -62,7 +64,7 @@
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finatra_2.10</artifactId>
<artifactId>finatra_${scala.binary.version}</artifactId>
<version>1.6.0</version>
</dependency>
</dependencies>
Expand Down Expand Up @@ -144,7 +146,7 @@
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.1.5</version>
<version>3.2.0</version>
<configuration>
<recompileMode>incremental</recompileMode>
<useZincServer>true</useZincServer>
Expand Down
14 changes: 7 additions & 7 deletions brushfire-scalding/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>com.stripe</groupId>
<artifactId>brushfire-scalding</artifactId>
<artifactId>brushfire-scalding_${scala.binary.version}</artifactId>
<packaging>jar</packaging>

<parent>
Expand All @@ -19,15 +19,15 @@
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>scalding-core_2.10</artifactId>
<artifactId>scalding-core_${scala.binary.version}</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
</dependency>
<dependency>
<groupId>com.stripe</groupId>
<artifactId>brushfire-core</artifactId>
<artifactId>brushfire-core_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
Expand Down

0 comments on commit 11a90ef

Please sign in to comment.