-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from ovotech/sonatype-move
Sonatype move
- Loading branch information
Showing
44 changed files
with
479 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,47 @@ | ||
# effect-utils | ||
# natchez-extras | ||
|
||
[ ![Download](https://api.bintray.com/packages/ovotech/maven/natchez-datadog/images/download.svg) ](https://bintray.com/ovotech/maven/logging/_latestVersion) | ||
This repository consists of a number of additional integrations for [Natchez](https://github.com/tpolecat/natchez), | ||
primarily to assist with integrating Natchez & Datadog. Separate to the Natchez integrations but included here for simplicity | ||
is a module to send metrics to Datadog over UDP with FS2. | ||
|
||
This repository consists of a number of type classes which add behaviours to a generic `F[_]` type in your cats-effect projects. | ||
Each type class will be deployed to bintray as an independent jar to minimise transitive dependency issues if you only | ||
want to use some of the library. | ||
## Migration from effect-utils | ||
|
||
To create a release, push a tag to master of the format `x.y.z`. See the [semantic versioning guide](https://semver.org/) | ||
for details of how to choose a version number. | ||
For historical reasons prior to 4.0.0 this repository was called `effect-utils`. | ||
If you're upgrading your dependencies the renamings are as follows: | ||
|
||
``` | ||
"com.ovoenergy.effect" % "datadog-metrics" => "com.ovoenergy" % "natchez-extras-dogstatsd" | ||
"com.ovoenergy.effect" % "natchez-datadog" => "com.ovoenergy" % "natchez-extras-datadog" | ||
"com.ovoenergy.effect" % "natchez-doobie" => "com.ovoenergy" % "natchez-extras-doobie" | ||
"com.ovoenergy.effect" % "natchez-slf4j" => "com.ovoenergy" % "natchez-extras-slf4j" | ||
"com.ovoenergy.effect" % "natchez-combine" => "com.ovoenergy" % "natchez-extras-combine" | ||
"com.ovoenergy.effect" % "natchez-fs2" => "com.ovoenergy" % "natchez-extras-fs2" | ||
"com.ovoenergy.effect" % "natchez-testkit" => "com.ovoenergy" % "natchez-extras-testkit" | ||
``` | ||
|
||
Other significant changes are the `Datadog` metrics object being renamed to `Dogstatsd` and the | ||
modules having their code moved into a subpackage under `com.ovoenergy.natchez.extras` | ||
|
||
i.e. | ||
|
||
`com.ovoenergy.effect.Combine` becomes `com.ovoenergy.natchez.extras.combine.Combine` | ||
|
||
This is to ensure that the `com.ovoenergy.natchez.extras` namespace won't be polluted by | ||
two modules defining, for example, a `syntax` object. | ||
|
||
## Current modules | ||
|
||
| Module | Description | Artifact | ||
----------------|--------------------------------------------------------------------------------|----------------------------------------- | ||
Datadog Metrics | Submits metrics to Datadog over UDP with FS2 | "com.ovoenergy.effect" % "datadog-metrics" | ||
Natchez Datadog | Integrates [natchez](https://github.com/tpolecat/natchez) with the Datadog APM | "com.ovoenergy.effect" % "natchez-datadog" | ||
Natchez Doobie | Integrates [natchez](https://github.com/tpolecat/natchez) with Doobie | "com.ovoenergy.effect" % "natchez-doobie" | ||
Natchez SLF4J | Integrates [natchez](https://github.com/tpolecat/natchez) with SLF4J | "com.ovoenergy.effect" % "natchez-slf4j" | ||
Natchez Combine | Provides a function to combine two Natchez `EntryPoint[F]`s together | "com.ovoenergy.effect" % "natchez-combine" | ||
Natchez FS2 | Provides an `AllocatedSpan` you submit manually for streams | "com.ovoenergy.effect" % "natchez-fs2" | ||
Natchez Testkit | Provides a `TestEntrypoint` backed by a `Ref` for unit tests | "com.ovoenergy.effect" % "natchez-testkit" | ||
Module | Description | Artifact | ||
-----------|--------------------------------------------------------------------------------|----------------------------------------- | ||
Dogstatsd | Submits metrics to Datadog over UDP with FS2 | "com.ovoenergy" % "natchez-extras-dogstatsd" | ||
Datadog | Integrates [natchez](https://github.com/tpolecat/natchez) with the Datadog APM | "com.ovoenergy" % "natchez-extras-datadog" | ||
Doobie | Integrates [natchez](https://github.com/tpolecat/natchez) with Doobie | "com.ovoenergy" % "natchez-extras-doobie" | ||
SLF4J | Integrates [natchez](https://github.com/tpolecat/natchez) with SLF4J | "com.ovoenergy" % "natchez-extras-slf4j" | ||
Combine | Provides a function to combine two Natchez `EntryPoint[F]`s together | "com.ovoenergy" % "natchez-extras-combine" | ||
FS2 | Provides an `AllocatedSpan` you submit manually for streams | "com.ovoenergy" % "natchez-extras-fs2" | ||
Testkit | Provides a `TestEntrypoint` backed by a `Ref` for unit tests | "com.ovoenergy" % "natchez-extras-testkit" | ||
|
||
### For maintainers | ||
|
||
To create a release, push a tag to master of the format `x.y.z`. See the [semantic versioning guide](https://semver.org/) | ||
for details of how to choose a version number. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,69 @@ | ||
import microsites.MicrositesPlugin.autoImport.micrositeDescription | ||
|
||
scalaVersion in ThisBuild := "2.13.4" | ||
scalaVersion in ThisBuild := "2.13.5" | ||
|
||
classLoaderLayeringStrategy in ThisBuild := ClassLoaderLayeringStrategy.ScalaLibrary | ||
|
||
organization in ThisBuild := "com.ovoenergy.effect" | ||
organization in ThisBuild := "com.ovoenergy" | ||
|
||
organizationName in ThisBuild := "OVO Energy" | ||
|
||
organizationHomepage in ThisBuild := Some(url("http://www.ovoenergy.com")) | ||
|
||
scmInfo in ThisBuild := Some( | ||
ScmInfo( | ||
url("https://github.com/ovotech/natchez-extras"), | ||
"scm:[email protected]:ovotech/natchez-extras.git" | ||
) | ||
) | ||
|
||
homepage in ThisBuild := Some(url("https://ovotech.github.io/natchez-extras/")) | ||
|
||
licenses in ThisBuild += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html")) | ||
|
||
publishMavenStyle in ThisBuild := true | ||
|
||
publishTo in ThisBuild := sonatypePublishToBundle.value | ||
|
||
developers in ThisBuild ++= List( | ||
Developer("tomverran", "Tom Verran", "[email protected]", url("https://github.com/tomverran")) | ||
) | ||
|
||
credentials in ThisBuild += ( | ||
for { | ||
user <- sys.env.get("SONATYPE_USERNAME") | ||
pass <- sys.env.get("SONATYPE_PASSWORD") | ||
} yield Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", user, pass) | ||
).getOrElse(Credentials(Path.userHome / ".sbt" / ".sonatype_credentials")) | ||
|
||
val common = Seq( | ||
fork in Test := true, | ||
bintrayRepository := "maven", | ||
bintrayOrganization := Some("ovotech"), | ||
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html")), | ||
git.useGitDescribe := true, | ||
libraryDependencies ++= Seq( | ||
compilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1"), | ||
compilerPlugin("org.typelevel" % "kind-projector" % "0.11.3" cross CrossVersion.full), | ||
"org.typelevel" %% "cats-core" % "2.3.1", | ||
"org.typelevel" %% "cats-effect" % "2.3.1", | ||
"org.scalatest" %% "scalatest" % "3.2.3" % Test, | ||
"org.scalacheck" %% "scalacheck" % "1.15.2" % Test, | ||
"org.typelevel" %% "cats-core" % "2.5.0", | ||
"org.typelevel" %% "cats-effect" % "2.4.1", | ||
"org.scalatest" %% "scalatest" % "3.2.7" % Test, | ||
"org.scalacheck" %% "scalacheck" % "1.15.3" % Test, | ||
"org.scalatestplus" %% "scalacheck-1-14" % "3.2.2.0" % Test | ||
), | ||
) | ||
|
||
lazy val metricsCommon = project | ||
.in(file("metrics-common")) | ||
.in(file("natchez-extras-metrics")) | ||
.enablePlugins(GitVersioning) | ||
.settings(common :+ (name := "metrics-common")) | ||
.settings(common :+ (name := "natchez-extras-metrics")) | ||
|
||
val log4catsVersion = "1.2.2" | ||
val natchezVersion = "0.0.19" | ||
val http4sVersion = "0.21.16" | ||
val natchezVersion = "0.0.22" | ||
val http4sVersion = "0.21.22" | ||
val circeVersion = "0.13.0" | ||
val slf4jVersion = "1.7.30" | ||
val fs2Version = "2.5.0" | ||
val fs2Version = "2.5.4" | ||
|
||
lazy val natchezDatadog = project | ||
.in(file("natchez-datadog")) | ||
.in(file("natchez-extras-datadog")) | ||
.enablePlugins(GitVersioning) | ||
.settings(common :+ (name := "natchez-datadog")) | ||
.settings(common :+ (name := "natchez-extras-datadog")) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"org.tpolecat" %% "natchez-core" % natchezVersion, | ||
|
@@ -58,9 +79,9 @@ lazy val natchezDatadog = project | |
) | ||
|
||
lazy val natchezSlf4j = project | ||
.in(file("natchez-slf4j")) | ||
.in(file("natchez-extras-slf4j")) | ||
.enablePlugins(GitVersioning) | ||
.settings(common :+ (name := "natchez-slf4j")) | ||
.settings(common :+ (name := "natchez-extras-slf4j")) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"org.tpolecat" %% "natchez-core" % natchezVersion, | ||
|
@@ -70,10 +91,10 @@ lazy val natchezSlf4j = project | |
) | ||
|
||
lazy val natchezHttp4s = project | ||
.in(file("natchez-http4s")) | ||
.in(file("natchez-extras-http4s")) | ||
.dependsOn(natchezTestkit) | ||
.enablePlugins(GitVersioning) | ||
.settings(common :+ (name := "natchez-http4s")) | ||
.settings(common :+ (name := "natchez-extras-http4s")) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"org.tpolecat" %% "natchez-core" % natchezVersion, | ||
|
@@ -83,9 +104,9 @@ lazy val natchezHttp4s = project | |
) | ||
|
||
lazy val natchezLog4Cats = project | ||
.in(file("natchez-log4cats")) | ||
.in(file("natchez-extras-log4cats")) | ||
.enablePlugins(GitVersioning) | ||
.settings(common :+ (name := "natchez-log4cats")) | ||
.settings(common :+ (name := "natchez-extras-log4cats")) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"org.tpolecat" %% "natchez-core" % natchezVersion, | ||
|
@@ -94,54 +115,51 @@ lazy val natchezLog4Cats = project | |
) | ||
|
||
lazy val natchezTestkit = project | ||
.in(file("natchez-testkit")) | ||
.in(file("natchez-extras-testkit")) | ||
.enablePlugins(GitVersioning) | ||
.settings(common :+ (name := "natchez-testkit")) | ||
.settings(common :+ (name := "natchez-extras-testkit")) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"org.tpolecat" %% "natchez-core" % natchezVersion | ||
) | ||
) | ||
|
||
lazy val natchezFs2 = project | ||
.in(file("natchez-fs2")) | ||
.in(file("natchez-extras-fs2")) | ||
.dependsOn(natchezTestkit) | ||
.enablePlugins(GitVersioning) | ||
.settings(common :+ (name := "natchez-fs2")) | ||
.settings(common :+ (name := "natchez-extras-fs2")) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"org.typelevel" %% "kittens" % "2.2.1", | ||
"org.typelevel" %% "kittens" % "2.2.2", | ||
"org.tpolecat" %% "natchez-core" % natchezVersion, | ||
"co.fs2" %% "fs2-core" % fs2Version | ||
) | ||
) | ||
|
||
val silencerVersion = "1.7.1" | ||
val doobieVersion = "0.10.0" | ||
val doobieVersion = "0.12.1" | ||
lazy val natchezDoobie = project | ||
.in(file("natchez-doobie")) | ||
.in(file("natchez-extras-doobie")) | ||
.enablePlugins(GitVersioning) | ||
.settings(common :+ (name := "natchez-doobie")) | ||
.settings(common :+ (name := "natchez-extras-doobie")) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"org.tpolecat" %% "natchez-core" % natchezVersion, | ||
"org.tpolecat" %% "doobie-core" % doobieVersion, | ||
"org.tpolecat" %% "doobie-h2" % doobieVersion, | ||
"com.github.ghik" % "silencer-lib" % silencerVersion % Provided cross CrossVersion.full, | ||
compilerPlugin("com.github.ghik" % "silencer-plugin" % silencerVersion cross CrossVersion.full), | ||
"org.tpolecat" %% "doobie-h2" % doobieVersion | ||
), | ||
) | ||
|
||
lazy val natchezCombine = project | ||
.in(file("natchez-combine")) | ||
.in(file("natchez-extras-combine")) | ||
.enablePlugins(GitVersioning) | ||
.settings(common :+ (name := "natchez-combine")) | ||
.settings(common :+ (name := "natchez-extras-combine")) | ||
.settings(libraryDependencies += "org.tpolecat" %% "natchez-core" % natchezVersion) | ||
|
||
lazy val datadogMetrics = project | ||
.in(file("metrics-datadog")) | ||
.in(file("natchez-extras-dogstatsd")) | ||
.enablePlugins(GitVersioning) | ||
.settings(common :+ (name := "datadog-metrics")) | ||
.settings(common :+ (name := "natchez-extras-dogstatsd")) | ||
.dependsOn(metricsCommon) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
|
@@ -167,9 +185,9 @@ lazy val docs = project | |
natchezLog4Cats | ||
) | ||
.settings( | ||
micrositeName := "effect-utils", | ||
micrositeBaseUrl := "/effect-utils", | ||
micrositeDocumentationUrl := "/effect-utils/docs", | ||
micrositeName := "natchez-extras", | ||
micrositeBaseUrl := "/natchez-extras", | ||
micrositeDocumentationUrl := "/natchez-extras/docs", | ||
micrositeDescription := "Datadog integrations for functional Scala", | ||
micrositeImgDirectory := (resourceDirectory in Compile).value / "microsite" / "img", | ||
micrositePalette := micrositePalette.value ++ Map("brand-primary" -> "#632CA6"), | ||
|
@@ -187,7 +205,7 @@ lazy val docs = project | |
lazy val root = (project in file(".")) | ||
.settings( | ||
common ++ Seq( | ||
name := "effect-utils", | ||
name := "natchez-extras", | ||
publish := nop, | ||
publishLocal := nop | ||
)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.