Class: Recipe¶
A build rule that produces an output. A recipe is pure how: a command to invoke and the execution context (resources, container).
Recipes do not declare what the output depends on. Provenance — upstream inputs, decision-driven parameterization, and activation conditions — is declared on the parent Output (inputs, decisions, when). Runners surface the resolved input map and active decision values to the recipe via {...} template substitution (see command).
URI: astra:Recipe
classDiagram
class Recipe
click Recipe href "../Recipe/"
Recipe : command
Recipe : container
Recipe : resources
Recipe --> "0..1" Resources : resources
click Resources href "../Resources/"
Slots¶
| Name | Cardinality and Range | Description | Inheritance |
|---|---|---|---|
| command | 0..1 String |
POSIX shell command to execute (e | direct |
| resources | 0..1 Resources |
Compute resource requirements (cpus, memory, time_limit, …) | direct |
| container | 0..1 String |
Container image name or path to a Containerfile | direct |
Usages¶
| used by | used in | type | used |
|---|---|---|---|
| Output | recipe | range | Recipe |
Identifier and Mapping Information¶
Schema Source¶
- from schema: https://w3id.org/astra/analysis
Mappings¶
| Mapping Type | Mapped Value |
|---|---|
| self | astra:Recipe |
| native | astra:Recipe |
LinkML Source¶
Direct¶
name: Recipe
description: 'A build rule that produces an output. A recipe is pure *how*: a `command`
to invoke and the execution context (`resources`, `container`).
Recipes do not declare what the output depends on. Provenance — upstream inputs,
decision-driven parameterization, and activation conditions — is declared on the
parent Output (`inputs`, `decisions`, `when`). Runners surface the resolved input
map and active decision values to the recipe via `{...}` template substitution (see
`command`).'
from_schema: https://w3id.org/astra/analysis
attributes:
command:
name: command
description: "POSIX shell command to execute (e.g., 'python src/train.py', 'Rscript\
\ analysis.R', 'julia model.jl'). Any executable invocation is fine.\nThe command\
\ is a template. Runners substitute these placeholders before invoking it:\n\
\n {inputs.<id>} -- path to the named upstream input\n \
\ (must be declared in Output.inputs)\n {inputs} -- space-separated\
\ paths to all declared\n inputs, in declaration order\n\
\ {decisions.<id>} -- active option ID for the named\n \
\ decision in the current universe\n (must be declared\
\ in Output.decisions)\n {output} -- path the artifact will be written\
\ to\n\nUse {{ and }} to emit literal '{' and '}'. Every placeholder must resolve\
\ to a declared item; the validator rejects unresolved or undeclared references.\n\
Static constants belong inline in the command (e.g., '--max-iter 1000'); there\
\ is no separate `params` channel because varying values are decisions and constants\
\ are just command text."
from_schema: https://w3id.org/astra/analysis
rank: 1000
domain_of:
- Recipe
resources:
name: resources
description: Compute resource requirements (cpus, memory, time_limit, …)
from_schema: https://w3id.org/astra/analysis
rank: 1000
domain_of:
- Recipe
range: Resources
inlined: true
container:
name: container
description: Container image name or path to a Containerfile. Image names (e.g.,
'python:3.9', 'ghcr.io/org/img:latest') are pulled as pre-built images; file
paths (e.g., 'Containerfile', 'containers/Dockerfile') are built from source.
from_schema: https://w3id.org/astra/analysis
rank: 1000
domain_of:
- Recipe
- Analysis
Induced¶
name: Recipe
description: 'A build rule that produces an output. A recipe is pure *how*: a `command`
to invoke and the execution context (`resources`, `container`).
Recipes do not declare what the output depends on. Provenance — upstream inputs,
decision-driven parameterization, and activation conditions — is declared on the
parent Output (`inputs`, `decisions`, `when`). Runners surface the resolved input
map and active decision values to the recipe via `{...}` template substitution (see
`command`).'
from_schema: https://w3id.org/astra/analysis
attributes:
command:
name: command
description: "POSIX shell command to execute (e.g., 'python src/train.py', 'Rscript\
\ analysis.R', 'julia model.jl'). Any executable invocation is fine.\nThe command\
\ is a template. Runners substitute these placeholders before invoking it:\n\
\n {inputs.<id>} -- path to the named upstream input\n \
\ (must be declared in Output.inputs)\n {inputs} -- space-separated\
\ paths to all declared\n inputs, in declaration order\n\
\ {decisions.<id>} -- active option ID for the named\n \
\ decision in the current universe\n (must be declared\
\ in Output.decisions)\n {output} -- path the artifact will be written\
\ to\n\nUse {{ and }} to emit literal '{' and '}'. Every placeholder must resolve\
\ to a declared item; the validator rejects unresolved or undeclared references.\n\
Static constants belong inline in the command (e.g., '--max-iter 1000'); there\
\ is no separate `params` channel because varying values are decisions and constants\
\ are just command text."
from_schema: https://w3id.org/astra/analysis
rank: 1000
alias: command
owner: Recipe
domain_of:
- Recipe
range: string
resources:
name: resources
description: Compute resource requirements (cpus, memory, time_limit, …)
from_schema: https://w3id.org/astra/analysis
rank: 1000
alias: resources
owner: Recipe
domain_of:
- Recipe
range: Resources
inlined: true
container:
name: container
description: Container image name or path to a Containerfile. Image names (e.g.,
'python:3.9', 'ghcr.io/org/img:latest') are pulled as pre-built images; file
paths (e.g., 'Containerfile', 'containers/Dockerfile') are built from source.
from_schema: https://w3id.org/astra/analysis
rank: 1000
alias: container
owner: Recipe
domain_of:
- Recipe
- Analysis
range: string