Skip to content

Commit

Permalink
Merge pull request #158 from lsst/tickets/DM-27251
Browse files Browse the repository at this point in the history
DM-27251: update to daf_butler API and configuration changes
  • Loading branch information
TallJimbo committed Oct 30, 2020
2 parents 8900aa8 + 54955ad commit 5395043
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
18 changes: 12 additions & 6 deletions python/lsst/pipe/base/graphBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,10 @@ def connectDataIds(self, registry, collections, userQuery):
----------
registry : `lsst.daf.butler.Registry`
Registry for the data repository; used for all data ID queries.
collections : `lsst.daf.butler.CollectionSearch`
Object representing the collections to search for input datasets.
collections
Expressions representing the collections to search for input
datasets. May be any of the types accepted by
`lsst.daf.butler.CollectionSearch.fromExpression`.
userQuery : `str`, optional
User-provided expression to limit the data IDs processed.
Expand Down Expand Up @@ -578,8 +580,10 @@ def resolveDatasetRefs(self, registry, collections, run, commonDataIds, *, skipE
----------
registry : `lsst.daf.butler.Registry`
Registry for the data repository; used for all data ID queries.
collections : `lsst.daf.butler.CollectionSearch`
Object representing the collections to search for input datasets.
collections
Expressions representing the collections to search for input
datasets. May be any of the types accepted by
`lsst.daf.butler.CollectionSearch.fromExpression`.
run : `str`, optional
Name of the `~lsst.daf.butler.CollectionType.RUN` collection for
output datasets, if it already exists.
Expand Down Expand Up @@ -893,8 +897,10 @@ def makeGraph(self, pipeline, collections, run, userQuery):
----------
pipeline : `Pipeline`
Pipeline definition, task names/classes and their configs.
collections : `lsst.daf.butler.CollectionSearch`
Object representing the collections to search for input datasets.
collections
Expressions representing the collections to search for input
datasets. May be any of the types accepted by
`lsst.daf.butler.CollectionSearch.fromExpression`.
run : `str`, optional
Name of the `~lsst.daf.butler.CollectionType.RUN` collection for
output datasets, if it already exists.
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/pipe/base/tests/simpleQGraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import logging
import numpy

from lsst.daf.butler import (Butler, Config, DatasetType, CollectionSearch)
from lsst.daf.butler import Butler, Config, DatasetType
import lsst.daf.butler.tests as butlerTests
import lsst.pex.config as pexConfig
from ... import base as pipeBase
Expand Down Expand Up @@ -268,7 +268,7 @@ def makeSimpleQGraph(nQuanta=5, pipeline=None, butler=None, root=None, skipExist
builder = pipeBase.GraphBuilder(registry=butler.registry, skipExisting=skipExisting)
qgraph = builder.makeGraph(
pipeline,
collections=CollectionSearch.fromExpression(butler.run),
collections=[butler.run],
run=butler.run,
userQuery=userQuery
)
Expand Down
6 changes: 6 additions & 0 deletions tests/test_quantumGraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,18 @@ def setUp(self):
"name": "id",
"type": "int",
}],
"storage": {
"cls": "lsst.daf.butler.registry.dimensions.table.TableDimensionRecordStorage",
},
},
"B": {
"keys": [{
"name": "id",
"type": "int",
}],
"storage": {
"cls": "lsst.daf.butler.registry.dimensions.table.TableDimensionRecordStorage",
},
}
},
"packers": {}
Expand Down

0 comments on commit 5395043

Please sign in to comment.