Skip to content

Commit

Permalink
Update dependencies. Update scalatest imports removing deprecated one…
Browse files Browse the repository at this point in the history
…s. Update some links in the docs (typelevel#407)
  • Loading branch information
vejeta authored and imarios committed Jan 14, 2020
1 parent e1cf3ad commit d3afa1d
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 22 deletions.
18 changes: 9 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ val sparkVersion = "2.4.4"
val catsCoreVersion = "2.0.0"
val catsEffectVersion = "2.0.0"
val catsMtlVersion = "0.7.0"
val scalatest = "3.0.5"
val scalatest = "3.0.8"
val shapeless = "2.3.3"
val scalacheck = "1.14.3"
val irrecVersion = "0.2.1"
Expand All @@ -23,7 +23,7 @@ lazy val cats = project
.settings(framelessSettings: _*)
.settings(publishSettings: _*)
.settings(
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.10.3"),
addCompilerPlugin("org.typelevel" % "kind-projector" % "0.11.0" cross CrossVersion.full),
scalacOptions += "-Ypartial-unification"
)
.settings(libraryDependencies ++= Seq(
Expand Down Expand Up @@ -65,15 +65,16 @@ lazy val ml = project
lazy val docs = project
.settings(framelessSettings: _*)
.settings(noPublishSettings: _*)
.settings(tutSettings: _*)
.settings(scalacOptions --= Seq("-Xfatal-warnings"))
.enablePlugins(TutPlugin)
.settings(crossTarget := file(".") / "docs" / "target")
.settings(libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % sparkVersion,
"org.apache.spark" %% "spark-sql" % sparkVersion,
"org.apache.spark" %% "spark-mllib" % sparkVersion
))
.settings(
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.10.3"),
addCompilerPlugin("org.typelevel" % "kind-projector" % "0.11.0" cross CrossVersion.full),
scalacOptions ++= Seq(
"-Ypartial-unification",
"-Ydelambdafy:inline"
Expand All @@ -83,7 +84,7 @@ lazy val docs = project

lazy val framelessSettings = Seq(
organization := "org.typelevel",
crossScalaVersions := Seq("2.11.12", "2.12.8"),
crossScalaVersions := Seq("2.11.12", "2.12.10"),
scalaVersion := crossScalaVersions.value.last,
scalacOptions ++= commonScalacOptions(scalaVersion.value),
licenses += ("Apache-2.0", url("http:https://opensource.org/licenses/Apache-2.0")),
Expand Down Expand Up @@ -157,7 +158,6 @@ lazy val framelessTypedDatasetREPL = Seq(
)

lazy val publishSettings = Seq(
useGpg := true,
publishMavenStyle := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
Expand Down Expand Up @@ -210,8 +210,8 @@ lazy val publishSettings = Seq(
)

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

Expand All @@ -228,5 +228,5 @@ lazy val copyReadme = taskKey[Unit]("copy for website generation")
lazy val copyReadmeImpl = Def.task {
val from = baseDirectory.value / "README.md"
val to = baseDirectory.value / "docs" / "src" / "main" / "tut" / "README.md"
sbt.IO.copy(List((from, to)), overwrite = true, preserveLastModified = true)
sbt.IO.copy(List((from, to)), overwrite = true, preserveLastModified = true, preserveExecutable = true)
}
7 changes: 3 additions & 4 deletions cats/src/test/scala/frameless/cats/test.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ import org.apache.spark.{SparkConf, SparkContext => SC}

import org.scalatest.compatible.Assertion
import org.scalactic.anyvals.PosInt
import org.scalatest.Matchers
import org.scalatest.{Matchers, PropSpec}
import org.scalacheck.Arbitrary
import org.scalatest._
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
import Arbitrary._
import prop._

import scala.collection.immutable.SortedMap
import scala.reflect.ClassTag
Expand Down Expand Up @@ -63,7 +62,7 @@ object Tests {
}
}

class Test extends PropSpec with Matchers with PropertyChecks with SparkTests {
class Test extends PropSpec with Matchers with ScalaCheckPropertyChecks with SparkTests {
implicit override val generatorDrivenConfig =
PropertyCheckConfiguration(minSize = PosInt(10))

Expand Down
4 changes: 2 additions & 2 deletions dataset/src/test/scala/frameless/JobTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package frameless

import org.scalacheck.Arbitrary
import org.scalatest.{BeforeAndAfterAll, FreeSpec, Matchers}
import org.scalatest.prop.GeneratorDrivenPropertyChecks
import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks


class JobTests extends FreeSpec with BeforeAndAfterAll with SparkTesting with GeneratorDrivenPropertyChecks with Matchers {
class JobTests extends FreeSpec with BeforeAndAfterAll with SparkTesting with ScalaCheckDrivenPropertyChecks with Matchers {

"map" - {
"identity" in {
Expand Down
2 changes: 1 addition & 1 deletion dataset/src/test/scala/frameless/TypedDatasetSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.apache.spark.{SparkConf, SparkContext}
import org.apache.spark.sql.{SQLContext, SparkSession}
import org.scalactic.anyvals.PosZInt
import org.scalatest.{BeforeAndAfterAll, FunSuite}
import org.scalatest.prop.Checkers
import org.scalatestplus.scalacheck.Checkers
import org.scalacheck.Prop
import org.scalacheck.Prop._
import scala.util.{Properties, Try}
Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/tut/TypedDataFrame.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def join2(tf1: TypedDataFrame[Foo], tf2: TypedDataFrame[Bar])
tf1.innerJoin(tf2).using('i)
```

Further example are available in the [TypedDataFrame join tests.](../dataframe/src/test/scala/JoinTests.scala)
Further example are available in the [TypedDataFrame join tests.](https://github.com/typelevel/frameless/blob/17194d2172e75f8994e9481181e85b4c8dcc0f69/dataframe/src/test/scala/JoinTests.scala)

### Complete example

Expand Down Expand Up @@ -130,7 +130,7 @@ def bestNeighborhood
}
```

If you compare this version to vanilla Spark where every line is a `DataFrame`, you see how much types can improve readability. An executable version of this example is available in the [BestNeighborhood test](../dataframe/src/test/scala/BestNeighborhood.scala).
If you compare this version to vanilla Spark where every line is a `DataFrame`, you see how much types can improve readability. An executable version of this example is available in the [BestNeighborhood test](https://github.com/typelevel/frameless/blob/17194d2172e75f8994e9481181e85b4c8dcc0f69/dataframe/src/test/scala/BestNeighborhood.scala).

### Limitations

Expand Down
2 changes: 1 addition & 1 deletion ml/src/test/scala/frameless/ml/FramelessMlSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ml

import org.scalactic.anyvals.PosZInt
import org.scalatest.{BeforeAndAfterAll, FunSuite}
import org.scalatest.prop.Checkers
import org.scalatestplus.scalacheck.Checkers

class FramelessMlSuite extends FunSuite with Checkers with BeforeAndAfterAll with SparkTesting {
// Limit size of generated collections and number of checks because Travis
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.18
sbt.version=1.3.4
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8.1")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.8")
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.6.13")

0 comments on commit d3afa1d

Please sign in to comment.