DataIdMatch¶
- class lsst.pipe.base.tests.mocks.DataIdMatch(expression: str)¶
Bases:
object
Class that can match DataId against the user-defined string expression.
- Parameters:
- expression
str
User-defined expression, supports syntax defined by daf_butler expression parser. Maps identifiers in the expression to the values of DataId.
- expression
Methods Summary
match
(dataId)Match DataId contents against the expression.
Methods Documentation
- match(dataId: DataCoordinate | Mapping[str, Any]) bool ¶
Match DataId contents against the expression.
- Parameters:
- dataId
DataId
DataId that is matched against an expression.
- dataId
- Returns:
- match
bool
Result of expression evaluation.
- match
- Raises:
- KeyError
Raised when identifier in expression is not defined for given
DataId
.- TypeError
Raised when expression evaluates to a non-boolean type or when operation in expression cannot be performed on operand types.
- NotImplementedError
Raised when expression includes valid but unsupported syntax, e.g. function call.