Skip to content

Anatomy of a Recipefile

XXXX

A Recipefile should tell us three things:

  1. What is this recipe?
  2. How do you execute it?
  3. How do you handle inputs and outputs?

What is this recipe?

name is the short_name... AI-generated at write-time...

description is a more fleshed out description... We force you to write it (but AI-generated at write-time)...

query is there if an AI query was there at the beginning

Some remarks about generation time, hashing, etc. Maybe? For disambiguation?

How do you execute it?

executor is the most important part. parameters depends based on the executor.

type is the mandatory field here.

conatus.ARLExecutor is fine. otherwise it has to be the Python full module path, which needs to be present at runtime. Note: executing conatus from the command line means you might miss it, I think. In any case, make sure it's in your Python environment. See Appendix.

Design note: all necessary files for execution should be within the folder.

ARLExecutor parameters

entry for the code entry. For now ARL files cannot call other files, but that might change in the future

actions are the actions:

  • We have :all syntactic sugar for your convenience
  • Any Action will do. Check at load-time, not at execute-time.

Something about node_refs?

PythonExecutor parameters

WIP...

How do you handle inputs and outputs?

inputs and outputs

Both need to be a list of parameters with a type. Same thing, full Python module.

io_handling

Outputs

This is very optional, but necessary if you want to have custom error handling.

  • out is to capture the equivalent of the out folder (the result of the function).
  • log is to capture the logs (so any file that is not out).

You need to specify both for now, cause I'm not sure what the desired behavior if someone only specifies out, say.

For each of them:

  • type to specify a RecipeOut class.
  • configs with paths to config JSON or YAML files, which we recognize might be outside the repository. RecipeOut should know how to handle that config. We load config in the RecipeOut class specified in type at load time, so it has to be correct. We merge all of the configs file at load time, which the last one in the list superseding values from the previous ones.

👉 More here: Deep Dive: Handling inputs and outputs from recipes

Inputs

WIP. Really not sure.

Appendix: How we handle Python modules

WIP

  • Full Python path in the Recipefile
  • Make sure the module is here
  • We do it so that you can import anything
  • For now, it's not versioned, which we know is a danger.