yera.config.loaders.hubs
Hub connections loader — reads, resolves, and validates hub config.
Symbols
get_hub_connection
get_hub_connection(
name: str,
hub_config: HubConfig,
) → HubConnectionLook up name in hub config and validate the entry.
Raises :class:HubNotFoundInConfigError if the name is absent,
or :class:HubInvalidConfigError if HubConnection validation fails
for the raw entry.
load_hub_config
load_hub_config() → HubConfigRead [hubs] from yera.toml and build a HubConfig instance.
Separates the default key from named hub entries. Returns an empty
HubConfig when the section or file is absent. Construction is
infallible with respect to hub entry data — individual entries are stored
as raw dicts and validated lazily in :func:get_hub_connection.
resolve_hub
resolve_hub(
hub_override: str | None,
hub_config: HubConfig,
pyproject_hub: str | None,
) → strDetermine the effective hub name using the resolution order.
Priority: CLI --hub override → pyproject.toml hub →
HubConfig.default → raise.