batch.definition package

Submodules

batch.definition.definition module

Defines the class for managing a batch definition

class batch.definition.definition.BatchDefinition

Bases: object

Represents a batch definition

validate(batch)

Validates the given batch to make sure it is valid with respect to this batch definition. The given batch must have all of its related fields populated, though id and root_batch_id may be None. The derived definition attributes, such as estimated recipe total and previous batch diff, will be populated by this method.

Parameters:batch (batch.models.Batch) – The batch model
Returns:A list of warnings discovered during validation
Return type:list()

:raises batch.definition.exceptions.InvalidDefinition: If the definition is invalid

batch.definition.exceptions module

Defines exceptions that can occur when interacting with batch definitions

exception batch.definition.exceptions.InvalidDefinition(name, description)

Bases: util.exceptions.ValidationException

Exception indicating that the provided batch definition was invalid

Module contents