Constraints¶
-
class
lsst.daf.butler.Constraints(config: Optional[Union[ConstraintsConfig, str]], *, universe: DimensionUniverse)¶ Bases:
objectDetermine whether a
DatasetRef,DatasetType, orStorageClassis allowed to be handled.Parameters: - config :
ConstraintsConfigorstr Load configuration. If
Nonethen this is equivalent to having no restrictions.- universe :
DimensionUniverse The set of all known dimensions, used to normalize any lookup keys involving dimensions.
Attributes Summary
matchAllKeyConfiguration key associated with matching everything. Methods Summary
getLookupKeys()Retrieve the look up keys for all the constraints entries. isAcceptable(entity, DatasetType, StorageClass])Check whether the supplied entity will be acceptable to whatever this Constraintsclass is associated with.Attributes Documentation
-
matchAllKey= LookupKey(name='all',)¶ Configuration key associated with matching everything.
Methods Documentation
-
getLookupKeys() → Set[lsst.daf.butler.core.configSupport.LookupKey]¶ Retrieve the look up keys for all the constraints entries.
Returns:
-
isAcceptable(entity: Union[DatasetRef, DatasetType, StorageClass]) → bool¶ Check whether the supplied entity will be acceptable to whatever this
Constraintsclass is associated with.Parameters: - entity :
DatasetType,DatasetRef, orStorageClass Instance to use to look in constraints table. The entity itself reports the
LookupKeythat is relevant.
Returns: - entity :
- config :