Skip to content

Commit

Permalink
Cleanup docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pim Schellart authored and Pim Schellart committed Mar 20, 2018
1 parent 420aaa0 commit 6ab6a87
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
9 changes: 5 additions & 4 deletions python/lsst/daf/butler/butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def put(self, obj, datasetType, dataId, producer=None):
Returns
-------
`DatasetRef`
ref : `DatasetRef`
A reference to the stored dataset.
"""
datasetType = self.registry.getDatasetType(datasetType)
Expand All @@ -106,7 +106,7 @@ def getDirect(self, ref):
Returns
-------
`object`
obj : `object`
The dataset.
"""
# Currently a direct pass-through to `Datastore.get` but this should
Expand All @@ -121,11 +121,12 @@ def get(self, datasetType, dataId):
datasetType : `DatasetType` instance or `str`
The `DatasetType`.
dataId : `dict`
An identifier with `DataUnit` names and values.
A `dict` of `DataUnit` name, value pairs that label the `DatasetRef`
within a Collection.
Returns
-------
`object`
obj : `object`
The dataset.
"""
datasetType = self.registry.getDatasetType(datasetType)
Expand Down
8 changes: 4 additions & 4 deletions python/lsst/daf/butler/core/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ class Run(object):
collection : `str`
A Collection name with which all Datasets in this Run are initially
associated, also used as a human-readable name for this Run.
environment : `int`
A Dataset that contains a description of
environment : `DatasetRef`
A reference to a dataset that contains a description of
the software environment (e.g. versions) used for this Run.
pipeline : `int`
A Dataset that contains a serialization of
pipeline : `DatasetRef`
A reference to a dataset that contains a serialization of
the SuperTask Pipeline used for this Run (if any).
"""
__slots__ = ("_execution", "_collection", "_environment", "_pipeline")
Expand Down
10 changes: 8 additions & 2 deletions python/lsst/daf/butler/registries/sqlRegistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ def addDataset(self, datasetType, dataId, run, producer=None):
datasetType : `str`
Name of a `DatasetType`.
dataId : `dict`
An identifier with `DataUnit` names and values.
A `dict` of `DataUnit` name, value pairs that label the `DatasetRef`
within a Collection.
run : `Run`
The `Run` instance that produced the Dataset. Ignored if
``producer`` is passed (`producer.run` is then used instead).
Expand All @@ -141,7 +142,7 @@ def addDataset(self, datasetType, dataId, run, producer=None):
Returns
-------
`DatasetRef`
ref : `DatasetRef`
A newly-created `DatasetRef` instance.
Raises
Expand Down Expand Up @@ -287,6 +288,11 @@ def getRun(self, collection=None, id=None):
Collection collection
id : `int`, optional
If given, lookup by id instead and ignore `collection`.
Returns
-------
run : `Run`
The `Run` instance.
"""
runTable = self._schema.metadata.tables['Run']
run = None
Expand Down

0 comments on commit 6ab6a87

Please sign in to comment.