dodal.common.coordination#

Functions

group_uuid(name)

Returns a unique but human-readable string, to assist debugging orchestrated groups.

inject(name)

Function to mark a defaulted argument of a plan as a reference to a device stored in another context and not available to be referenced directly.

dodal.common.coordination.group_uuid(name: str) str[source]#

Returns a unique but human-readable string, to assist debugging orchestrated groups.

Parameters:

name (str) – A human readable name

Returns:

name appended with a unique string

Return type:

readable_uid (Group)

dodal.common.coordination.inject(name: str) Any[source]#

Function to mark a defaulted argument of a plan as a reference to a device stored in another context and not available to be referenced directly. Bypasses type checking, returning x as Any and therefore valid as a default argument, leaving handling to the context from which the plan is called. Assumes that device.name is unique. e.g. For a 1-dimensional scan, that is usually performed on a Movable with name “stage_x”

def scan(x: Movable = inject(“stage_x”), start: float = 0.0 …)

Parameters:

name (str) – Name of a Device to be fetched from an external context

Returns:

name but without typing checking, valid as any default type

Return type:

Any