yera.cli.commands.set

Set commands — write config values.

Symbols

def cred_group — Set ``[tool.yera.overrides] cred-group`` in ``pyproject.toml``.
def hub — Set the default hub name.
def profile — Set the active Yera profile.
def setting — Write a setting value to yera.toml or pyproject.toml.

cred_group

cred_group(
    name: str,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Set [tool.yera.overrides] cred-group in pyproject.toml.

Non-interactive: does not touch credentials.json or authorised_roots.

Parameters

name
type: str

Credential group name to write under [tool.yera.overrides].

hub

hub(
    hub_name: str,
    project: Annotated[bool, Parameter(negative='')] = False,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Set the default hub name.

Parameters

hub_name
type: str

Name of a hub that already exists in yera.toml. Hub URLs are not defined in pyproject.toml — only the default name is set.

project
type: Annotated[bool, Parameter(negative='')] = False

If true, write the project-level hub key in pyproject.toml [tool.yera]; otherwise write [hubs] default in yera.toml.

profile

profile(
    profile_name: Annotated[str, Parameter(help='Yera profile name to set as active.')],
    project: Annotated[bool, Parameter(negative='')] = False,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Set the active Yera profile.

Parameters

profile_name
type: Annotated[str, Parameter(help='Yera profile name to set as active.')]

Name of a Yera profile that already exists in yera.toml.

project
type: Annotated[bool, Parameter(negative='')] = False

If true, write the project-level profile override in pyproject.toml [tool.yera.profiles]; otherwise write [profiles] default in yera.toml.

setting

setting(
    setting_name: Annotated[str, Parameter(help=_SETTING_NAME_HELP)],
    value: str,
    project: Annotated[bool, Parameter(negative='')] = False,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Write a setting value to yera.toml or pyproject.toml.

Parameters

setting_name
type: Annotated[str, Parameter(help=_SETTING_NAME_HELP)]

Settings field name to write.

value
type: str

Literal value to store (e.g. a number, true/false, or text). For log_level, use a standard logging level name such as DEBUG or INFO.

project
type: Annotated[bool, Parameter(negative='')] = False

If true, write under pyproject.toml [tool.yera]; otherwise write under yera.toml [settings].