Skip to content

Commit

Permalink
Chore/deploy lib on sonatype (#2)
Browse files Browse the repository at this point in the history
* chore: add deployment configuration with sonatype

* chore: add all publishing info

* doc: update README with installation instructions

* style: format file

* doc: update deployment section

* chore: add felix email

* doc: update readme

* fix: use good Thomas Bony information

* doc: add team proton to contributors

Co-authored-by: Quentin Nambot <[email protected]>
Co-authored-by: Félix MARSAULT <[email protected]>
  • Loading branch information
3 people authored Mar 18, 2022
1 parent c82708e commit 99d2dd8
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 6 deletions.
45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -52,10 +52,20 @@ To use **SparkTest** in an existing maven or sbt project:
### Maven

> WIP
```xml
<dependency>
<groupId>com.bedrockstreaming</groupId>
<artifactId>sparktest_2.12</artifactId>
<version>0.1.0</version>
<scope>test</scope>
</dependency>
```

### SBT

> WIP
```scala
libraryDependencies += "com.bedrockstreaming" % "sparktest_2.12" % "0.1.0" % "test"
```

## Tools
### SparkTestSupport
Expand Down Expand Up @@ -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=<username>
password=<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:
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
38 changes: 38 additions & 0 deletions publish.sbt
Original file line number Diff line number Diff line change
@@ -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:[email protected]:BedrockStreaming/sparktest.git")
)

ThisBuild / developers := List(
Developer(id = "tbony", name = "Thomas BONY", email = "[email protected]", url = url("https://github.com/tbony")),
Developer(
id = "fmarsault",
name = "Félix MARSAULT",
email = "[email protected]",
url = url("https://github.com/fmarsault")
),
Developer(
id = "rinzool",
name = "Quentin NAMBOT",
email = "[email protected]",
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

0 comments on commit 99d2dd8

Please sign in to comment.