Skip to content

Commit

Permalink
Released version 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielaSfregola committed Jan 23, 2018
1 parent 6e5151f commit 85e7f52
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ resolver += Resolver.sonatypeRepo("releases")

Also, you need to include the library as your dependency:
```scala
libraryDependencies += "com.danielasfregola" %% "random-data-generator" % "2.3"
libraryDependencies += "com.danielasfregola" %% "random-data-generator" % "2.4"

Do you wanna faster compilation times? Have a look at [random-data-generator-magnolia](https://github.com/DanielaSfregola/random-data-generator-magnolia) - experimental but crazy fast thanks to [Magnolia](https://github.com/propensive/magnolia)!
```

Usage
Expand Down Expand Up @@ -91,7 +93,7 @@ otherwise, the following message will appear:
[info] [RandomDataGenerator] No variable RANDOM_DATA_GENERATOR_SEED detected: setting seed to random number
```

Multiple Random Instances
Multiple Random Instances
-------------------------
Fixing the seed at the beginning of each session has an important side effect: when calling the function `random[T]`, we always get the same instance back.
However, sometimes we do need multiple instances of the same case class within the same test.
Expand All @@ -106,7 +108,9 @@ val examples: Seq[Example] = random[Example](2)

Improve the Compilation Time
----------------------------
This is a project that is heavily using [Shapeless](https://github.com/milessabin/shapeless), so its compilation time can be slow at times -- but think of all the magic that the compiler is doing for you!
First, have a look at [random-data-generator-magnolia](https://github.com/DanielaSfregola/random-data-generator-magnolia): although the project is still sperimental, has increased impressive speedup in the compilation by using [Magnolia](https://github.com/propensive/magnolia)'s type class derivation.

[random-data-generator](https://github.com/DanielaSfregola/random-data-generator) heavily uses [Shapeless](https://github.com/milessabin/shapeless), so its compilation time can be slow at times -- but think of all the magic that the compiler is doing for you!

To improve the compilation time, you can cache your implicit `Arbitrary` instances using `shapeless.cachedImplicit`:

Expand All @@ -129,5 +133,5 @@ resolvers += Resolver.sonatypeRepo("snapshots")

Then, add the library as your dependency:
```scala
libraryDependencies += "com.danielasfregola" %% "random-data-generator" % "2.4-SNAPSHOT"
libraryDependencies += "com.danielasfregola" %% "random-data-generator" % "2.5-SNAPSHOT"
```
12 changes: 7 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import com.typesafe.sbt.SbtGit.GitKeys._

name := "random-data-generator"
version := "2.4-SNAPSHOT"
version := "2.4"

scalaVersion := "2.12.4"

Expand All @@ -25,7 +25,8 @@ libraryDependencies ++= {
}

lazy val standardSettings = Seq(
crossScalaVersions := Seq("2.12.3", "2.11.8", "2.10.6"),
name := "random-data-generator",
crossScalaVersions := Seq("2.12.4", "2.11.8", "2.10.6"),
organization := "com.danielasfregola",
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0.html")),
homepage := Some(url("https://github.com/DanielaSfregola/random-data-generator")),
Expand All @@ -43,6 +44,10 @@ lazy val standardSettings = Seq(
</developers>
),
publishMavenStyle := true,
publishTo := {
if (version.value.trim.endsWith("SNAPSHOT")) Some(Opts.resolver.sonatypeSnapshots)
else Some(Opts.resolver.sonatypeStaging)
},
gitRemoteRepo := "git@github.com:DanielaSfregola/random-data-generator.git",
scalacOptions ++= Seq("-encoding",
"UTF-8",
Expand All @@ -65,6 +70,3 @@ lazy val standardSettings = Seq(

lazy val root = (project in file("."))
.settings(standardSettings)
.settings(
name := "random-data-generator"
)

0 comments on commit 85e7f52

Please sign in to comment.