tasks@scheduler option

momotor.options.domain.scheduler.tasks.get_scheduler_tasks_option(recipe, config, step_id)

Get the ‘tasks’ option for a single step

This gets the value of the ‘tasks’ option in the ‘scheduler’ domain from the step, recipe or config.

A step supporting sub-tasks must define the option in the recipe. The option definition in the recipe declares what is supported. The format for the definition is as follows:

Tasks option

Recipe/config option allowed

*

At least one dimension required (e.g. 2, 2.2 etc)

*?

Zero or more dimensions allowed.

?

A single dimension required (e.g. 1, 2)

?.?

Two dimensions required (e.g. 1.1, 2.2)

?.?.?

Three dimensions required (e.g. 1.2.3, 2.2.2)

?.*

At least two dimensions required (e.g. 1.2, 1.2.3)

?.??

One dimension required, two dimensions allowed.

?.??.??

One dimension required, two or three dimensions allowed.

4.?

Exactly two dimensions required, and the first must be 4 (e.g. 4.1, 4.2)

4.*

At least two dimensions required, and the first must be 4 (e.g. 4.1, 4.2.3)

4.4

A fixed dimension. Config option not required, but if provided, MUST equal 4.4

?.*?

Allowed but identical to *, so not recommended.

?.??.*?

Allowed but identical to ?.*, so not recommended.

There is no limit to the number of dimensions allowed.

Values in the config take priority over values in the recipe. If the option in the recipe contains dimension wildcards ?, *, ??, or *? the option in the config must fill in those values.

The ? and * wildcards indicate required dimensions. The ?? and *? wildcards indicate optional dimensions. The optional requirements must be the last dimensions in the option, e.g. ??.? is not valid, but ?.?? is. There can only be one * or *? wildcard in the option, and it must be the last one.

Parameters:
Return type:

Optional[Tuple[int, ...]]

Returns:

the tasks option, parsed into a tuple of ints