Skip to content

Commit

Permalink
finish removing 'key' arg from queryMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
n8pease committed Jun 12, 2017
1 parent 525944d commit 8b198df
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions python/lsst/daf/persistence/butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,37 +746,31 @@ def getKeys(self, datasetType=None, level=None, tag=None):
break
return keys

def queryMetadata(self, datasetType, format=None, dataId={}, **rest):
def queryMetadata(self, datasetType, format, dataId={}, **rest):
"""Returns the valid values for one or more keys when given a partial
input collection data id.
Parameters
----------
datasetType - str
The type of dataset to inquire about.
key - str
A key giving the level of granularity of the inquiry.
format - str, tuple
An optional key or tuple of keys to be returned.
Key or tuple of keys to be returned.
dataId - DataId, dict
The partial data id.
**rest -
Keyword arguments for the partial data id.
Returns
-------
A list of valid values or tuples of valid values as specified by the format (defaulting to the same as
the key) at the key's level of granularity.
A list of valid values or tuples of valid values as specified by the
format.
"""

datasetType = self._resolveDatasetTypeAlias(datasetType)
dataId = DataId(dataId)
dataId.update(**rest)

if format is None:
format = (key,)
else:
format = sequencify(format)
format = sequencify(format)

tuples = None
for repoData in self._repos.inputs():
Expand Down

0 comments on commit 8b198df

Please sign in to comment.