CrucibleFramework (CrucibleFramework v0.5.2)

View Source

Public entrypoints for running Crucible experiments.

Database Configuration

CrucibleFramework requires a Repo for persistence. Configure it in your host application:

config :crucible_framework, repo: MyApp.Repo

Then add CrucibleFramework to your supervision tree if you want managed persistence:

children = [
  MyApp.Repo,
  # ... other children
]

Run migrations using the provided mix task:

mix crucible_framework.install

Or copy migrations manually from deps/crucible_framework/priv/repo/migrations/.

Summary

Functions

Returns the configured Repo module.

Returns the configured Repo module, or nil if not configured.

Functions

repo()

@spec repo() :: module()

Returns the configured Repo module.

Raises if not configured. Configure with:

config :crucible_framework, repo: MyApp.Repo

repo!()

@spec repo!() :: module() | nil

Returns the configured Repo module, or nil if not configured.

run(experiment, opts \\ [])

@spec run(
  CrucibleIR.Experiment.t(),
  keyword()
) :: {:ok, Crucible.Context.t()} | {:error, term()}