package bistro

  1. Overview
  2. Docs

Workflow constructors

val input : ?version:int -> string -> 'a path workflow

Workflow constructor from an existing path

val shell : ?descr:string -> ?mem:int workflow -> ?np:int -> ?version:int -> ?img:container_image list -> Shell_dsl.command list -> 'a path workflow

Constructor for a workflow that execute a shell script. Its main argument is a list of Shell_dsl.cmd values. Other arguments are:

  • descr description of the workflow, used for logging
  • mem required memory
  • np maximum number of cores (could be given less at execution)
  • version version number, used to force the rebuild of a workflow
val select : _ directory -> string list -> 'a path workflow

Constructs a workflow from a directory workflow, by selecting a file in it

val plugin : ?descr:string -> ?np:int -> ?mem:int workflow -> ?version:int -> (unit -> 'a) workflow -> 'a workflow
val path_plugin : ?descr:string -> ?np:int -> ?mem:int workflow -> ?version:int -> (string -> unit) workflow -> 'a path workflow
val pure : id:string -> 'a -> 'a workflow

pure ~id x is a workflow that computes the value x. id should be a string identifying x, like a digest.

val data : 'a -> 'a workflow

Similar to pure, but computes a digest as identifier. Does not work with closures or objects.

val int : int -> int workflow

int i is pure_data i

val string : string -> string workflow

string s is pure_data s

val app : ('a -> 'b) workflow -> 'a workflow -> 'b workflow

Applicative structure

val both : 'a workflow -> 'b workflow -> ('a * 'b) workflow

Applicative structure, useful for parallel binds

val path : 'a path workflow -> string workflow
val path_list : 'a path workflow list -> string list workflow
val list : 'a workflow list -> 'a list workflow
val spawn : 'a list workflow -> f:('a workflow -> 'b workflow) -> 'b list workflow
val spawn2 : 'a list workflow -> 'b list workflow -> f:('a workflow -> 'b workflow -> 'c workflow) -> 'c list workflow
val glob : ?pattern:string -> ?type_selection:[ `File | `Directory ] -> _ directory -> 'a path list workflow
val trywith : 'a workflow -> 'a workflow -> 'a workflow
val ifelse : bool workflow -> 'a workflow -> 'a workflow -> 'a workflow
OCaml

Innovation. Community. Security.