rule_classes.Condition
rule_classes.Condition(self, condition)
A rule condition
Attributes
| Name | Type | Description |
|---|---|---|
| attribute | str | The attribute path for a SequenceInterval |
| relation | Callable | The relation function to be used |
| set | Union[str, list] |
The comparison set |
Methods
| Name | Description |
|---|---|
| check_condition | Check if the condition is met |
| validate_condition | Validate wellformedness of condititions |
check_condition
rule_classes.Condition.check_condition(obj)
Check if the condition is met
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
obj |
SequenceInterval | The sequence interval against which the condition is checked | required |
Returns
| Type | Description |
|---|---|
| bool | True or False |
validate_condition
rule_classes.Condition.validate_condition(condition)
Validate wellformedness of condititions
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
condition |
dict | condition dictionary | required |
Raises
| Type | Description |
|---|---|
| Exception | Any errors raised by the validator |