package bistro

  1. Overview
  2. Docs
type t =
  1. | Input of string * path
  2. | Select of string * [ `Input of path | `Step of string ] * path
  3. | Step of step
and step = {
  1. id : id;
  2. descr : string;
  3. deps : dep list;
  4. action : action;
  5. np : int;
    (*

    Required number of processors

    *)
  6. mem : int;
    (*

    Required memory in MB

    *)
  7. version : int option;
    (*

    Version number of the wrapper

    *)
  8. precious : bool;
}
and dep = [
  1. | `Task of id
  2. | `Select of id * path
  3. | `Input of path
]
and id = string
and action =
  1. | Exec of command
  2. | Eval of some_expression
and some_expression =
  1. | Value : _ expression -> some_expression
  2. | File : unit expression -> some_expression
  3. | Directory : unit expression -> some_expression
and _ expression =
  1. | Expr_pure : {
    1. id : string;
    2. value : 'a;
    } -> 'a expression
  2. | Expr_app : ('a -> 'b) expression * 'a expression -> 'b expression
  3. | Expr_dest : string expression
  4. | Expr_tmp : string expression
  5. | Expr_np : int expression
  6. | Expr_mem : int expression
  7. | Expr_dep : dep -> string expression
  8. | Expr_deps : dep list -> string list expression
  9. | Expr_valdep : dep -> 'a expression
  10. | Expr_valdeps : dep list -> 'a list expression
and command =
  1. | Docker of Bistro.docker_image * command
  2. | Simple_command of token list
  3. | And_list of command list
  4. | Or_list of command list
  5. | Pipe_list of command list
and token =
  1. | S of string
  2. | D of dep
  3. | F of token list
  4. | DEST
  5. | TMP
  6. | NP
  7. | MEM
and path = Bistro.Path.t
type result =
  1. | Input_check of {
    1. path : string;
    2. pass : bool;
    }
  2. | Select_check of {
    1. dir_path : string;
    2. sel : string list;
    3. pass : bool;
    }
  3. | Step_result of {
    1. outcome : [ `Succeeded | `Missing_output | `Failed ];
    2. step : step;
    3. exit_code : int;
    4. action : [ `Sh of string | `Eval ];
    5. dumps : (string * string) list;
    6. cache : string option;
    7. stdout : string;
    8. stderr : string;
    }
type config = private {
  1. db : Db.t;
  2. use_docker : bool;
  3. keep_all : bool;
}
val config : db_path:string -> use_docker:bool -> keep_all:bool -> config
val of_workflow : precious:bool -> Bistro.u -> t
val id : t -> string
val equal : t -> t -> bool
val compare : t -> t -> int
val requirement : t -> Allocator.request
val perform : Allocator.resource -> config -> t -> result Lwt.t
val failure : result -> bool
val is_done : t -> config -> bool Lwt.t
val post_revdeps_hook : t -> config -> all_revdeps_succeeded:bool -> unit Lwt.t
val clean : t -> config -> unit Lwt.t
val render_step_command : np:int -> mem:int -> config -> step -> command -> string
val render_step_dumps : np:int -> mem:int -> config -> step -> (string * string) list
OCaml

Innovation. Community. Security.