From a2f046e8606a150026b2aba049018f9811c89026 Mon Sep 17 00:00:00 2001 From: Pat Garrity Date: Fri, 3 Apr 2026 22:54:42 -0500 Subject: [PATCH] Upgrades over time --- build.sbt | 14 +++++++------- .../src/main/scala/gs/test/v0/api/TestGroup.scala | 10 +++++----- .../api/src/main/scala/gs/test/v0/api/syntax.scala | 4 ++-- .../test/v0/runtime/engine/EngineStatsTests.scala | 4 ++-- .../test/v0/runtime/engine/TestEngineTests.scala | 4 ++-- .../src/test/scala/support/Generators.scala | 10 +++++----- project/build.properties | 2 +- project/plugins.sbt | 4 ++-- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/build.sbt b/build.sbt index 4afd19d..0eaeed8 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,4 @@ -val scala3: String = "3.7.3" +val scala3: String = "3.8.3" ThisBuild / scalaVersion := scala3 ThisBuild / versionScheme := Some("semver-spec") @@ -27,24 +27,24 @@ val sharedSettings = Seq( val Deps = new { val Cats = new { val Core: ModuleID = "org.typelevel" %% "cats-core" % "2.13.0" - val Effect: ModuleID = "org.typelevel" %% "cats-effect" % "3.6.3" + val Effect: ModuleID = "org.typelevel" %% "cats-effect" % "3.7.0" } val Fs2 = new { - val Core: ModuleID = "co.fs2" %% "fs2-core" % "3.12.0" + val Core: ModuleID = "co.fs2" %% "fs2-core" % "3.13.0" } val Natchez = new { - val Core: ModuleID = "org.tpolecat" %% "natchez-core" % "0.3.8" + val Core: ModuleID = "org.tpolecat" %% "natchez-core" % "0.3.9" } val Gs = new { val Uuid: ModuleID = "gs" %% "gs-uuid-v0" % "0.4.1" - val Timing: ModuleID = "gs" %% "gs-timing-v0" % "0.1.2" - val Datagen: ModuleID = "gs" %% "gs-datagen-core-v0" % "0.3.3" + val Timing: ModuleID = "gs" %% "gs-timing-v0" % "0.1.3" + val Datagen: ModuleID = "gs" %% "gs-datagen-core-v0" % "0.4.1" } - val MUnit: ModuleID = "org.scalameta" %% "munit" % "1.1.1" + val MUnit: ModuleID = "org.scalameta" %% "munit" % "1.2.4" } lazy val testSettings = Seq( diff --git a/modules/api/src/main/scala/gs/test/v0/api/TestGroup.scala b/modules/api/src/main/scala/gs/test/v0/api/TestGroup.scala index 1e15638..58a0fd2 100644 --- a/modules/api/src/main/scala/gs/test/v0/api/TestGroup.scala +++ b/modules/api/src/main/scala/gs/test/v0/api/TestGroup.scala @@ -263,14 +263,14 @@ object TestGroup: * The function this test will execute. */ def pure(unitOfWork: => Either[TestFailure, Unit]): Unit = - effectful(Async[F].pure(unitOfWork)) + apply(Async[F].pure(unitOfWork)) /** Finalize and register this test with an effectful unit of work. * * @param unitOfWork * The function this test will execute. */ - def effectful( + def apply( unitOfWork: natchez.Trace[F] ?=> F[Either[TestFailure, Any]] ): Unit = registry.register( @@ -291,7 +291,7 @@ object TestGroup: * @param unitOfWork * The function this test will execute. */ - def apply( + def eitherT( unitOfWork: natchez.Trace[F] ?=> EitherT[F, TestFailure, Any] ): Unit = registry.register( @@ -422,7 +422,7 @@ object TestGroup: * @param unitOfWork * The function this test will execute. */ - def effectful( + def apply( unitOfWork: natchez.Trace[F] ?=> Input => F[Either[TestFailure, Any]] ): Unit = registry.register( @@ -445,7 +445,7 @@ object TestGroup: * @param unitOfWork * The function this test will execute. */ - def apply( + def eitherT( unitOfWork: natchez.Trace[F] ?=> Input => EitherT[F, TestFailure, Any] ): Unit = registry.register( diff --git a/modules/api/src/main/scala/gs/test/v0/api/syntax.scala b/modules/api/src/main/scala/gs/test/v0/api/syntax.scala index 0c8a41a..cab7127 100644 --- a/modules/api/src/main/scala/gs/test/v0/api/syntax.scala +++ b/modules/api/src/main/scala/gs/test/v0/api/syntax.scala @@ -104,7 +104,7 @@ def pass(): Either[TestFailure, Unit] = Right(()) * final class Example extends TestGroup.IO: * override def name: String = "example" * - * test(pid"ex", "Example Test").effectful { passF() } + * test(pid"ex", "Example Test") { passF() } * }}} * * @return @@ -123,7 +123,7 @@ def passF[F[_]: Applicative](): F[Either[TestFailure, Unit]] = * final class Example extends TestGroup.IO: * override def name: String = "example" * - * test(pid"ex", "Example Test") { passT() } + * test(pid"ex", "Example Test").eitherT { passT() } * }}} * * @return diff --git a/modules/runtime/src/test/scala/gs/test/v0/runtime/engine/EngineStatsTests.scala b/modules/runtime/src/test/scala/gs/test/v0/runtime/engine/EngineStatsTests.scala index a144fa0..b6312f9 100644 --- a/modules/runtime/src/test/scala/gs/test/v0/runtime/engine/EngineStatsTests.scala +++ b/modules/runtime/src/test/scala/gs/test/v0/runtime/engine/EngineStatsTests.scala @@ -2,7 +2,7 @@ package gs.test.v0.runtime.engine import cats.effect.IO import gs.datagen.v0.Gen -import gs.datagen.v0.generators.Size +import gs.datagen.v0.generators.Range import java.util.concurrent.TimeUnit import munit.* import scala.concurrent.duration.FiniteDuration @@ -61,7 +61,7 @@ class EngineStatsTests extends IOSuite: val duration = Generators.testDuration() val size = 4 val executions = - Gen.list(Size.fixed(size), Generators.GenTestExecutionPassed).gen() + Gen.list(Range.fixed(size), Generators.GenTestExecutionPassed).gen() for stats <- EngineStats.initialize[IO] _ <- stats.updateForGroup(duration, executions) diff --git a/modules/runtime/src/test/scala/gs/test/v0/runtime/engine/TestEngineTests.scala b/modules/runtime/src/test/scala/gs/test/v0/runtime/engine/TestEngineTests.scala index a90b1fb..cd0e2c7 100644 --- a/modules/runtime/src/test/scala/gs/test/v0/runtime/engine/TestEngineTests.scala +++ b/modules/runtime/src/test/scala/gs/test/v0/runtime/engine/TestEngineTests.scala @@ -175,7 +175,7 @@ object TestEngineTests: override def name: String = "single-passing-test" test(pid"engine:g1", "show that true is true") { - check(true).isTrueT() + check(true).isTrueF() } end G1 @@ -184,7 +184,7 @@ object TestEngineTests: override def name: String = "single-failing-test" test(pid"engine:g2", "this will fail") { - check(1).isEqualToT(2) + check(1).isEqualToF(2) } end G2 diff --git a/modules/test-data/src/test/scala/support/Generators.scala b/modules/test-data/src/test/scala/support/Generators.scala index 96d10fc..a4d790b 100644 --- a/modules/test-data/src/test/scala/support/Generators.scala +++ b/modules/test-data/src/test/scala/support/Generators.scala @@ -1,7 +1,7 @@ package support import gs.datagen.v0.* -import gs.datagen.v0.generators.Size +import gs.datagen.v0.generators.Range import gs.test.v0.api.* import scala.concurrent.duration.FiniteDuration @@ -15,14 +15,14 @@ object Generators: given Generated[TestExecution.Id] = Generated.of(GenTestExecutionId) val GenPermanentId: Gen[PermanentId] = - Gen.string.alphaNumeric(Size.Fixed(12)).map(x => PermanentId(s"pid-$x")) + Gen.string.alphaNumeric(Range.Fixed(12)).map(x => PermanentId(s"pid-$x")) given Generated[PermanentId] = Generated.of(GenPermanentId) val GenTag: Gen[Tag] = - Gen.string.alphaNumeric(Size.Fixed(6)).map(x => Tag(s"tag-$x")) + Gen.string.alphaNumeric(Range.Fixed(6)).map(x => Tag(s"tag-$x")) - val GenTagList: Gen[List[Tag]] = Gen.list(Size.between(0, 8), GenTag) + val GenTagList: Gen[List[Tag]] = Gen.list(Range.between(0, 8), GenTag) given Generated[Tag] = Generated.of(GenTag) @@ -77,7 +77,7 @@ object Generators: val GenTestSuite: Gen[TestSuite] = for pid <- GenPermanentId - name <- Gen.string.alphaNumeric(Size.fixed(8)) + name <- Gen.string.alphaNumeric(Range.fixed(8)) yield TestSuite(pid, name, None) given Generated[TestSuite] = Generated.of(GenTestSuite) diff --git a/project/build.properties b/project/build.properties index 5e6884d..08a6fc0 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.11.6 +sbt.version=1.12.8 diff --git a/project/plugins.sbt b/project/plugins.sbt index 83e5dc1..1db1aad 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -28,6 +28,6 @@ externalResolvers := Seq( "Garrity Software Releases" at "https://maven.garrity.co/gs" ) -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.3.1") -addSbtPlugin("gs" % "sbt-garrity-software" % "0.6.0") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.4.4") +addSbtPlugin("gs" % "sbt-garrity-software" % "0.7.0") addSbtPlugin("gs" % "sbt-gs-semver" % "0.3.0")