Snakepit.EnvDoctor (Snakepit v0.6.10)

View Source

Environment diagnostics for the Python bridge.

Provides both a Mix task integration (mix snakepit.doctor) and runtime guardrails via ensure_python!/1.

Summary

Functions

Ensure the Python runtime is ready. Raises if any critical check fails.

Run the full doctor suite. Returns {:ok, results} or {:error, results}.

Types

check_result()

@type check_result() :: %{
  name: atom(),
  status: :ok | :warning | :error,
  message: String.t()
}

Functions

ensure_python!(opts \\ [])

@spec ensure_python!(Keyword.t()) :: :ok | no_return()

Ensure the Python runtime is ready. Raises if any critical check fails.

run(opts \\ [])

@spec run(Keyword.t()) :: {:ok, [check_result()]} | {:error, [check_result()]}

Run the full doctor suite. Returns {:ok, results} or {:error, results}.