Skip to content

Commit

Permalink
Remove all deprecated methods, values, and types
Browse files Browse the repository at this point in the history
- Cleanup remaining references to deprecated code
  • Loading branch information
jeffmay committed Apr 8, 2021
1 parent d7ede34 commit 876496e
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 290 deletions.
27 changes: 0 additions & 27 deletions core/src/main/scala/com/rallyhealth/vapors/core/data/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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

}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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],
Expand Down Expand Up @@ -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],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 876496e

Please sign in to comment.