Skip to content

Commit

Permalink
🔧 Update build.sbt and upgrade munit-cats-effect version (#35)
Browse files Browse the repository at this point in the history
* 🔧 Update build.sbt and upgrade munit-cats-effect version

* 🎨

* patch version bump
  • Loading branch information
ff137 authored Feb 7, 2024
1 parent ced0d28 commit bd710a9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
54 changes: 25 additions & 29 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
val Scala3 = "3.3.1"
val Scala213 = "2.13.8"

val catsVersion = "2.10.0"
val ceVersion = "3.5.3"
val fs2Version = "3.9.4"
val munitVersion = "1.0.0-M11"
val munitCEVersion = "1.0.7"
val munitCheckEffVersion = "1.0.0-M7"
val googleProtoVersion = "3.19.1"
val circeVersion = "0.14.6"
val circeYamlVersion = "0.14.2"
val monocleVersion = "3.2.0"
val scodecVersion = "1.1.38"
val junitVersion = "0.11"
val refinedVersion = "0.9.27"
lazy val Scala3 = "3.3.1"
lazy val Scala213 = "2.13.8"

Global / scalaVersion := Scala3
Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / scalaVersion := Scala3
ThisBuild / version := "0.1.10"

ThisBuild / version := "0.1.11"

ThisBuild / organization := "xyz.didx"
ThisBuild / organizationName := "DIDx"
Expand Down Expand Up @@ -65,6 +52,16 @@ lazy val root = project
publish / skip := true
)

lazy val catsVersion = "2.10.0"
lazy val ceVersion = "3.5.3"
lazy val fs2Version = "3.9.4"
lazy val munitVersion = "1.0.0-M11"
lazy val munitCEVersion = "2.0.0-M4"
lazy val circeVersion = "0.14.6"
lazy val circeYamlVersion = "0.14.2"
lazy val monocleVersion = "3.2.0"
lazy val scodecVersion = "1.1.38"

lazy val core = project
.in(file("modules/core"))
.settings(
Expand All @@ -73,17 +70,16 @@ lazy val core = project
publishConfiguration := publishConfiguration.value.withOverwrite(true),
publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true),
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % catsVersion,
"co.fs2" %% "fs2-core" % fs2Version,
"co.fs2" %% "fs2-io" % fs2Version,
"org.typelevel" %% "cats-effect" % ceVersion,
"dev.optics" %% "monocle-core" % monocleVersion,
"org.scodec" %% "scodec-bits" % scodecVersion,
"org.scala-lang" %% "scala3-staging" % Scala3,
"io.circe" %% "circe-yaml" % circeYamlVersion,
"org.scalameta" %% "munit" % munitVersion % Test,
"org.scalameta" %% "munit-scalacheck" % munitVersion % Test,
"org.typelevel" %% "munit-cats-effect-3" % munitCEVersion % Test
"org.typelevel" %% "cats-core" % catsVersion,
"co.fs2" %% "fs2-core" % fs2Version,
"co.fs2" %% "fs2-io" % fs2Version,
"org.typelevel" %% "cats-effect" % ceVersion,
"dev.optics" %% "monocle-core" % monocleVersion,
"org.scodec" %% "scodec-bits" % scodecVersion,
"io.circe" %% "circe-yaml" % circeYamlVersion,
"org.scalameta" %% "munit" % munitVersion % Test,
"org.scalameta" %% "munit-scalacheck" % munitVersion % Test,
"org.typelevel" %% "munit-cats-effect" % munitCEVersion % Test
) ++ Seq(
"io.circe" %% "circe-core",
"io.circe" %% "circe-generic",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,23 @@ case class Weight(colour: Colour, tokenCount: Int)

case class ArcId(from: NodeId, to: NodeId):
import scala.math.Ordered.orderingToOrdered

def compare(that: ArcId): Int = (this.from, this.to) compare (that.from, that.to)

enum Arc extends PetriElement:
val from: NodeId
val to: NodeId
val weight: Weight

val id: NodeId = MessageDigest
.getInstance("SHA-256")
.digest((from + to + weight.hashCode().toHexString).getBytes("UTF-8"))
.map("%02x".format(_))
.mkString

case Timed(from: NodeId, to: NodeId, weight: Weight, interval: Long) extends Arc
case Weighted(from: NodeId, to: NodeId, weight: Weight) extends Arc

trait LinkableElement extends PetriElement:
inline def assert[T](condition: Boolean, expr: T) =
if condition then expr else ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ case class PlaceTransitionTriple(
end: Place
) extends Semigroup[PlaceTransitionTriple]:
val consumers: ListSet[Arc] = inWeights.map(c => Weighted(start.id, transition.id, c))
val producers = outWeights.map(p => Weighted(transition.id, end.id, p))
val producers: ListSet[Arc] = outWeights.map(p => Weighted(transition.id, end.id, p))

val id: NodeId = MessageDigest
.getInstance("SHA-256")
Expand Down

0 comments on commit bd710a9

Please sign in to comment.