reci.config¶
Config resolution — flat dict with scoped overrides.
Resolution order for input root_dir of action run-tests:
1. ``run_tests__root_dir`` in config → scoped override wins
2. ``root_dir`` in config → shared default
3. ``default`` from action.yml → action default
4. If required and none found → validation error (FLOW001)
Functions
|
Scan a recipe and return config keys needed by its actions. |
|
Convert a nested dict to a flat dict with |
|
Find a config value for an action input. |
|
Config keys |
- reci.config.collect_required_config_keys(recipe, action_specs)[source]¶
Scan a recipe and return config keys needed by its actions.
Returns
{key: required}where required is True when the input hasrequired=Trueand no default. Inputs given by an explicitwith:or fed by an upstream step output (bind:honoured) need no config key. Keys the recipe references as${{ config.X }}are required.
- reci.config.flatten_config(nested, *, prefix='')[source]¶
Convert a nested dict to a flat dict with
__separators.>>> flatten_config({'testing': {'python_versions': ['3.10']}}) {'testing__python_versions': ['3.10']}
- reci.config.resolve_config_for_input(input_name, ref, config)[source]¶
Find a config value for an action input.
Returns
(config_key, value)orNone.
- reci.config.scaffold_placeholder_keys(recipe, action_specs, existing)[source]¶
Config keys
scaffoldshould add as<REQUIRED: ...>placeholders.Like the required part of
collect_required_config_keys(), with two refinements: a key that one step requires but another step takes as optional is scoped (<action>__<key>) so the placeholder cannot shadow the optional step’s default; and a required key already present in scoped form for every step that needs it is not asked for again unscoped.