DynamicRefConfig
Configuration for resolving OFFSET/INDIRECT via constraint-based inference.
Usage
DynamicRefConfig()Prefer building via from_bindings (series domain) or from_constraints (address -> annotation mapping); the constructor is for internal use.
Parameter Attributes
cell_type_env: CellTypeEnvlimits: DynamicRefLimits
Methods
| Name | Description |
|---|---|
| from_bindings() | Build a config whose env is derived from a series binding manifest. |
| from_constraints() | Build a config from a constraints schema (address keys -> type annotations). |
| overlay() |
Union this env with other; other wins per overlapping key.
|
from_bindings()
Build a config whose env is derived from a series binding manifest.
Usage
from_bindings(bindings, workbook, *, limits=None, bindings_path=None)Parameters
bindings: Mapping[str, Any]-
Loaded (merged) series binding manifest.
workbook: str | Path-
Workbook path; read for range expansion and
from_workbook. limits: DynamicRefLimits | None = None-
Optional inference limits (defaults to DynamicRefLimits()).
bindings_path: str | Path | None = None- Sidecar path stored on the domain-index pickle handle.
from_constraints()
Build a config from a constraints schema (address keys -> type annotations).
Usage
from_constraints(constraints_schema, *, limits=None)constraints_schema must be a mapping (typically dict[str, type]) whose keys are sheet-qualified addresses (e.g. Sheet1!B1). Values are typing objects describing domains (Annotated, Literal, etc.). Prefer from_bindings when domains live on a series binding sidecar.
Raises
TypeError-
If constraints_schema is not a mapping (e.g. a legacy
TypedDictclass passed instead of a dict).
overlay()
Union this env with other; other wins per overlapping key.
Usage
overlay(other)Parameters
other: DynamicRefConfig- Config whose cell types replace this env on shared addresses.
Returns
DynamicRefConfig-
The merged config (using
other.limits) and the sorted keys present tuple[str, …]- in both envs.