SnakeBridge.Config (SnakeBridge v0.15.0)

Copy Markdown View Source

Compile-time configuration for SnakeBridge.

Summary

Functions

Load config from mix.exs project config and Application env.

Types

t()

@type t() :: %SnakeBridge.Config{
  auto_install: :never | :dev | :dev_test | :always | nil,
  coverage_report: keyword(),
  docs: keyword(),
  generated_dir: String.t(),
  generated_layout: :single | :split,
  helper_allowlist: :all | [String.t()],
  helper_pack_enabled: boolean(),
  helper_paths: [String.t()],
  inline_enabled: boolean(),
  introspector: keyword(),
  ledger: keyword(),
  libraries: [SnakeBridge.Config.Library.t()],
  metadata_dir: String.t(),
  min_signature_tier: atom() | String.t(),
  runtime_client: module(),
  scan_exclude: [String.t()],
  scan_extensions: [String.t()],
  scan_paths: [String.t()],
  signature_sources: [atom() | String.t()],
  strict: boolean(),
  strict_signatures: boolean(),
  stub_search_paths: [String.t()],
  stubgen: keyword(),
  typeshed_path: String.t() | nil,
  use_typeshed: boolean(),
  verbose: boolean()
}

Functions

load()

@spec load() :: t()

Load config from mix.exs project config and Application env.

Python dependencies are specified via the python_deps key in your mix.exs project:

def project do
  [
    app: :my_app,
    version: "1.0.0",
    deps: deps(),
    python_deps: python_deps()
  ]
end

defp python_deps do
  [
    {:numpy, "1.26.0"},
    {:pandas, "2.0.0", include: ["DataFrame", "read_csv"]}
  ]
end

This approach mirrors how deps/0 works and is compatible with all installation methods (Hex, path, git).