From 2638c81ec1f86321eef5212b2ca7a28f19eb330b Mon Sep 17 00:00:00 2001 From: Mark Tomko <610104+mtomko@users.noreply.github.com> Date: Thu, 18 Apr 2024 10:01:19 -0700 Subject: [PATCH] Updates (#36) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use sbt 1.9.9 * Update dependencies * Update plugins * Update changelog * Use scalafmt 3.8.1 * Update scalafmt in github actions * Improved error messaging • quote with ` • use mkString to avoid showing `List()` --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- .scalafmt.conf | 8 +------- CHANGELOG.md | 3 +++ build.sbt | 12 ++++++------ project/build.properties | 2 +- project/plugins.sbt | 10 +++++----- .../gpp/poolq3/parser/BarcodeSet.scala | 2 +- .../gpp/poolq3/parser/ReferenceData.scala | 4 ++-- 9 files changed, 21 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b60555..2692984 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - uses: jrouly/scalafmt-native-action@v3 with: - version: "3.8.0" + version: "3.8.1" - name: Set up JDK 8 uses: actions/setup-java@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a7a1759..b90a9c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: - run: git config --global user.name "GPP Informatics" - uses: jrouly/scalafmt-native-action@v3 with: - version: "3.8.0" + version: "3.8.1" - name: Set up JDK 8 uses: actions/setup-java@v4 with: diff --git a/.scalafmt.conf b/.scalafmt.conf index afac328..a2746b5 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,13 +1,7 @@ # PoolQ3 .scalafmt configuration -version=3.8.0 +version=3.8.1 runner.dialect = scala3 -# work around https://github.com/scalameta/scalafmt/issues/3787 -fileOverride { - "glob:**.sbt" { - runner.dialect = sbt1 - } -} style = IntelliJ maxColumn = 120 diff --git a/CHANGELOG.md b/CHANGELOG.md index 25ce629..da1b7eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 3.12.1 +No user-facing changes + ## 3.12.0 * Update to Scala 3.3.1 diff --git a/build.sbt b/build.sbt index 8568f98..eab08e3 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ val artifactId = "poolq" inThisBuild( List( - scalaVersion := "3.3.1", + scalaVersion := "3.3.3", semanticdbEnabled := true, semanticdbVersion := scalafixSemanticdb.revision, versionScheme := Some("early-semver") @@ -11,19 +11,19 @@ inThisBuild( lazy val versions = new { val betterFiles = "3.9.2" - val catsEffect3 = "3.5.3" + val catsEffect3 = "3.5.4" val cats = "2.10.0" - val commonsIo = "2.15.1" - val commonsText = "1.11.0" + val commonsIo = "2.16.1" + val commonsText = "1.12.0" val commonsMath3 = "3.6.1" val fastutil = "8.5.13" - val fs2 = "3.9.4" + val fs2 = "3.10.2" val log4s = "1.10.0" val logback = "1.2.13" val munit = "0.7.29" val munitCatsEffect3 = "1.0.7" val samTools = "3.0.5" - val scalaCheck = "1.17.0" + val scalaCheck = "1.18.0" val scalaCsv = "1.3.10" val scalaTest = "3.2.18" val scalaTestPlusScalaCheck = "3.2.18.0" diff --git a/project/build.properties b/project/build.properties index abbbce5..04267b1 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.8 +sbt.version=1.9.9 diff --git a/project/plugins.sbt b/project/plugins.sbt index b686cc6..7774e97 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,10 +2,10 @@ addSbtPlugin("ch.epfl.scala" % "sbt-missinglink" % "0.3.6") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.0") addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0") -addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.3.1") -addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") +addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") -addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.0") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") +addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11") diff --git a/src/main/scala/org/broadinstitute/gpp/poolq3/parser/BarcodeSet.scala b/src/main/scala/org/broadinstitute/gpp/poolq3/parser/BarcodeSet.scala index d5345e1..9f6f9ad 100644 --- a/src/main/scala/org/broadinstitute/gpp/poolq3/parser/BarcodeSet.scala +++ b/src/main/scala/org/broadinstitute/gpp/poolq3/parser/BarcodeSet.scala @@ -46,7 +46,7 @@ object BarcodeSet: .asScala .toList .map(_.trim) - .traverse(parseBarcode(s => InvalidFileException(file, s"Invalid DNA barcode '$s'"))) + .traverse(parseBarcode(s => InvalidFileException(file, s"Invalid DNA barcode `$s`"))) .map(bcs => new BarcodeSet(bcs.toSet)) .flatTap(checkSet(file, _)) .get // throws if an error was encountered diff --git a/src/main/scala/org/broadinstitute/gpp/poolq3/parser/ReferenceData.scala b/src/main/scala/org/broadinstitute/gpp/poolq3/parser/ReferenceData.scala index 9b1ded7..16f8327 100644 --- a/src/main/scala/org/broadinstitute/gpp/poolq3/parser/ReferenceData.scala +++ b/src/main/scala/org/broadinstitute/gpp/poolq3/parser/ReferenceData.scala @@ -93,11 +93,11 @@ object ReferenceData: // and reject cases where the barcode is empty but the ID is non-empty if barcode.isEmpty && id.isEmpty then None else if isReferenceBarcode(barcode) then Some(ReferenceEntry(barcode, id)) - else throw InvalidFileException(file, s"Invalid DNA barcode '$barcode' for ID '$id'") + else throw InvalidFileException(file, s"Invalid DNA barcode '$barcode' for ID `$id`") case _ => throw InvalidFileException( file, - s"Incorrect number of columns. At least 2 required, got: ${xs.length}: $xs" + s"Incorrect number of columns. At least 2 required, got: ${xs.length}: ${xs.mkString("`", "`, `", "`")}" ) }