diff --git a/README.md b/README.md index a4e8cc9..dd2f31e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SparkTest +# SparkTest - 0.1.0 **SparkTest** is a Scala library for unit testing with [Spark](https://github.com/apache/spark). For now, it is only made for DataFrames. @@ -52,10 +52,20 @@ To use **SparkTest** in an existing maven or sbt project: ### Maven > WIP +```xml + + com.bedrockstreaming + sparktest_2.12 + 0.1.0 + test + +``` ### SBT -> WIP +```scala +libraryDependencies += "com.bedrockstreaming" % "sparktest_2.12" % "0.1.0" % "test" +``` ## Tools ### SparkTestSupport @@ -181,3 +191,34 @@ We use [SemVer](http://semver.org/) for versioning (version number MAJOR.MINOR.P * MAJOR: incompatible changes needing data catch-up * MINOR: every changes other than bugfixes * PATCH: bugfix + +### Deployment +Currently the deployment is manually handled by maintainers. +We use [Sonatype](https://central.sonatype.org/publish/publish-guide/#deployment) to publish and host artifacts along +with the plugin [sbt-sonatype](https://github.com/xerial/sbt-sonatype). + +To become an authorized member: +* Create a Sonatype account: https://issues.sonatype.org/secure/Signup!default.jspa +* Ask a maintainer to [add your username](https://central.sonatype.org/publish/manage-permissions/) in authorized member of the application +* Create a file `$HOME/.sbt/1.0/plugins/gpg.sbt` with content `addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")` +` +* Create a file `$HOME/.sbt/sonatype_credentials` with content: +```sonatypeBundleRelease +realm=Sonatype Nexus Repository Manager +host=s01.oss.sonatype.org +user= +password= +``` +* Create a file `$HOME/.sbt/1.0/sonatype.sbt` + +```scala +credentials += Credentials(Path.userHome / ".sbt" / "sonatype_credentials") +``` +* Finally run the command `sbt publishSigned` to publish a new release or snapshot + +### Contributors + +* [Thomas Bony](https://github.com/tbony) +* [Felix Marsault](https://github.com/fmarsault) +* [Quentin Nambot](https://github.com/rinzool) +* Team Proton with :heart: diff --git a/build.sbt b/build.sbt index b13539f..0247c5f 100644 --- a/build.sbt +++ b/build.sbt @@ -1,18 +1,18 @@ -ThisBuild / organization := "com.bedrocksreaming.data" +ThisBuild / organization := "com.bedrockstreaming" ThisBuild / version := "0.1.0" ThisBuild / scalaVersion := "2.12.11" // ******** // Versions // ******** - val SparkVersion = "3.2.1" +val ScalacticVersion = "3.2.11" // ************ // Dependencies // ************ -libraryDependencies += "org.scalactic" %% "scalactic" % "3.2.11" -libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.11" % "test" +libraryDependencies += "org.scalactic" %% "scalactic" % ScalacticVersion +libraryDependencies += "org.scalatest" %% "scalatest" % ScalacticVersion % "test" libraryDependencies ++= Seq( "org.apache.spark" %% "spark-core" % SparkVersion, diff --git a/publish.sbt b/publish.sbt new file mode 100644 index 0000000..a20366a --- /dev/null +++ b/publish.sbt @@ -0,0 +1,38 @@ +ThisBuild / organizationName := "bedrockstreaming" +ThisBuild / organizationHomepage := Some(url("https://github.com/BedrockStreaming/")) + +ThisBuild / scmInfo := Some( + ScmInfo(url("https://github.com/BedrockStreaming/sparktest"), "scm:git@github.com:BedrockStreaming/sparktest.git") +) + +ThisBuild / developers := List( + Developer(id = "tbony", name = "Thomas BONY", email = "t.bony92@gmail.com", url = url("https://github.com/tbony")), + Developer( + id = "fmarsault", + name = "FĂ©lix MARSAULT", + email = "felix.marsault@gmail.com", + url = url("https://github.com/fmarsault") + ), + Developer( + id = "rinzool", + name = "Quentin NAMBOT", + email = "qnambot@gmail.com", + url = url("https://github.com/rinzool") + ) +) + +ThisBuild / description := "A testing tool for Scala and Spark developers ." + +ThisBuild / licenses := List( + "MIT License" -> new URL("https://github.com/BedrockStreaming/sparktest/blob/main/LICENSE") +) +ThisBuild / homepage := Some(url("https://github.com/BedrockStreaming/sparktest/")) + +ThisBuild / pomIncludeRepository := { _ => false } + +ThisBuild / publishTo := { + val nexus = "https://s01.oss.sonatype.org/" + if (isSnapshot.value) Some("snapshots".at(nexus + "content/repositories/snapshots")) + else Some("releases".at(nexus + "content/repositories/releases/")) +} +ThisBuild / publishMavenStyle := true