new_recipe()

Create recipes/<name>/ with a template recipe.toml and a stub step.

Usage

Source

new_recipe(
    name,
    *,
    root=None,
)

Both files say TODO and explain what to fill in. Until you replace the TODOs, run and sync refuse the recipe (rules 1 and 2), and check reports it as refused.

Parameters

name: str

Lowercase letters, digits and underscores, like "pwt_panel", and not a name Windows reserves (con, aux, nul, prn, com1…) or __pycache__.

root: str | Path | None = None
The project folder. By default it is found by walking up from the current folder to datapackage.json.

Returns

Path
The new recipe folder.

Raises

RecipeRefused

The name is not allowed, or the folder already exists.

ProjectNotFound
No project was found.