makeTestCollection¶
- lsst.daf.butler.tests.makeTestCollection(repo: Butler, uniqueId: str | None = None) Butler ¶
Create a read/write Butler to a fresh collection.
- Parameters:
- repo
lsst.daf.butler.Butler
A previously existing Butler to a repository, such as that returned by
makeRepo
ormakeTestRepo
.- uniqueId
str
, optional A collection ID guaranteed by external code to be unique across all calls to
makeTestCollection
for the same repository.
- repo
- Returns:
- butler
lsst.daf.butler.Butler
A Butler referring to a new collection in the repository at
root
. The collection is (almost) guaranteed to be new.
- butler
Notes
This function creates a single run collection that does not necessarily conform to any repository conventions. It is only suitable for creating an isolated test area, and not for repositories intended for real data processing or analysis.