Skip to content

Commit

Permalink
Merge pull request #157 from SwissDataScienceCenter/update/scalafmt-c…
Browse files Browse the repository at this point in the history
…ore-3.8.2

chore: Update scalafmt-core from 3.8.1 to 3.8.2
  • Loading branch information
mergify[bot] authored Jun 15, 2024
2 parents 810c3a0 + a0a3b1b commit ab5b633
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
0d4c0197766486922e32a707d5d2fc9760d9f528

# eikek: Run scalafix to organize imports
57e3d43ba8025acd521d2e65de80ba9c13fbdb13
57e3d43ba8025acd521d2e65de80ba9c13fbdb13
# Scala Steward: Reformat with scalafmt 3.8.2
9cc3dd838b39afa97ddb76987d070f35f9bd36b8
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.8.1"
version = "3.8.2"

preset = default
align.preset = some
Expand Down
9 changes: 6 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,12 @@ lazy val commonSettings = Seq(
// Format: on
organizationName := "Swiss Data Science Center (SDSC)",
startYear := Some(java.time.LocalDate.now().getYear),
licenses += ("Apache-2.0", new URI(
"https://www.apache.org/licenses/LICENSE-2.0.txt"
).toURL),
licenses += (
"Apache-2.0",
new URI(
"https://www.apache.org/licenses/LICENSE-2.0.txt"
).toURL
),
headerLicense := Some(
HeaderLicense.Custom(
s"""|Copyright ${java.time.LocalDate.now().getYear} Swiss Data Science Center (SDSC)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ object ConfigValues extends ConfigDecoders:
renv(s"${prefix}_HTTP_SERVER_BIND_ADDRESS").default("0.0.0.0").as[Ipv4Address]
val port =
renv(s"${prefix}_HTTP_SERVER_PORT").default(defaultPort.value.toString).as[Port]
val shutdownTimeout = renv(s"${prefix}_HTTP_SHUTDOWN_TIMEOUT").default("30s").as[Duration]
val shutdownTimeout =
renv(s"${prefix}_HTTP_SHUTDOWN_TIMEOUT").default("30s").as[Duration]
(bindAddress, port, shutdownTimeout).mapN(HttpServerConfig.apply)

val jwtVerifyConfig: ConfigValue[Effect, JwtVerifyConfig] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import org.http4s.*

trait Http4sJsonCodec:
given Encoder[Uri] = Encoder.forString.contramap(_.renderString)
given Decoder[Uri] = Decoder.forString.mapEither(s => Uri.fromString(s).left.map(_.getMessage))
given Decoder[Uri] =
Decoder.forString.mapEither(s => Uri.fromString(s).left.map(_.getMessage))

object Http4sJsonCodec extends Http4sJsonCodec
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ object OperationRoutes extends TapirBorerJson {
.description("Ping")
.serverLogic[F](_ => "pong".asRight[Unit].pure[F])


private given Schema[CurrentVersion] = Schema.derived

private def versionEndpoint[F[_]: Async] =
endpoint.get.in("version")
endpoint.get
.in("version")
.out(borerJsonBody[CurrentVersion])
.description("Return version information")
.serverLogicSuccess[F](_ => CurrentVersion.get.pure[F])
Expand Down

0 comments on commit ab5b633

Please sign in to comment.