Jidoka.Eval.Run (Jidoka v0.9.0)

Copy Markdown View Source

Result of running a Jidoka.Eval.Case.

Summary

Functions

Builds an evaluation run from keyword or map attributes.

Builds an evaluation run and raises if the attributes are invalid.

Returns the Zoi schema for an evaluation run.

Returns the possible evaluation run statuses.

Types

assertion()

@type assertion() :: %{
  :name => atom(),
  :status => :passed | :failed,
  optional(:expected) => term(),
  optional(:actual) => term()
}

status()

@type status() :: :passed | :failed | :error

t()

@type t() :: %Jidoka.Eval.Run{
  assertions: [map()],
  case_id: binary(),
  error: nil | nil | any(),
  metadata: map(),
  observations: map(),
  result: nil | nil | term(),
  status: (:passed | :failed) | :error
}

Functions

new(attrs)

@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}

Builds an evaluation run from keyword or map attributes.

new!(attrs)

@spec new!(keyword() | map()) :: t()

Builds an evaluation run and raises if the attributes are invalid.

schema()

@spec schema() :: Zoi.schema()

Returns the Zoi schema for an evaluation run.

statuses()

@spec statuses() :: [status()]

Returns the possible evaluation run statuses.