reci.recipe

Recipe model — declarative CI pipeline description.

A recipe is a YAML file that looks like a GitHub Actions workflow but with reci extensions: ${{ config.* }} references, bind: mappings for input renaming, and outputs: annotations on run: steps.

class reci.recipe.JobSpec(id: str, steps: list[~reci.recipe.StepSpec] = <factory>, needs: list[str] = <factory>, if_: str | None = None, runs_on: str = 'ubuntu-latest', strategy: dict | None = None, permissions: dict | None = None, continue_on_error: bool = False, env: dict[str, str] = <factory>)[source]

One job inside a recipe.

class reci.recipe.Recipe(name: str, on: ~typing.Any, jobs: dict[str, ~reci.recipe.JobSpec] = <factory>, env: dict[str, str] = <factory>, defaults: dict | None = None)[source]

A complete reci recipe.

exception reci.recipe.RecipeParseError[source]

Raised when a recipe YAML is structurally invalid.

class reci.recipe.StepSpec(id: str, uses: str | None = None, run: str | None = None, with_: dict[str, str] = <factory>, if_: str | None = None, name: str | None = None, outputs: list[str] = <factory>, bind: dict[str, str] = <factory>, env: dict[str, str] = <factory>)[source]

One step inside a job.

reci.recipe.parse_recipe(path: str) Recipe[source]

Load a recipe YAML and return a Recipe.

reci.recipe.parse_recipe_string(text: str) Recipe[source]

Parse a recipe from a YAML string (useful for testing).