DatasetQueryConstraintVariant

class lsst.pipe.base._datasetQueryConstraints.DatasetQueryConstraintVariant

Bases: Iterable, Protocol

Base for all the valid variants for controlling constraining graph building queries based on dataset type existence.

ALL variant corresponds to using all input dataset types to constrain a query.

OFF variant corresponds to not using any dataset types to constrain a graph building query.

LIST variant should be used when one or more specific names should be used in constraining a graph building query.

Normally the ALL and OFF variants are used as as Singletons, attempting to instantiate them (i.e. ALL()) will return in singleton class itself.

LIST is used as a constructor to the contents (i.e. List([‘a’, ‘b’])). Using the LIST variant directly as a singleton will behave the same as if it were an empty instance.

Variants can be directly used, or automatically be selected by using the fromExpression class method given a valid string.

Methods Summary

fromExpression(expression)

Select and return the correct Variant that corresponds to the input expression.

Methods Documentation

classmethod fromExpression(expression: str) DatasetQueryConstraintVariant

Select and return the correct Variant that corresponds to the input expression.

Parameters:
expressionstr

Input expression. Valid values are all for all inputs dataset types in pipeline, off to not consider dataset type existence as a constraint, single or comma-separated list of dataset type names.

Returns:
variantDatasetQueryConstraintVariant

Correct variant for this expression.