diff --git a/core/src/main/scala/com/rallyhealth/vapors/core/data/package.scala b/core/src/main/scala/com/rallyhealth/vapors/core/data/package.scala index 329dd2c2f..41fb3325b 100644 --- a/core/src/main/scala/com/rallyhealth/vapors/core/data/package.scala +++ b/core/src/main/scala/com/rallyhealth/vapors/core/data/package.scala @@ -24,31 +24,4 @@ package object data { * @note not to be confused with a [[FactTypeSet]] (which is a set of [[FactType]]s, with not values) */ final type TypedFactSet[T] = Set[TypedFact[T]] - - // Aliases for source compatibility // - - @deprecated("Use com.rallyhealth.vapors.core.lens.DataPath instead.", "0.8.0") - final type DataPath = lens.DataPath - - @deprecated("Use com.rallyhealth.vapors.core.lens.DataPath instead.", "0.8.0") - final val DataPath = lens.DataPath - - @deprecated("Use com.rallyhealth.vapors.core.lens.Indexed instead.", "0.8.0") - final type Indexed[C, K, V] = lens.Indexed[C, K, V] - - @deprecated("Use com.rallyhealth.vapors.core.lens.Indexed instead.", "0.8.0") - final val Indexed = lens.Indexed - - @deprecated("Use com.rallyhealth.vapors.core.lens.NamedLens instead.", "0.8.0") - final type NamedLens[A, B] = lens.NamedLens[A, B] - - @deprecated("Use com.rallyhealth.vapors.core.lens.NamedLens instead.", "0.8.0") - final val NamedLens = lens.NamedLens - - @deprecated("Use com.rallyhealth.vapors.core.lens.ValidDataPathKey instead.", "0.8.0") - final type ValidDataPathKey[K] = lens.ValidDataPathKey[K] - - @deprecated("Use com.rallyhealth.vapors.core.lens.ValidDataPathKey instead.", "0.8.0") - final val ValidDataPathKey = lens.ValidDataPathKey - } diff --git a/core/src/main/scala/com/rallyhealth/vapors/core/dsl/ExprDsl.scala b/core/src/main/scala/com/rallyhealth/vapors/core/dsl/ExprDsl.scala index 974bc50c9..284794f3a 100644 --- a/core/src/main/scala/com/rallyhealth/vapors/core/dsl/ExprDsl.scala +++ b/core/src/main/scala/com/rallyhealth/vapors/core/dsl/ExprDsl.scala @@ -4,26 +4,12 @@ import cats.data.NonEmptyList import cats.{Foldable, Monoid} import com.rallyhealth.vapors.core.algebra.{CaptureP, Expr, ExprResult} import com.rallyhealth.vapors.core.data._ -import com.rallyhealth.vapors.core.dsl import com.rallyhealth.vapors.core.interpreter.{ExprInput, InterpretExprAsResultFn} import com.rallyhealth.vapors.core.lens.NamedLens import com.rallyhealth.vapors.core.logic.{Conjunction, Disjunction, Negation} import com.rallyhealth.vapors.core.math._ -object ExprDsl extends ExprDsl { - - @deprecated("Use com.rallyhealth.vapors.core.dsl.CondExpr instead.", "0.8.0") - final type CondExpr[V, P] = Expr[V, Boolean, P] - - @deprecated("Use com.rallyhealth.vapors.core.dsl.ValExpr instead.", "0.8.0") - final type ValExpr[V, R, P] = Expr[V, R, P] - - @deprecated("Use com.rallyhealth.vapors.core.dsl.ValCondExpr instead.", "0.8.0") - final type ValCondExpr[V, P] = dsl.ValExpr[V, Boolean, P] - - @deprecated("Use com.rallyhealth.vapors.core.dsl.RootExpr instead.", "0.8.0") - final type RootExpr[R, P] = Expr[FactTable, R, P] -} +object ExprDsl extends ExprDsl // TODO: Remove methods that are not useful anymore and move less-useful methods to a separate object trait ExprDsl extends TimeFunctions with WrapExprSyntax with WrapEachExprSyntax { @@ -150,14 +136,6 @@ trait ExprDsl extends TimeFunctions with WrapExprSyntax with WrapEachExprSyntax captureResult: CaptureP[V, Seq[R], P], ): Expr.WrapOutputSeq[V, R, P] = sequence(expressions) - @deprecated("Use factsOfType() instead", "0.14.0") - def withFactsOfType[T, P]( - factTypeSet: FactTypeSet[T], - )(implicit - captureInput: CaptureFromFacts[T, P], - ): WithFactsOfTypeBuilder[T, P] = - new WithFactsOfTypeBuilder(factTypeSet) - def collectSome[V, M[_] : Foldable, U, R : Monoid, P]( inputExpr: Expr[V, M[U], P], collectExpr: ValExpr[U, Option[R], P], @@ -227,20 +205,6 @@ trait ExprDsl extends TimeFunctions with WrapExprSyntax with WrapEachExprSyntax ): Expr.ReturnInput[V, P] = Expr.ReturnInput(capture) - @deprecated("Use returnInput instead", "0.10.0") - def returnInputFoldable[V, P]( - implicit - capture: CaptureP[V, V, P], - ): Expr.ReturnInput[V, P] = - Expr.ReturnInput(capture) - - @deprecated("Use returnInput instead", "0.10.0") - def returnInputValue[V, P]( - implicit - capture: CaptureP[V, V, P], - ): Expr.ReturnInput[V, P] = - Expr.ReturnInput(capture) - def within[V, R, P]( inputExpr: Expr[V, R, P], window: Window[R], diff --git a/core/src/main/scala/com/rallyhealth/vapors/core/interpreter/ExprInput.scala b/core/src/main/scala/com/rallyhealth/vapors/core/interpreter/ExprInput.scala index 65992c564..c524aa42d 100644 --- a/core/src/main/scala/com/rallyhealth/vapors/core/interpreter/ExprInput.scala +++ b/core/src/main/scala/com/rallyhealth/vapors/core/interpreter/ExprInput.scala @@ -8,12 +8,6 @@ final case class ExprInput[V]( factTable: FactTable, ) { - @deprecated("Use withValue instead.", "0.10.0") - @inline def withFoldableValue[G[_], U]( - value: G[U], - evidence: Evidence = this.evidence, - ): ExprInput[G[U]] = copy(value = value, evidence = evidence) - @inline def withValue[U]( value: U, evidence: Evidence = this.evidence, diff --git a/core/src/main/scala/com/rallyhealth/vapors/core/lens/DataPath.scala b/core/src/main/scala/com/rallyhealth/vapors/core/lens/DataPath.scala index a3a1f5edc..294ea7400 100644 --- a/core/src/main/scala/com/rallyhealth/vapors/core/lens/DataPath.scala +++ b/core/src/main/scala/com/rallyhealth/vapors/core/lens/DataPath.scala @@ -41,9 +41,6 @@ final case class DataPath(nodes: Chain[DataPath.Node]) extends AnyVal { def atField(name: String): DataPath = DataPath(nodes :+ Field(name)) - @deprecated("Use ++ instead", "0.11.0") - def :::(that: DataPath): DataPath = DataPath(that.nodes ++ this.nodes) - def ++(that: DataPath): DataPath = DataPath(this.nodes ++ that.nodes) } diff --git a/core/src/main/scala/com/rallyhealth/vapors/core/lens/NamedLens.scala b/core/src/main/scala/com/rallyhealth/vapors/core/lens/NamedLens.scala index 6e311bd69..c2aa02004 100644 --- a/core/src/main/scala/com/rallyhealth/vapors/core/lens/NamedLens.scala +++ b/core/src/main/scala/com/rallyhealth/vapors/core/lens/NamedLens.scala @@ -129,18 +129,6 @@ final case class NamedLens[A, B]( ) } - @deprecated("Use .at instead", "0.12.0") - def atKey[K : ValidDataPathKey, V]( - key: K, - )(implicit - CI: Indexed[B, K, V], - ): NamedLens[A, V] = { - copy( - path = path.atKey(key), - get = get.andThen(b => CI.get(b)(key)), - ) - } - def filterKeys[K : ValidDataPathKey, V : Semigroup]( keys: NonEmptySet[K], )(implicit diff --git a/core/src/main/scala/com/rallyhealth/vapors/factfilter/data/package.scala b/core/src/main/scala/com/rallyhealth/vapors/factfilter/data/package.scala deleted file mode 100644 index 9fc7b3b07..000000000 --- a/core/src/main/scala/com/rallyhealth/vapors/factfilter/data/package.scala +++ /dev/null @@ -1,120 +0,0 @@ -package com.rallyhealth.vapors.factfilter - -import cats.Order -import cats.data.NonEmptyList -import com.rallyhealth.vapors.core.data -import com.rallyhealth.vapors.core.lens - -package object data { - - // Removed type aliases // - - @deprecated("Removed in next breaking version change", "0.8.0") - final type Facts = NonEmptyList[data.Fact] - - @deprecated("Removed in next breaking version change", "0.8.0") - final type FactLens[T, V] = lens.NamedLens[data.TypedFact[T], V] - - @deprecated("Removed in next breaking version change", "0.8.0") - final type FactLensId[T] = lens.NamedLens.Id[data.TypedFact[T]] - - @deprecated("Removed in next breaking version change", "0.8.0") - final type FactsOfType[T] = NonEmptyList[data.TypedFact[T]] - - @deprecated("Removed in next breaking version change", "0.8.0") - final type TypedFacts[T] = List[data.TypedFact[T]] - - @deprecated("Removed in next breaking version change", "0.8.0") - final type OrderTypedFacts[T] = Order[data.TypedFact[T]] - - // Aliases for source compatibility warnings // - - @deprecated("Use com.rallyhealth.vapors.core.data.DerivedFact instead", "0.8.0") - final type DerivedFact = data.DerivedFact - - @deprecated("Use com.rallyhealth.vapors.core.data.DerivedFact instead", "0.8.0") - final val DerivedFact = data.DerivedFact - - @deprecated("Use com.rallyhealth.vapors.core.data.DerivedFactOfType instead", "0.8.0") - final type DerivedFactOfType[T] = data.DerivedFactOfType[T] - - @deprecated("Use com.rallyhealth.vapors.core.data.DerivedFactOfType instead", "0.8.0") - final val DerivedFactOfType = data.DerivedFactOfType - - @deprecated("Use com.rallyhealth.vapors.core.data.SourceFactOfType instead", "0.8.0") - final type SourceFactOfType[T] = data.SourceFactOfType[T] - - @deprecated("Use com.rallyhealth.vapors.core.data.SourceFactOfType instead", "0.8.0") - final val SourceFactOfType = data.SourceFactOfType - - @deprecated("Use com.rallyhealth.vapors.core.data.FactSet instead", "0.8.0") - final type FactSet = data.FactSet - - @deprecated("Use com.rallyhealth.vapors.core.data.FactSet instead", "0.8.0") - final val FactSet = data.FactSet - - @deprecated("Use com.rallyhealth.vapors.core.data.TypedFact instead", "0.8.0") - final type TypedFact[T] = data.TypedFact[T] - - @deprecated("Use com.rallyhealth.vapors.core.data.TypedFact instead", "0.8.0") - final val TypedFact = data.TypedFact - - @deprecated("Use com.rallyhealth.vapors.core.data.TypedFactSet instead", "0.8.0") - final type TypedFactSet[T] = data.TypedFactSet[T] - - @deprecated("Use com.rallyhealth.vapors.core.data.TypedFactSet instead", "0.8.0") - final val TypedFactSet = data.TypedFactSet - - @deprecated("Use com.rallyhealth.vapors.core.data.Evidence instead", "0.8.0") - final type Evidence = data.Evidence - - @deprecated("Use com.rallyhealth.vapors.core.data.Evidence instead", "0.8.0") - final val Evidence = data.Evidence - - // TODO: Move somewhere else - @deprecated("Use com.rallyhealth.vapors.core.data.ExtractBoolean instead", "0.8.0") - final type ExtractBoolean[-T] = data.ExtractBoolean[T] - - // TODO: Move somewhere else - @deprecated("Use com.rallyhealth.vapors.core.data.ExtractBoolean instead", "0.8.0") - final val ExtractBoolean = data.ExtractBoolean - - // TODO: Move somewhere else - @deprecated("Use com.rallyhealth.vapors.core.data.ExtractValue instead", "0.8.0") - final type ExtractValue[-T, +V] = data.ExtractValue[T, V] - - // TODO: Move somewhere else - @deprecated("Use com.rallyhealth.vapors.core.data.ExtractValue instead", "0.8.0") - final val ExtractValue = data.ExtractValue - - @deprecated("Use com.rallyhealth.vapors.core.data.Fact instead", "0.8.0") - final type Fact = data.Fact - - @deprecated("Use com.rallyhealth.vapors.core.data.Fact instead", "0.8.0") - final val Fact = data.Fact - - @deprecated("Use com.rallyhealth.vapors.core.data.FactOrFactSet instead", "0.8.0") - final type FactOrFactSet = data.FactOrFactSet - - @deprecated("Use com.rallyhealth.vapors.core.data.FactOrFactSet instead", "0.8.0") - final val FactOrFactSet = data.FactOrFactSet - - @deprecated("Use com.rallyhealth.vapors.core.data.FactTable instead", "0.8.0") - final type FactTable = data.FactTable - - @deprecated("Use com.rallyhealth.vapors.core.data.FactTable instead", "0.8.0") - final val FactTable = data.FactTable - - @deprecated("Use com.rallyhealth.vapors.core.data.FactType instead", "0.8.0") - final type FactType[T] = data.FactType[T] - - @deprecated("Use com.rallyhealth.vapors.core.data.FactType instead", "0.8.0") - final val FactType = data.FactType - - @deprecated("Use com.rallyhealth.vapors.core.data.FactTypeSet instead", "0.8.0") - final type FactTypeSet[T] = data.FactTypeSet[T] - - @deprecated("Use com.rallyhealth.vapors.core.data.FactTypeSet instead", "0.8.0") - final val FactTypeSet = data.FactTypeSet - -} diff --git a/core/src/main/scala/com/rallyhealth/vapors/factfilter/dsl/Facts.scala b/core/src/main/scala/com/rallyhealth/vapors/factfilter/dsl/Facts.scala deleted file mode 100644 index 8b4424cce..000000000 --- a/core/src/main/scala/com/rallyhealth/vapors/factfilter/dsl/Facts.scala +++ /dev/null @@ -1,14 +0,0 @@ -package com.rallyhealth.vapors.factfilter.dsl - -import cats.data.NonEmptyList -import com.rallyhealth.vapors.core.data.Fact - -@deprecated("Use FactSet instead.", "0.8.0") -object Facts { - - @deprecated("Use FactSet instead.", "0.8.0") - def apply( - head: Fact, - tail: Fact*, - ): NonEmptyList[Fact] = NonEmptyList.of(head, tail: _*) -} diff --git a/core/src/main/scala/com/rallyhealth/vapors/factfilter/dsl/package.scala b/core/src/main/scala/com/rallyhealth/vapors/factfilter/dsl/package.scala deleted file mode 100644 index 0da6c2794..000000000 --- a/core/src/main/scala/com/rallyhealth/vapors/factfilter/dsl/package.scala +++ /dev/null @@ -1,28 +0,0 @@ -package com.rallyhealth.vapors.factfilter - -import com.rallyhealth.vapors.core.algebra -import com.rallyhealth.vapors.core.dsl - -package object dsl { - - @deprecated("Use com.rallyhealth.vapors.core.algebra.CaptureP instead.", "0.8.0") - final type CaptureP[F[_], V, R, P] = algebra.CaptureP[V, R, P] - - @deprecated("Use com.rallyhealth.vapors.core.algebra.CaptureP instead.", "0.8.0") - final val CaptureP = algebra.CaptureP - - @deprecated("Use com.rallyhealth.vapors.core.dsl.ExprBuilder instead.", "0.8.0") - final type ExprBuilder[F[_], V, M[_], U, P] = dsl.ExprBuilder[V, M, U, P] - - @deprecated("Use com.rallyhealth.vapors.core.dsl.ExprBuilder instead.", "0.8.0") - final val ExprBuilder = dsl.ExprBuilder - - @deprecated("Use com.rallyhealth.vapors.core.dsl.ExprBuilderCatsInstances instead.", "0.8.0") - final type ExprBuilderCatsInstances = dsl.ExprBuilderCatsInstances - - @deprecated("Import from com.rallyhealth.vapors.core.dsl._ instead.", "0.8.0") - final val ExprDsl = dsl.ExprDsl - - @deprecated("Use com.rallyhealth.vapors.core.dsl.WrapExprSyntax instead.", "0.8.0") - final type WrapExprSyntax = dsl.WrapExprSyntax -} diff --git a/core/src/main/scala/com/rallyhealth/vapors/factfilter/evaluator/package.scala b/core/src/main/scala/com/rallyhealth/vapors/factfilter/evaluator/package.scala deleted file mode 100644 index 168f17359..000000000 --- a/core/src/main/scala/com/rallyhealth/vapors/factfilter/evaluator/package.scala +++ /dev/null @@ -1,30 +0,0 @@ -package com.rallyhealth.vapors.factfilter - -import com.rallyhealth.vapors.core.interpreter - -package object evaluator { - - @deprecated("Use com.rallyhealth.vapors.core.interpreter.ExprInput instead.", "0.8.0") - final type ExprInput[F[_], V] = interpreter.ExprInput[V] - - @deprecated("Use com.rallyhealth.vapors.core.interpreter.ExprInput instead.", "0.8.0") - final val ExprInput = interpreter.ExprInput - - @deprecated("Use com.rallyhealth.vapors.core.interpreter.ExprOutput instead.", "0.8.0") - final type ExprOutput[R] = interpreter.ExprOutput[R] - - @deprecated("Use com.rallyhealth.vapors.core.interpreter.ExprOutput instead.", "0.8.0") - final val ExprOutput = interpreter.ExprOutput - - @deprecated("Use com.rallyhealth.vapors.core.interpreter.InterpretExprAsResultFn instead.", "0.8.0") - final type InterpretExprAsResultFn[F[_], V, P] = interpreter.InterpretExprAsResultFn[V, P] - - @deprecated("Use com.rallyhealth.vapors.core.interpreter.InterpretExprAsResultFn instead.", "0.8.0") - final val InterpretExprAsResultFn = interpreter.InterpretExprAsResultFn - - @deprecated("Use com.rallyhealth.vapors.core.interpreter.InterpretExprAsResultFn instead.", "0.8.0") - final type InterpretExprAsSimpleOutputFn[F[_], V, P] = interpreter.InterpretExprAsSimpleOutputFn[V, P] - - @deprecated("Use com.rallyhealth.vapors.core.interpreter.InterpretExprAsResultFn instead.", "0.8.0") - final val InterpretExprAsSimpleOutputFn = interpreter.InterpretExprAsSimpleOutputFn -} diff --git a/core/src/main/scala/com/rallyhealth/vapors/factfilter/extras/package.scala b/core/src/main/scala/com/rallyhealth/vapors/factfilter/extras/package.scala deleted file mode 100644 index f18d1ce1d..000000000 --- a/core/src/main/scala/com/rallyhealth/vapors/factfilter/extras/package.scala +++ /dev/null @@ -1,12 +0,0 @@ -package com.rallyhealth.vapors.factfilter - -import com.rallyhealth.vapors.core.data - -package object extras { - - @deprecated("Use com.rallyhealth.vapors.core.data.ExtractInstant instead.", "0.8.0") - final type ExtractInstant[-T] = data.ExtractInstant[T] - - @deprecated("Use com.rallyhealth.vapors.core.data.ExtractInstant instead.", "0.8.0") - final val ExtractInstant = data.ExtractInstant -} diff --git a/core/src/test/scala/com/rallyhealth/vapors/core/data/FactTableSpec.scala b/core/src/test/scala/com/rallyhealth/vapors/core/data/FactTableSpec.scala index 3901dd89c..72fb9fee0 100644 --- a/core/src/test/scala/com/rallyhealth/vapors/core/data/FactTableSpec.scala +++ b/core/src/test/scala/com/rallyhealth/vapors/core/data/FactTableSpec.scala @@ -1,7 +1,6 @@ package com.rallyhealth.vapors.core.data import com.rallyhealth.vapors.core.example.{FactTypes, GenericMeasurement} -import com.rallyhealth.vapors.factfilter.data.FactTable import org.scalatest.wordspec.AnyWordSpec import java.time.Instant